Ask HN: I want to build a Lisp-based VM? Is it possible? Thoughts?
I work full time, have a family, etc. BUT, I have a deep passion for programming, computer science, and especially Lisp. I've been programming off and on with Lisp for many years. However, I wouldn't consider myself an expert at all. What do you all think? Would a Lisp based VM be too slow? Perhaps it would repeat the JVM's path where it started out extremely slow, and progress until it's just slightly slow =). Ideas welcome! Talk amongst yourselves!
6 comments
[ 5.0 ms ] story [ 29.8 ms ] threadYou should consider doing this by working through SICP [1], which will have you writing a Scheme interpreter. There are places where you can collaborate on working through that book.
With all due respect, based on your description you've got some ground to cover before you should be inviting collaboration on such a substantial project. That's not to say you shouldn't cover it, it will certainly be a benefit to you in many ways, but you've got to build some cred first.
After the SICP you may also want to consider not starting from scratch. There are some VMs out there that you can work with that may provide better performance without you having to do the rather laborious and tedious task of some of the lower-level stuff. Either PyPy or LLVM might be decent targets.
Lisp VMs have been around since the 70's in various forms. The core is rather simple to implement. Unless you have a reason to start with a clean slate, you might be better off looking at some stuff that works well already. I have three suggestions:
1. picoLISP - the 64 bit version is well thought out and could give you ideas for your VM.
2. newLISP - whilst it's a bit different from Scheme and CL, it implements a complete Lisp ecosystem in a single executable. Runs equally well on all major platforms. I would give it serious consideration for bootstrapping.
3. http://losak.sourceforge.net/ - is one of several Lisp OS projects out there.
It might also help to read up on some Lisp Machine, etc history. Could spare you reinventing the square wheel.