2008-07-14 20:06:42 -04:00
|
|
|
(load "test.lsp")
|
|
|
|
|
|
|
|
(princ "colorgraph: ")
|
|
|
|
(load "tcolor.lsp")
|
|
|
|
|
|
|
|
(princ "fib(34): ")
|
2009-05-30 17:13:13 -04:00
|
|
|
(assert (equal? (time (fib 34)) 5702887))
|
2008-07-14 20:06:42 -04:00
|
|
|
(princ "yfib(32): ")
|
2009-05-30 17:13:13 -04:00
|
|
|
(assert (equal? (time (yfib 32)) 2178309))
|
2008-07-14 20:06:42 -04:00
|
|
|
|
|
|
|
(princ "sort: ")
|
switching to scheme #t, #f, and () values
porting code to sort out which NILs are false and which are
empty lists
switching to scheme-style special forms. however you feel about
scheme names vs. CL names, using both is silly.
mostly switching to scheme predicate names, with compatibility
aliases for now. adding set-constant! to make this efficient.
adding null?, eqv?, assq, assv, assoc, memq, memv, member
adding 2-argument form of if
allowing else as final cond condition
looking for init file in same directory as executable, so flisp
can be started from anywhere
renaming T to FL_T, since exporting a 1-character symbol is
not very nice
adding opaque type boilerplate example file
adding correctness checking for the pattern-lambda benchmark
bugfix in int2str
2009-01-28 20:04:23 -05:00
|
|
|
(set! r (map-int (lambda (x) (mod (+ (* x 9421) 12345) 1024)) 1000))
|
2010-05-03 01:07:22 -04:00
|
|
|
(time (simple-sort r))
|
2008-07-14 20:06:42 -04:00
|
|
|
|
2009-08-12 00:56:32 -04:00
|
|
|
(princ "expand: ")
|
|
|
|
(time (dotimes (n 5000) (expand '(dotimes (i 100) body1 body2))))
|
2008-07-14 20:06:42 -04:00
|
|
|
|
2009-06-27 19:07:22 -04:00
|
|
|
(define (my-append . lsts)
|
|
|
|
(cond ((null? lsts) ())
|
|
|
|
((null? (cdr lsts)) (car lsts))
|
|
|
|
(else ((label append2 (lambda (l d)
|
|
|
|
(if (null? l) d
|
|
|
|
(cons (car l)
|
|
|
|
(append2 (cdr l) d)))))
|
|
|
|
(car lsts) (apply my-append (cdr lsts))))))
|
|
|
|
|
2008-07-26 00:03:48 -04:00
|
|
|
(princ "append: ")
|
switching to scheme #t, #f, and () values
porting code to sort out which NILs are false and which are
empty lists
switching to scheme-style special forms. however you feel about
scheme names vs. CL names, using both is silly.
mostly switching to scheme predicate names, with compatibility
aliases for now. adding set-constant! to make this efficient.
adding null?, eqv?, assq, assv, assoc, memq, memv, member
adding 2-argument form of if
allowing else as final cond condition
looking for init file in same directory as executable, so flisp
can be started from anywhere
renaming T to FL_T, since exporting a 1-character symbol is
not very nice
adding opaque type boilerplate example file
adding correctness checking for the pattern-lambda benchmark
bugfix in int2str
2009-01-28 20:04:23 -05:00
|
|
|
(set! L (map-int (lambda (x) (map-int identity 20)) 20))
|
2009-06-27 19:07:22 -04:00
|
|
|
(time (dotimes (n 1000) (apply my-append L)))
|
2008-07-26 00:03:48 -04:00
|
|
|
|
2008-07-14 21:20:52 -04:00
|
|
|
(path.cwd "ast")
|
|
|
|
(princ "p-lambda: ")
|
|
|
|
(load "rpasses.lsp")
|
switching to scheme #t, #f, and () values
porting code to sort out which NILs are false and which are
empty lists
switching to scheme-style special forms. however you feel about
scheme names vs. CL names, using both is silly.
mostly switching to scheme predicate names, with compatibility
aliases for now. adding set-constant! to make this efficient.
adding null?, eqv?, assq, assv, assoc, memq, memv, member
adding 2-argument form of if
allowing else as final cond condition
looking for init file in same directory as executable, so flisp
can be started from anywhere
renaming T to FL_T, since exporting a 1-character symbol is
not very nice
adding opaque type boilerplate example file
adding correctness checking for the pattern-lambda benchmark
bugfix in int2str
2009-01-28 20:04:23 -05:00
|
|
|
(define *input* (load "datetimeR.lsp"))
|
|
|
|
(time (set! *output* (compile-ish *input*)))
|
2009-05-30 17:13:13 -04:00
|
|
|
(assert (equal? *output* (load "rpasses-out.lsp")))
|
2008-07-14 21:20:52 -04:00
|
|
|
(path.cwd "..")
|