Skip to content
Archive of posts filed under the Lisp category.

Lisp Interpreter in JavaScript

>Lisp is becoming a theme here, apparently. I suppose I’ve read so many Paul Graham essays that I’m becoming a fan of the language. In order to become more familiar with it, I decided to write a Lisp interpreter in JavaScript. It’s not quite complete, and the semantics are definitely not entirely correct, but it’s at least usable. The page is even partially scripted in Lisp, and as I debug the interpreter and add more to it (such as loop constructs) I’ll convert more (and eventually all) of the JavaScript to Lisp. Once you browse to the page, view the source and scroll down until you see a <script type="text/lisp"> block.

I have only tested the interpreter in Firefox and Internet Explorer 6, so I’d like to know how it works in other browsers. If you want to look over the interpreter code, download it and play around with it. If you make any additions, changes, or corrections, I’d love to hear about them so I can incorporate them into the code.

Share

Lisp for C++ Templates

>I’m not working quite as many hours as I was earlier in the year, so I’m able to concentrate on more long-term projects of my own in addition to my regular work responsibilities. Before I get back to the Accelerated C++ Solutions I’m going to play around a little bit with extreme template meta-programming in C++. Toward this end, I am implementing Lisp primitives with C++ templates for manipulating typelists. So far I only have the primitives online, but I’ll hopefully have some examples of their usage up soon.

Share