nendo 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Rakefile +20 -18
- data/VERSION.yml +1 -1
- data/lib/nendo/init.nndc +269 -269
- data/lib/nendo/nendo/experimental.nnd +69 -1
- data/lib/nendo/nendo/experimental.nndc +1814 -933
- data/lib/nendo/nendo/test.nndc +16 -16
- data/lib/nendo/rfc/json.nndc +6 -6
- data/lib/nendo/ruby/builtin_functions.rb +2 -0
- data/lib/nendo/ruby/core.rb +1 -1
- data/lib/nendo/ruby/printer.rb +2 -0
- data/lib/nendo/srfi-1.nnd +20 -5
- data/lib/nendo/srfi-1.nndc +1814 -1706
- data/lib/nendo/srfi-2.nndc +154 -154
- data/lib/nendo/srfi-26.nndc +433 -433
- data/lib/nendo/text/html-lite.nndc +46 -46
- data/lib/nendo/util/combinations.nndc +213 -213
- data/lib/nendo/util/list.nndc +294 -294
- data/lib/nendo/util/match.nnd +1 -1
- data/lib/nendo/util/match.nndc +5724 -5724
- data/test/nendo-util-test.nnd +121 -0
- data/test/nendo_spec.rb +5 -0
- data/test/rspec_formatter_for_emacs.rb +1 -0
- metadata +66 -17
data/lib/nendo/nendo/test.nndc
CHANGED
@@ -59,13 +59,13 @@ trampCall(
|
|
59
59
|
end
|
60
60
|
} ; ___lambda.call(
|
61
61
|
begin
|
62
|
-
___lambda = lambda { |
|
62
|
+
___lambda = lambda { |___gensym__5d616449e4cd5ff7562e60dbfcf1c628e32cc41d_30178|
|
63
63
|
if (
|
64
64
|
begin
|
65
65
|
embedBacktraceInfo( "./lib/nendo/nendo/test.nnd", 175 );
|
66
66
|
_null_QUMARK(
|
67
67
|
begin
|
68
|
-
trampCall(
|
68
|
+
trampCall(___gensym__5d616449e4cd5ff7562e60dbfcf1c628e32cc41d_30178)
|
69
69
|
rescue => __e ; __e.set_backtrace( [":1"] + __e.backtrace ) ; raise __e
|
70
70
|
end
|
71
71
|
)
|
@@ -84,7 +84,7 @@ trampCall(
|
|
84
84
|
end ,
|
85
85
|
[
|
86
86
|
begin
|
87
|
-
trampCall(
|
87
|
+
trampCall(___gensym__5d616449e4cd5ff7562e60dbfcf1c628e32cc41d_30178)
|
88
88
|
rescue => __e ; __e.set_backtrace( [":1"] + __e.backtrace ) ; raise __e
|
89
89
|
end
|
90
90
|
]
|
@@ -140,7 +140,7 @@ trampCall(
|
|
140
140
|
begin
|
141
141
|
if (
|
142
142
|
begin
|
143
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
143
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 265 );
|
144
144
|
_not(
|
145
145
|
begin
|
146
146
|
embedBacktraceInfo( "./lib/nendo/nendo/test.nnd", 52 );
|
@@ -172,7 +172,7 @@ trampCall(
|
|
172
172
|
___lambda = lambda { |_ex,_ey|
|
173
173
|
if (
|
174
174
|
begin
|
175
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
175
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 265 );
|
176
176
|
_not(
|
177
177
|
begin
|
178
178
|
embedBacktraceInfo( "./lib/nendo/nendo/test.nnd", 52 );
|
@@ -734,7 +734,7 @@ trampCall(
|
|
734
734
|
if (
|
735
735
|
if (
|
736
736
|
begin
|
737
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
737
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 265 );
|
738
738
|
_not(
|
739
739
|
begin
|
740
740
|
embedBacktraceInfo( "./lib/nendo/nendo/test.nnd", 52 );
|
@@ -1389,13 +1389,13 @@ trampCall(
|
|
1389
1389
|
) then
|
1390
1390
|
begin
|
1391
1391
|
begin
|
1392
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
1392
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 186 );
|
1393
1393
|
trampCall( self.__PAMARKraise_METHOD( '%raise',
|
1394
1394
|
begin
|
1395
1395
|
if @global_lisp_binding.has_key?('__PAMARKraise') then
|
1396
1396
|
trampCall(@__PAMARKraise)
|
1397
1397
|
else raise NameError.new( "Error: undefined variable __PAMARKraise", "__PAMARKraise" ) end
|
1398
|
-
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:
|
1398
|
+
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:186"] + __e.backtrace ) ; raise __e
|
1399
1399
|
end ,
|
1400
1400
|
[
|
1401
1401
|
begin
|
@@ -1414,26 +1414,26 @@ trampCall(
|
|
1414
1414
|
[
|
1415
1415
|
"%s:%s raised %s" ,
|
1416
1416
|
begin
|
1417
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
1417
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 184 );
|
1418
1418
|
trampCall( self.__ASMARKFILE_ASMARK_METHOD( '*FILE*',
|
1419
1419
|
begin
|
1420
1420
|
if @global_lisp_binding.has_key?('__ASMARKFILE_ASMARK') then
|
1421
1421
|
trampCall(@__ASMARKFILE_ASMARK)
|
1422
1422
|
else raise NameError.new( "Error: undefined variable __ASMARKFILE_ASMARK", "__ASMARKFILE_ASMARK" ) end
|
1423
|
-
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:
|
1423
|
+
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:184"] + __e.backtrace ) ; raise __e
|
1424
1424
|
end ,
|
1425
1425
|
[
|
1426
1426
|
]
|
1427
1427
|
))
|
1428
1428
|
end ,
|
1429
1429
|
begin
|
1430
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
1430
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 184 );
|
1431
1431
|
trampCall( self.__ASMARKLINE_ASMARK_METHOD( '*LINE*',
|
1432
1432
|
begin
|
1433
1433
|
if @global_lisp_binding.has_key?('__ASMARKLINE_ASMARK') then
|
1434
1434
|
trampCall(@__ASMARKLINE_ASMARK)
|
1435
1435
|
else raise NameError.new( "Error: undefined variable __ASMARKLINE_ASMARK", "__ASMARKLINE_ASMARK" ) end
|
1436
|
-
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:
|
1436
|
+
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:184"] + __e.backtrace ) ; raise __e
|
1437
1437
|
end ,
|
1438
1438
|
[
|
1439
1439
|
]
|
@@ -1458,26 +1458,26 @@ trampCall(
|
|
1458
1458
|
[
|
1459
1459
|
"%s:%s raised %s" ,
|
1460
1460
|
begin
|
1461
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
1461
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 184 );
|
1462
1462
|
trampCall( self.__ASMARKFILE_ASMARK_METHOD( '*FILE*',
|
1463
1463
|
begin
|
1464
1464
|
if @global_lisp_binding.has_key?('__ASMARKFILE_ASMARK') then
|
1465
1465
|
trampCall(@__ASMARKFILE_ASMARK)
|
1466
1466
|
else raise NameError.new( "Error: undefined variable __ASMARKFILE_ASMARK", "__ASMARKFILE_ASMARK" ) end
|
1467
|
-
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:
|
1467
|
+
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:184"] + __e.backtrace ) ; raise __e
|
1468
1468
|
end ,
|
1469
1469
|
[
|
1470
1470
|
]
|
1471
1471
|
))
|
1472
1472
|
end ,
|
1473
1473
|
begin
|
1474
|
-
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd",
|
1474
|
+
embedBacktraceInfo( "./lib/nendo/nendo/experimental.nnd", 184 );
|
1475
1475
|
trampCall( self.__ASMARKLINE_ASMARK_METHOD( '*LINE*',
|
1476
1476
|
begin
|
1477
1477
|
if @global_lisp_binding.has_key?('__ASMARKLINE_ASMARK') then
|
1478
1478
|
trampCall(@__ASMARKLINE_ASMARK)
|
1479
1479
|
else raise NameError.new( "Error: undefined variable __ASMARKLINE_ASMARK", "__ASMARKLINE_ASMARK" ) end
|
1480
|
-
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:
|
1480
|
+
rescue => __e ; __e.set_backtrace( ["./lib/nendo/nendo/experimental.nnd:184"] + __e.backtrace ) ; raise __e
|
1481
1481
|
end ,
|
1482
1482
|
[
|
1483
1483
|
]
|
data/lib/nendo/rfc/json.nndc
CHANGED
@@ -553,13 +553,13 @@ trampCall(
|
|
553
553
|
end
|
554
554
|
} ; ___lambda.call(
|
555
555
|
begin
|
556
|
-
___lambda = lambda { |
|
556
|
+
___lambda = lambda { |___gensym__6d159efe5170a605fc9e84dcf91a427e3f7e5718_90188|
|
557
557
|
if (
|
558
558
|
begin
|
559
559
|
embedBacktraceInfo( "./lib/nendo/rfc/json.nnd", 62 );
|
560
560
|
_null_QUMARK(
|
561
561
|
begin
|
562
|
-
trampCall(
|
562
|
+
trampCall(___gensym__6d159efe5170a605fc9e84dcf91a427e3f7e5718_90188)
|
563
563
|
rescue => __e ; __e.set_backtrace( [":1"] + __e.backtrace ) ; raise __e
|
564
564
|
end
|
565
565
|
)
|
@@ -581,7 +581,7 @@ trampCall(
|
|
581
581
|
end ,
|
582
582
|
[
|
583
583
|
begin
|
584
|
-
trampCall(
|
584
|
+
trampCall(___gensym__6d159efe5170a605fc9e84dcf91a427e3f7e5718_90188)
|
585
585
|
rescue => __e ; __e.set_backtrace( [":1"] + __e.backtrace ) ; raise __e
|
586
586
|
end
|
587
587
|
]
|
@@ -671,13 +671,13 @@ trampCall(
|
|
671
671
|
end
|
672
672
|
} ; ___lambda.call(
|
673
673
|
begin
|
674
|
-
___lambda = lambda { |
|
674
|
+
___lambda = lambda { |___gensym__6d159efe5170a605fc9e84dcf91a427e3f7e5718_90189|
|
675
675
|
if (
|
676
676
|
begin
|
677
677
|
embedBacktraceInfo( "./lib/nendo/rfc/json.nnd", 62 );
|
678
678
|
_null_QUMARK(
|
679
679
|
begin
|
680
|
-
trampCall(
|
680
|
+
trampCall(___gensym__6d159efe5170a605fc9e84dcf91a427e3f7e5718_90189)
|
681
681
|
rescue => __e ; __e.set_backtrace( [":1"] + __e.backtrace ) ; raise __e
|
682
682
|
end
|
683
683
|
)
|
@@ -699,7 +699,7 @@ trampCall(
|
|
699
699
|
end ,
|
700
700
|
[
|
701
701
|
begin
|
702
|
-
trampCall(
|
702
|
+
trampCall(___gensym__6d159efe5170a605fc9e84dcf91a427e3f7e5718_90189)
|
703
703
|
rescue => __e ; __e.set_backtrace( [":1"] + __e.backtrace ) ; raise __e
|
704
704
|
end
|
705
705
|
]
|
data/lib/nendo/ruby/core.rb
CHANGED
data/lib/nendo/ruby/printer.rb
CHANGED
data/lib/nendo/srfi-1.nnd
CHANGED
@@ -657,10 +657,8 @@
|
|
657
657
|
(if (null? cars+ans) ans ; Done.
|
658
658
|
(lp cdrs (apply kons cars+ans)))))
|
659
659
|
|
660
|
-
|
661
|
-
|
662
|
-
(lp (cdr lis) (kons (car lis) ans))))))
|
663
|
-
|
660
|
+
;; Fast path
|
661
|
+
(%fold kons knil lis1)))
|
664
662
|
|
665
663
|
(define (fold-right kons knil lis1 . lists)
|
666
664
|
(check-arg procedure? kons fold-right)
|
@@ -809,9 +807,26 @@
|
|
809
807
|
;; Fast path.
|
810
808
|
(%map f lis1)))
|
811
809
|
|
810
|
+
|
811
|
+
;;; For-each F across lists, guaranteeing to go left-to-right.
|
812
|
+
;;; same like as map-in-order.
|
813
|
+
|
814
|
+
(define (for-each-in-order f lis1 . lists)
|
815
|
+
(check-arg procedure? f map-in-order)
|
816
|
+
(if (pair? lists)
|
817
|
+
(let recur ((lists (cons lis1 lists)))
|
818
|
+
(receive (cars cdrs) (%cars+cdrs lists)
|
819
|
+
(if (pair? cars)
|
820
|
+
(let ((x (apply f cars))) ; Do head first,
|
821
|
+
(cons x (recur cdrs))) ; then tail.
|
822
|
+
'())))
|
823
|
+
|
824
|
+
;; Fast path.
|
825
|
+
(%for-each f lis1)))
|
826
|
+
|
812
827
|
;;; We extend MAP to handle arguments of unequal length.
|
813
828
|
(define map map-in-order)
|
814
|
-
(define for-each
|
829
|
+
(define for-each for-each-in-order)
|
815
830
|
|
816
831
|
;;; filter, remove, partition
|
817
832
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|