https://github.com/kanaka/miniMAL
A Lisp implemented in < 1 KB of JavaScript with macros, TCO, interop
and exception handling.
//--clip
miniMAL
A Clojure inspired Lisp implemented in less than 1024 bytes of
JavaScript.
Rationale
I originally started implementing a tiny Lisp interpreter as a quick
hack to submit to the 2015 JS1K competition (demo 2209). However, I
soon realized that I could fit far more functionality into 1024 bytes
of JavaScript than I expected and so miniMAL was born as a
"full-fledged" Lisp in its own right.
The design of miniMAL started with mal (a Clojure-insipred pedagogical
Lisp interpreter with implementations in over two dozen languages). And
in fact, in the miniMAL repository you can see the incremental steps to
build up the interpreter just like for each of the mal implementations.
However, the syntax and functionality of miniMAL is fairly different
from mal so it has become a standalone project.
Usage
There are several different ways to use miniMAL:
Start a REPL: run the miniMAL REPL (read-eval-print-loop). Requires
Node.js. ./miniMAL
Run a miniMAL program: run a miniMAL program and then exit. Requires
Node.js. ./miniMAL hello.json
As a shebang script: add a shebang line to the top of your miniMAL
program and turn it into an executable script. Requires Node.js.
//--clip
--
RS Wood <
r...@therandymon.com
Posting to comp.misc, sci.misc, and misc.news.internet.discuss.