nendo 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gemtest +0 -0
- data/COPYING +0 -0
- data/History.txt +0 -0
- data/README.md +104 -6
- data/Rakefile +8 -5
- data/VERSION.yml +1 -1
- data/benchmark/nendo_benchmark_code.nnd +0 -0
- data/benchmark/ruby_benchmark_code.rb +0 -0
- data/bin/nendo +13 -1
- data/emacs/nendo-mode.el +0 -0
- data/example/exit.nnd +0 -0
- data/lib/nendo/debug/null.nnd +0 -0
- data/lib/nendo/debug/null.nndc +0 -0
- data/lib/nendo/debug/null.nndc.nc +0 -0
- data/lib/nendo/debug/syslog.nnd +0 -0
- data/lib/nendo/debug/syslog.nndc +0 -0
- data/lib/nendo/debug/syslog.nndc.nc +0 -0
- data/lib/nendo/init.nnd +0 -0
- data/lib/nendo/init.nndc +0 -0
- data/lib/nendo/init.nndc.nc +0 -0
- data/lib/nendo/nendo/experimental.nnd +0 -0
- data/lib/nendo/nendo/experimental.nndc +0 -0
- data/lib/nendo/nendo/experimental.nndc.nc +0 -0
- data/lib/nendo/nendo/test.nnd +0 -0
- data/lib/nendo/nendo/test.nndc +0 -0
- data/lib/nendo/nendo/test.nndc.nc +0 -0
- data/lib/nendo/rfc/json.nnd +0 -0
- data/lib/nendo/rfc/json.nndc +0 -0
- data/lib/nendo/rfc/json.nndc.nc +0 -0
- data/lib/nendo/rfc/yaml.nnd +0 -0
- data/lib/nendo/rfc/yaml.nndc +0 -0
- data/lib/nendo/rfc/yaml.nndc.nc +0 -0
- data/lib/nendo/ruby/builtin_functions.rb +0 -0
- data/lib/nendo/ruby/core.rb +1 -1
- data/lib/nendo/ruby/evaluator.rb +2 -1
- data/lib/nendo/ruby/optimized_func.rb +0 -0
- data/lib/nendo/ruby/out_of_module.rb +0 -0
- data/lib/nendo/ruby/printer.rb +0 -0
- data/lib/nendo/ruby/reader.rb +0 -0
- data/lib/nendo/ruby/types.rb +0 -0
- data/lib/nendo/srfi-1.nnd +0 -0
- data/lib/nendo/srfi-1.nndc +0 -0
- data/lib/nendo/srfi-1.nndc.nc +0 -0
- data/lib/nendo/srfi-2.nnd +0 -0
- data/lib/nendo/srfi-2.nndc +0 -0
- data/lib/nendo/srfi-2.nndc.nc +0 -0
- data/lib/nendo/srfi-26.nnd +0 -0
- data/lib/nendo/srfi-26.nndc +0 -0
- data/lib/nendo/srfi-26.nndc.nc +0 -0
- data/lib/nendo/srfi-9.nnd +0 -0
- data/lib/nendo/srfi-9.nndc +0 -0
- data/lib/nendo/srfi-9.nndc.nc +0 -0
- data/lib/nendo/text/html-lite.nnd +0 -0
- data/lib/nendo/text/html-lite.nndc +0 -0
- data/lib/nendo/text/html-lite.nndc.nc +0 -0
- data/lib/nendo/text/tree.nnd +0 -0
- data/lib/nendo/text/tree.nndc +0 -0
- data/lib/nendo/text/tree.nndc.nc +0 -0
- data/lib/nendo/util/combinations.nnd +0 -0
- data/lib/nendo/util/combinations.nndc +0 -0
- data/lib/nendo/util/combinations.nndc.nc +0 -0
- data/lib/nendo/util/list.nnd +0 -0
- data/lib/nendo/util/list.nndc +0 -0
- data/lib/nendo/util/list.nndc.nc +0 -0
- data/lib/nendo/util/match.nnd +0 -0
- data/lib/nendo/util/match.nndc +0 -0
- data/lib/nendo/util/match.nndc.nc +0 -0
- data/lib/nendo/util/record.nnd +0 -0
- data/lib/nendo/util/record.nndc +0 -0
- data/lib/nendo/util/record.nndc.nc +0 -0
- data/lib/nendo.rb +0 -0
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9703ffe8de9f458d0aad5ead6d6d9fbcb3f906daa6c466240df6e63117eb45c2
|
4
|
+
data.tar.gz: cba78b1d68272bb656db3709fdad97066053154ce7dbecfede2f0776bbe3e6c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d4f581433bdf21dd22eec377937e71f40b3876f02addcc669e14c02b123bc0047a6376e2c3e8a0970ef427d133712d12fac92b05425972ef98e7a8574578dd
|
7
|
+
data.tar.gz: fb9d54952de3aa9873f7c2e4927d11da344d57eb7f5c5a505ebf33de6cddc11ccb02816c0f7586d07f2e77893e3fc8f41629b0a1cbccb3afe486a8ddf7d34ac2
|
data/.gemtest
CHANGED
File without changes
|
data/COPYING
CHANGED
File without changes
|
data/History.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,12 +1,110 @@
|
|
1
|
-
Nendo
|
2
|
-
=======================
|
1
|
+
# Nendo
|
3
2
|
|
4
|
-
|
3
|
+
*[日本語版 / Japanese](README.ja.md)*
|
5
4
|
|
6
|
-
|
5
|
+
Nendo is a dynamic programming language built on top of Ruby environment. It is designed to be a macro language of Ruby. Nendo provides easy access to the whole Ruby environment.
|
6
|
+
|
7
|
+
Nendo is a dialect of Lisp. `nendo` means clay in Japanese. Lisp programming is reminiscent of a clay craft. I hope you will feel like playing with clay when you use Nendo.
|
8
|
+
|
9
|
+
## Features
|
10
|
+
|
11
|
+
- **Scheme-like Syntax**: Uses S-expressions to enable true macros that are sealed as forbidden techniques in Ruby
|
12
|
+
- **Direct Ruby Access**: Access Ruby's standard libraries and gems using the dot (.) syntax
|
13
|
+
- **List Processing Oriented**: Powerful for complex data structures and tree manipulation
|
14
|
+
- **Easy Installation**: Pure Ruby implementation - just install the gem
|
15
|
+
|
16
|
+
## Supported Libraries
|
17
|
+
|
18
|
+
### SRFIs
|
19
|
+
- [SRFI 1: List Library](http://srfi.schemers.org/srfi-1/srfi-1.html) (map, filter, fold, ...)
|
20
|
+
- [SRFI 2: AND-LET*](http://srfi.schemers.org/srfi-2/srfi-2.html)
|
21
|
+
- [SRFI 8: RECEIVE](http://srfi.schemers.org/srfi-8/srfi-8.html)
|
22
|
+
- [SRFI 9: Defining Record Types](http://srfi.schemers.org/srfi-9/srfi-9.html)
|
23
|
+
- [SRFI 26: Notation for Specializing Parameters](http://srfi.schemers.org/srfi-26/srfi-26.html) (cut, cute)
|
24
|
+
- [SRFI 46: Basic Syntax-rules Extensions](http://srfi.schemers.org/srfi-46/srfi-46.html)
|
25
|
+
- [SRFI 61: A more general COND clause](http://srfi.schemers.org/srfi-61/srfi-61.html)
|
26
|
+
- [SRFI 69: Basic hash tables](http://srfi.schemers.org/srfi-69/srfi-69.html)
|
27
|
+
|
28
|
+
### Ported from chibi-scheme and Gauche
|
29
|
+
- text.html-lite - Simple HTML document construction
|
30
|
+
- text.tree - Lazy text construction
|
31
|
+
- nendo.test - Unit testing (subset of gauche.test)
|
32
|
+
- rfc.json - JSON parsing and construction
|
33
|
+
- util.list - Additional list library
|
34
|
+
- util.match - Pattern matching (ported from chibi-scheme 0.3)
|
35
|
+
- util.combinations - Combination library
|
36
|
+
|
37
|
+
## Installation
|
38
|
+
|
39
|
+
### Requirements
|
40
|
+
- Ruby 2.3, 2.4, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4
|
41
|
+
- JRuby 1.6.2+
|
42
|
+
|
43
|
+
### Install from RubyGems
|
44
|
+
```bash
|
45
|
+
gem install nendo
|
46
|
+
```
|
47
|
+
|
48
|
+
## Examples
|
49
|
+
|
50
|
+
### Hello World
|
51
|
+
```lisp
|
52
|
+
(print (+ "Hello " "World!"))
|
53
|
+
; => Hello World!
|
54
|
+
```
|
55
|
+
|
56
|
+
### Even numbers filter
|
57
|
+
```lisp
|
58
|
+
(filter
|
59
|
+
(lambda (n)
|
60
|
+
(= (% n 2) 0))
|
61
|
+
'(1 2 3 4 5 6 7 8 9 10))
|
62
|
+
; => (2 4 6 8 10)
|
63
|
+
```
|
64
|
+
|
65
|
+
### Accessing Ruby libraries
|
66
|
+
```lisp
|
67
|
+
(require "date")
|
68
|
+
(let1 d (Date.new 0)
|
69
|
+
(list (d.strftime "%x")
|
70
|
+
(d.strftime "%s")))
|
71
|
+
```
|
7
72
|
|
8
|
-
|
9
|
-
|
73
|
+
### Defining macros
|
74
|
+
```lisp
|
75
|
+
(define when (macro form
|
76
|
+
`(if ,(car form) (begin ,@(cdr form)))))
|
77
|
+
```
|
78
|
+
|
79
|
+
## For Ruby Users
|
80
|
+
|
81
|
+
- **S-expression syntax**: Enables true macros and powerful DSL construction
|
82
|
+
- **List processing**: Ideal for complex data structures where object-oriented approaches fall short
|
83
|
+
- **Seamless Ruby integration**: Access the entire Ruby ecosystem
|
84
|
+
|
85
|
+
## For Lisp Users
|
86
|
+
|
87
|
+
- **Vast Ruby library ecosystem**: Access all gems and Ruby libraries
|
88
|
+
- **Cloud deployment ready**: Works on Ruby-based PaaS platforms like Heroku
|
89
|
+
- **Easy installation**: Pure Ruby implementation, no complex dependencies
|
90
|
+
|
91
|
+
## Source Code & Development
|
92
|
+
|
93
|
+
- [GitHub Repository](http://github.com/kiyoka/nendo)
|
94
|
+
- [Travis CI](http://travis-ci.org/#!/kiyoka/nendo/builds/79961)
|
95
|
+
|
96
|
+
## Projects Written in Nendo
|
97
|
+
|
98
|
+
- [sekka](http://github.com/kiyoka/sekka) - Japanese input method
|
99
|
+
|
100
|
+
## Documentation
|
101
|
+
|
102
|
+
- [Tutorial](docs/Tutorial.md)
|
103
|
+
- [ReferenceManual](docs/ReferenceManual.md)
|
104
|
+
|
105
|
+
## License
|
106
|
+
|
107
|
+
This software is open source, covered by a BSD-style license. Please read accompanying file COPYING.
|
10
108
|
|
11
109
|
|
12
110
|
|
data/Rakefile
CHANGED
@@ -22,13 +22,13 @@ task :test => [:test1, :test2] do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
task :test1 do
|
25
|
-
sh "rspec -I ./lib -b
|
25
|
+
sh "rspec -I ./lib -b"
|
26
26
|
sh "ruby -I ./lib ./bin/nendo ./spec/srfi-1-test.nnd"
|
27
27
|
end
|
28
28
|
|
29
29
|
task :test2 do
|
30
30
|
sh "/bin/rm -f test.record"
|
31
|
-
sh "echo
|
31
|
+
sh "echo > test.log"
|
32
32
|
sh "ruby -I ./lib ./bin/nendo ./spec/textlib-test.nnd >> test.log"
|
33
33
|
sh "ruby -I ./lib ./bin/nendo ./spec/nendo-util-test.nnd >> test.log"
|
34
34
|
sh "ruby -I ./lib ./bin/nendo ./spec/json-test.nnd >> test.log"
|
@@ -37,13 +37,14 @@ task :test2 do
|
|
37
37
|
sh "ruby -I ./lib ./bin/nendo ./spec/srfi-9-test.nnd >> test.log"
|
38
38
|
sh "ruby -I ./lib ./bin/nendo ./spec/srfi-26-test.nnd >> test.log"
|
39
39
|
sh "ruby -I ./lib ./bin/nendo ./spec/util-list-test.nnd >> test.log"
|
40
|
+
sh "cat test.log"
|
40
41
|
sh "cat test.record"
|
41
42
|
sh "grep ' 0 failed, ' test.record > /dev/null"
|
42
43
|
end
|
43
44
|
|
44
45
|
task :test3 do
|
45
46
|
sh "/bin/rm -f test.record"
|
46
|
-
sh "echo
|
47
|
+
sh "echo > test3.log"
|
47
48
|
sh "ruby -I ./lib ./bin/nendo ./spec/match-test.nnd | tee -a test3.log"
|
48
49
|
sh "ruby -I ./lib ./bin/nendo ./spec/util-combinations-test.nnd | tee -a test3.log"
|
49
50
|
sh "cat test.record"
|
@@ -61,13 +62,15 @@ end
|
|
61
62
|
task :compile do
|
62
63
|
# Replace Version Number
|
63
64
|
targetFile = "./lib/nendo/ruby/core.rb"
|
64
|
-
|
65
|
+
require 'yaml'
|
66
|
+
version_data = YAML.load_file("VERSION.yml")
|
65
67
|
(original, modified) = open( targetFile ) {|f|
|
66
68
|
lines = f.readlines
|
67
69
|
[ lines,
|
68
70
|
lines.map {|line|
|
69
71
|
if line.match( /##NENDO-VERSION/ )
|
70
|
-
|
72
|
+
version_string = "#{version_data[:major]}.#{version_data[:minor]}.#{version_data[:patch]}"
|
73
|
+
sprintf( ' "%s" ##NENDO-VERSION', version_string ) + "\n"
|
71
74
|
else
|
72
75
|
line
|
73
76
|
end
|
data/VERSION.yml
CHANGED
File without changes
|
File without changes
|
data/bin/nendo
CHANGED
@@ -35,7 +35,19 @@
|
|
35
35
|
# $Id:
|
36
36
|
#
|
37
37
|
require 'nendo'
|
38
|
-
|
38
|
+
begin
|
39
|
+
require 'getoptlong'
|
40
|
+
rescue LoadError
|
41
|
+
# For Ruby 3.4+, getoptlong needs to be explicitly added to Gemfile
|
42
|
+
begin
|
43
|
+
require 'bundler/setup'
|
44
|
+
require 'getoptlong'
|
45
|
+
rescue LoadError => e
|
46
|
+
$stderr.puts "Error: getoptlong is required but not available."
|
47
|
+
$stderr.puts "For Ruby 3.4+, please add 'gem \"getoptlong\"' to your Gemfile."
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
end
|
39
51
|
#require 'profile'
|
40
52
|
|
41
53
|
def userOptionEater
|
data/emacs/nendo-mode.el
CHANGED
File without changes
|
data/example/exit.nnd
CHANGED
File without changes
|
data/lib/nendo/debug/null.nnd
CHANGED
File without changes
|
data/lib/nendo/debug/null.nndc
CHANGED
File without changes
|
File without changes
|
data/lib/nendo/debug/syslog.nnd
CHANGED
File without changes
|
data/lib/nendo/debug/syslog.nndc
CHANGED
File without changes
|
File without changes
|
data/lib/nendo/init.nnd
CHANGED
File without changes
|
data/lib/nendo/init.nndc
CHANGED
File without changes
|
data/lib/nendo/init.nndc.nc
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/nendo/nendo/test.nnd
CHANGED
File without changes
|
data/lib/nendo/nendo/test.nndc
CHANGED
File without changes
|
File without changes
|
data/lib/nendo/rfc/json.nnd
CHANGED
File without changes
|
data/lib/nendo/rfc/json.nndc
CHANGED
File without changes
|
data/lib/nendo/rfc/json.nndc.nc
CHANGED
File without changes
|
data/lib/nendo/rfc/yaml.nnd
CHANGED
File without changes
|
data/lib/nendo/rfc/yaml.nndc
CHANGED
File without changes
|
data/lib/nendo/rfc/yaml.nndc.nc
CHANGED
File without changes
|
File without changes
|
data/lib/nendo/ruby/core.rb
CHANGED
data/lib/nendo/ruby/evaluator.rb
CHANGED
@@ -215,9 +215,10 @@ module Nendo
|
|
215
215
|
if 0 == name.length
|
216
216
|
""
|
217
217
|
else
|
218
|
+
name = name.dup if name.frozen?
|
218
219
|
name.gsub!( Regexp.new( Regexp.escape( '...' )), @char_table_lisp_to_ruby[ '...' ] )
|
219
220
|
arr = name.gsub( /["]/, '' ).split( /[.]/ )
|
220
|
-
tmp = arr[0]
|
221
|
+
tmp = arr[0].dup
|
221
222
|
tmp.gsub!( /[:][:]/, " " ) # save '::'
|
222
223
|
@char_table_lisp_to_ruby.each_pair { |key,val|
|
223
224
|
tmp.gsub!( Regexp.new( Regexp.escape( key )), val )
|
File without changes
|
File without changes
|
data/lib/nendo/ruby/printer.rb
CHANGED
File without changes
|
data/lib/nendo/ruby/reader.rb
CHANGED
File without changes
|
data/lib/nendo/ruby/types.rb
CHANGED
File without changes
|
data/lib/nendo/srfi-1.nnd
CHANGED
File without changes
|
data/lib/nendo/srfi-1.nndc
CHANGED
File without changes
|
data/lib/nendo/srfi-1.nndc.nc
CHANGED
File without changes
|
data/lib/nendo/srfi-2.nnd
CHANGED
File without changes
|
data/lib/nendo/srfi-2.nndc
CHANGED
File without changes
|
data/lib/nendo/srfi-2.nndc.nc
CHANGED
File without changes
|
data/lib/nendo/srfi-26.nnd
CHANGED
File without changes
|
data/lib/nendo/srfi-26.nndc
CHANGED
File without changes
|
data/lib/nendo/srfi-26.nndc.nc
CHANGED
File without changes
|
data/lib/nendo/srfi-9.nnd
CHANGED
File without changes
|
data/lib/nendo/srfi-9.nndc
CHANGED
File without changes
|
data/lib/nendo/srfi-9.nndc.nc
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/nendo/text/tree.nnd
CHANGED
File without changes
|
data/lib/nendo/text/tree.nndc
CHANGED
File without changes
|
data/lib/nendo/text/tree.nndc.nc
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/nendo/util/list.nnd
CHANGED
File without changes
|
data/lib/nendo/util/list.nndc
CHANGED
File without changes
|
data/lib/nendo/util/list.nndc.nc
CHANGED
File without changes
|
data/lib/nendo/util/match.nnd
CHANGED
File without changes
|
data/lib/nendo/util/match.nndc
CHANGED
File without changes
|
File without changes
|
data/lib/nendo/util/record.nnd
CHANGED
File without changes
|
data/lib/nendo/util/record.nndc
CHANGED
File without changes
|
File without changes
|
data/lib/nendo.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nendo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kiyoka Nishiyama
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Nendo is a programming language written in Ruby.
|
14
14
|
email: kiyoka@sumibi.org
|
@@ -110,7 +110,7 @@ homepage: http://github.com/kiyoka/nendo
|
|
110
110
|
licenses:
|
111
111
|
- New BSD
|
112
112
|
metadata: {}
|
113
|
-
post_install_message:
|
113
|
+
post_install_message:
|
114
114
|
rdoc_options:
|
115
115
|
- "-x"
|
116
116
|
- ".gemtest"
|
@@ -233,9 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
|
237
|
-
|
238
|
-
signing_key:
|
236
|
+
rubygems_version: 3.4.20
|
237
|
+
signing_key:
|
239
238
|
specification_version: 4
|
240
239
|
summary: Nendo is a dialect of Lisp.
|
241
240
|
test_files: []
|