I used McCarthy definition of LISP in LISP to implement my first LISP Interpreter in C++. I just written in C++ following functions: car, cdr, cons, cond. Then I translated line by line eval and apply function into C++.
All the rest functions were implemented in LISP itself.
EDIT: I also implemented simple mark-and-sweep garbage collector - otherwise you will be running out of memory pretty quick.
This is also how the first ever Lisp implementation was made.
Supposedly, McCarthy had never intended his definitions of EVAL and APPLY -- not in this "micro-manual", but in his original Lisp paper -- to be actually implemented. Some guy called S R Russell (I imagine him as a graduate student but have never checked) looked at the paper and thought "wait, we can type this code in, write a bit of supporting code, and get an actual Lisp implementation", and so history was made.
Yeah, Steve Russell was a graduate student. Also, this is what McCarthy said during an interview:
Steve Russell said, look, why don't I program this eval..., and I said to him, ho, ho, you're confusing theory with practice, this eval is intended for reading, not for computing. But he went ahead and did it. That is, he compiled the eval in my paper into [IBM] 704 machine code, fixing bugs, and then advertised this as a Lisp interpreter, which it certainly was. So at that point Lisp had essentially the form that it has today....
It gets even better. Steve Russell went on to write the very first video game (http://en.wikipedia.org/wiki/Spacewar!). I'd really like to know what else he did, and what he's doing now. The guy is a hero.
Super! It's been my dream for over a year now to grok lisp sufficiently that I can do that. Still not there yet, but not giving up. I'm a slow learner. People like Patrick Collison impress the hell out of me for doing such stuff apparently effortless.
Unfortunately not. It was my diploma project in 1994. It was called: "LISP Interpreter with IDE for Windows".
It was implemented using Borland C++. And LISP interpreter was just a small part of the project. The rest was building Borland C++ inspired IDE for Windows, for which I also implemented my own GUI C++ class library on top of Win32 API.
I still have code printed in the hardcopy (which was requirement of my college), but floppy disks with the source code didn't survived ;)
I've used McCarthy Lisp as a code kata for a few years now. It's small enough to do in < 1 week (maybe a weekend if you have more time than me), is well known, and damn fun. I am currently learning Ruby using this kata: http://github.com/fogus/lithp
It's totally ridiculous that such content is only available behind paywalls. I'm in 'lisp research' mode again, and I ran in to this, figured others might want to read it.
You can often find the papers by searching on either CiteSeer (http://citeseerx.ist.psu.edu/) or Google Scholar. On the latter, click "All X versions" - there are often copies on authors' faculty pages, for example, before the ACM took something free and locked it up.
Sometimes, you can also go to a local university, open up your laptop in a cafeteria (or library), search for any open wireless network, and bypass those paywalls completely.
I have a wonderful one just across the street from home. With a Pringles can I could do it from my bedrom ;-)
> Sometimes, you can also go to a local university, open up your laptop in a cafeteria (or library), search for any open wireless network, and bypass those paywalls completely.
I think it's important to realise that, if you are opposed (as mahmud (http://news.ycombinator.com/item?id=1591586) is, for example) to paying for this content, that you are not bypassing the paywalls, but, rather, taking advantage of the university's having already paid its way through them.
(To be clear, I think that it's a perfectly reasonable thing to do; just that it's important to realise that nothing is being ‘bypassed’ per se. I also think you're very lucky to be near a university with an open network—all that I know now require authentication.)
A meta-circular evaluator is a special case of a self-interpreter in which the existing facilities of the parent interpreter are directly applied to the source code being interpreted, without any need for additional implementation. Meta-circular evaluation is most common in the context of homoiconic languages.
The idea goes back at least to the definition of Lisp 1.5 (1961) by John McCarthy[1]. He describes the evaluation rules of Lisp as a Lisp program.
I built a Lisp over a weekend some 20 years ago - 1989 I think - following the instructions and methods in Henderson's book.
Google for LispKit and you'll find out probably as much as I knew back then. I read the book during the week, then implemented it all in about 24 hours over Saturday and Sunday. Run first time.
At least for me, when either using one of the lightweight PDF-viewers or using Chrome's built-in PDF viewer (absolutely fantastic, very fast and smooth).
EDIT: I also implemented simple mark-and-sweep garbage collector - otherwise you will be running out of memory pretty quick.