Wednesday, October 26, 2011


  Recently I've been teaching myself lisp-- so far it seems like a very creative language, which I like, as I view creativity as one of the most important skills for a programmer to have.

 There are like a million different versions of lisp it seems and no single standard implementation.

 And for whatever reason I decided to write yet another...

 My lisp compiles to Lua, I figured that LuaJIT2 is the fastest dynamic language VM around, so targeting it should allow my Lisp implementation to perform better than most. I had no experience with Lisp prior to this, but I certainly learned lisp fairly well while writing a compiler for it-- also improved my Lua.

 It is somewhat different from the lisp norm in that it does not use lists and cons cells, instead I use a Lua table in array form.  No named arguments either, although you can fake them just as you would in Lua.  I also use { to introduce raw Lua code, and } to return to Lisp.

 Still have to implement most of the library functions that come with most lisp implementations, and I'm sure I'll have to fix a few bugs in the compiler yet, but it is working, including support for macros.

 I also saw that the creator of Lisp, John McCarthy, died a few days ago:(

No comments:

Post a Comment