Skip to main content
gamedev.net
🔒 Locked

LISP bytecode

Started by King of Men 3 replies 1.5k views
Original Post
King of Men
King of Men
So I have made a very basic LISP interpreter, that I'm happy with - at least for an exercise. Now, I'd like to see if I can grasp the next step, making a compiler to bytecode and a program that runs the bytecode. However, I'm a little blank on how to implement this; could someone point me at a tutorial or article to get started? My Google-fu has failed me, alas.
To win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.
King of Men
King of Men
No? OK, let me rephrase the question. Does anyone know of a good resource or tutorial for making any sort of virtual machine running bytecode, at all? If not I'll have to figure it out myself, and the result will be a slow, hacked-up mess. You don't want to unleash that on the world, do you? Don't come and say I didn't warn you!
To win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.
Icefox
Icefox
Look up a book called "Lisp In Small Pieces" by Christian Queinnec; I've found that it's one of the best guides there is to actually understanding how Lisps work under the hood. I believe it goes over various features such as interpretation, compiling to bytecode, basic optimization, and adding more advanced features like continuations (it's been a while though, so I may be wrong).

You might also want to look at the Scheme48 source; I've heard it's designed to be used for learning and experimenting with, so. Apart from that... google around, ask on the comp.lang.lisp newsgroup, stuff like that.
-----http://alopex.liLet's Program: http://youtube.com/user/icefox192
King of Men
King of Men
Thank you, gentlemen, I shall look into both suggestions. :)
To win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.