SLip — a Lisp system in JavaScript
This is a Lisp system in JavaScript, the goal being to be able to run Lisp in a browser.
Update: the project has been renamed SLip, but I didn't redo the screencast. If you want to follow the steps in the demo, you now need to type "SL" (that's the main package name) instead of "SS".
Features
- Self-hosting compiler
- Lexical and dynamic variables
-
tagbody
/go
,throw
/catch
,block
/return
,unwind-protect
- Scheme-like first-class continuations (not to be used with unwind-protect though)
- Separate function/variable namespace (that might be a “misfeature”, depending how you look at it).
- Tail call optimization
- Common Lisp-like package system
- Tons of primitive functions
loop
,format
and a pretty printer- A simple “foreign function interface” for writing functions in JavaScript
- Most basic datatypes are unboxed—strings, numbers, arrays, regexps—so they can be freely passed around to JavaScript functions
- Literal regexps (seriously)
- Simple scheduler to emulate threads
- Contains a port of TinyCLOS object system (it's slow)
- Condition system based on TinyCLOS (handler-bind and handler-case)
- Very basic error detection (warns about undefined functions/variables; runtime type checking in primitives and VM instructions)
- An in-browser development environment inspired by Emacs and SLIME (based on Ymacs).