A fast Lisp interpreter in Dart
oki-osk.jp
oki-osk.jp
$ curl -R -O http://www.oki-osk.jp/esc/dart/lisp/lisp-27-05-08.tar.bz2
$ tar xf lisp-27-05-08.tar.bz2
$ cd lisp-27-05-08
$ dart lisp.dart
> (dump)
(dotimes dolist while nconc last nreverse _nreverse assoc assq member memq listp
or mapcar and append _append letrec let when if equal /= <= >= > setcdr setcar
null = identity print consp not cdddr cddar cdadr cdaar caddr cadar caadr caaar
cddr cdar cadr caar defun defmacro *version* dump exit apply symbol-name intern
make-symbol gensym *gensym-counter* terpri princ prin1 truncate / - * + mod % <
eql numberp stringp length rplacd rplaca list eq atom cons cdr car)
>Is there a benchmark suite that could compare various Lisp implementations? Would be interesting to see their overall comparison...
One note on variable capture in Common Lisp; while it is true that a lisp-2 runs into the issues somewhat less often than a lisp-1, the existence of FLET and LABELS should let people know that it doesn't solve the problem.
The real solution to this in Common Lisp is packages.
(in-package foo)
(defun bar () (do-something))
(defmacro baz (x) `(bar ,x))
(in-package quux)
(flet ((bar () (do-something-else)))
(baz 2)) ; calls foo::bar not the bar bound in above FLET
Also, many people like that Common Lisp has two namespaces because there are many identifiers that are useful as both nouns and verbs (e.g. LIST).As for nouns and verbs, higher-order functions treat verbs (i.e. functions) as values (i.e. nouns). From the viewpoint of functional programming or lambda calculus, the distinction between them is not necessarily natural.
100 language cyclic quine relay.