

Ask HN:  I want to build a Lisp-based VM?  Is it possible? Thoughts? - metaobject

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!
======
CyberFonic
Working through SICP is massive chore. Paul Graham's book is far easier, but
still heavy going.

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.

~~~
metaobject
Wow, thanks for the tips. I'll certainly investigate the Lisp Machine. I
played with newLISP a while ago and ended up writing a visualization tool for
a project at work. I'll revisit it. I think I'll look for a SICP group to help
keep me motivated to get through the book. I've never heard of losak, I'll
definitely check it out.

------
jerf
There's a difference between "VM" and "interpreter". I'd start with the
interpreter, then you'll know enough what to do next.

You 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.

~~~
metaobject
I have SICP (it's been on my shelf for a couple years - I'm sure I'm not the
only one). I started going through it while in school for my M.S. and working
full time. Needless to say I didn't get to dive deep. I've been through PCL,
ANSI CL (Graham). I just received Land of Lisp in the mail. I realize that
this book starts from the absolute beginning, and I'm contemplating jumping up
to the next level (SICP, On Lisp, or perhaps Let over Lambda - from my
understanding LOL should be tackled after On Lisp)). My problem is that I
catch myself programming in C in Lisp. I just need to make the transition to
thinking in terms of macros, closures, and building from the bottom up. I've
started doing this, but I have a loooong way to go for sure. Thanks for the
feedback! I don't have anyone to bounce ideas off of, and I'm so glad that a
forus like HN exists for people to interact, and talk about these kinds of
issues.

------
metaobject
If anyone would like to talk about a possible collaboration, let me know. It
would probably be impossible for a single person to do this (well).

