A Survey Of JavaScript Lisp Implementations

2011-07-10 00:38 +0000

Given that JavaScript¹ interpreters are so widely distributed and that web applications are used for so many things today, I thought it might be worthwhile to see what possibilities there are to use Lisp with or rather within JavaScript. Some people argue that JavaScript is just Lisp in C's clothing and I think this is true to some degree. But there are just so many details of the language which are plainly annoying that I am not inclined to use it unless I absolutely have to. Obviously, JavaScript also lacks macros and many of the nice features offered by an S-expression based syntax.

Criteria

So I have looked at all browser hosted Lisp systems I could find and evaluated them with regards to the following criteria:

Dialect

What Lisp dialect is it modeled after or is it a custom one? Note that I interpret dialects very broadly here, i.e. I consider systems that use defun, defvar, setq and defmacro as dialects of Common Lisp whereas systems that use define, set! and define-syntax as dialects of Scheme.

Build Dependencies

What software packages are needed in order to build programs? This only applies to compilers.

Runtime Dependencies

Are any additional libraries required at runtime? If so, how big are they? This is important to know because it influences loading times of websites. Note that I measured runtime dependency sizes as they are distributed by the upstream project, i.e. they may or may not have been minified so be sure to check that if it matters for you.

Compiler

Does the implementation provide a compiler?

Interpreter

Does it provide an interpreter? Note that I also count self-hosting compilers as interpreters in case they can be used at runtime.

Interoperability

Is it possible to interoperate with JavaScript from Lisp code? Can Lisp functions be passed to JavaScript functions as callbacks?

TCO

Does it implement Tail Call Optimization?

Continuations

Does it implement first class continuations?

Macros

Does it provide a macro system?

Hygiene

Does it provide a hygienic macro system?

Debugging

Is it (sensibly) possible to use existing browser based debuggers (e.g. Firebug) or are there custom debugging facilities?

Activity

What is the last year development activity has occurred in?

License

What's the code's license?

The Survey

I have created a tabular view of the result. It probably contains many errors still and I'm sure I didn't find all implementations out there. If you know of one that you'd like to see in this survey or would like to correct something feel free to modify the source data which is kept in an SXML document over at gitorious and notify me.


1
Yes, ECMAScript.