Edit: I realised this works as a homage to Dennis Richie as well, as it's written in C. I did use glib for some support functions, other than that it's ANSI C.
It's not quite finished (and it's patterned after scheme rather than lisp, but that's close enough) but it runs the towers of Hanoi sucessfully. Lots of stuff still missing, tail call optimization, gc and a whole bunch of other must haves. There are likely lots of bugs too and things that don't work the way they should such as the '.
My understanding of the language is still patchy enough that it probably doesn't work in the way you expect it if you are a schemer.
One of these days I hope to do a proper job of finishing it (too much stuff to do) and do a write-up on it.
Writing this helped me tremendously in understanding the lisp family of languages.
Don't laugh too hard at the definition of >
Until I went through it, I'd mostly just played with Haskell for Project Euler and other small problems. That tutorial really helped get the feel for larger projects in the language.
But at the same time, it shows off some of the elegance of lisp. It's simple enough that you can implement it as a beginner tutorial, but the end result is a surprisingly solid language.
One of the beauties of lisp is how much is possible just from some simple building blocks. That tutorial did an excellent job displaying it from the side of a language implementer rather than a language user.
Thanks a ton for it, it was really a pleasure to use.
(I didn't run very far with it but here's my code if anyone is curious: https://github.com/samsonjs/elschemo/blob/master/lisp.hs)
Some time, it might be fun to write a Haskell interpreter in Scheme. :-) There're all sorts of cool challenges involving type inference there.
I never got macros to work :( Still, the basics like lambdas do work.
There's one of those blocks in the source of the page; be sure to check it out.
Here's mine: http://code.google.com/p/bobscheme/
Bob is a suite of implementations of the Scheme language in Python. It currently includes:
- A Scheme interpreter
- An implementation of a stack-based virtual machine called the "Bob VM"
- A compiler from Scheme to Bob VM bytecode
- A serializer and deserializer for Bob VM bytecode
- An alternative, functionally-equivalent implementation of the VM in C++ - BareVM
Tiny stackless lisp with continuations, written in Haskell.
~150 lines of interpreter, ~40 lines of parser.
I haven't personally worked on it per-se, but I've worked on the compiler, JIT, and GC for the language it's implemented it :)
https://github.com/manuel/ell (Lisp->C compiler)
https://github.com/manuel/schampignon (Kernel interpreter in JS)
It's been a while since I worked on it, but I think I might start again pretty soon.
Implemented in C++. Makes extensive use of C++ features and libraries to produce a lot of lisp in a small number of LOC. Includes exceptions, a full numeric tower (including unlimited-precision floats, courtesy of CLN), vectors and dictionaries (courtesy of the STL), and dynamic code loading (courtesy of dlopen). Uses the Boehm GC. Still buggy, not quite ready for prime time, but it does work.
It's an incomplete toy level Scheme subset with bugs, but it has HTML5 canvas support and some cute features like showing you the progress of the VM instead of hanging the browser, and call/cc. I'd like to finish it someday.
If it weren't for Lisp it would never have been so easy for total noobs like me to get into language hacking.
Initially started off as a toy implementation and eventually fleshed out into a pretty nice system, used in a production environment for several years as a DSL in a perl based system.
Arc-like names, python-like keyword args and indent-sensitivity.
I started this a few weeks ago after rereading sicp chapter 4 and realizing that it made more sense this time around.
Some of the most fun I've ever had with programming (though I haven't been doing it very long). Never got around to doing the cool stuff at the end of SICP though, I should really get on that...
Just a half-baked implementation of a simple Scheme in C.
There's also a new version I've been working on that's more R5RS compatible and will support compilation to x64_86:
RIP John ...
(CONS (QUOTE R) (LIST (QUOTE I) (QUOTE P)))
Previously, in C and to C, for the end of SICP: https://github.com/spacemanaki/lisp-in-c
Lisp in 3 stages: primitive data, composite data, composite functions.
My scheme implementation, written in C a year ago, just for fun. Took me a week or so, 942 C LoC.
From the README: "lexical scoping, Fixnum and floating point arithmetics, unhygienic macros, tail-call elimination, reentrant continuations, and automatic memory management (garbage collection)".
Just this week I got my first fork and a bunch of nice contributions.
unit tests: http://williambowers.net/projects/js-lisp/tests/
and for some face time with the repl: http://williambowers.net/projects/js-lisp/examples/repl/
R.I.P John McCarthy
Lambda calculus to PPC assembly.
Tiny lisp written in Prolog in exchange for some course credits.
An implementation try introducing arc style first-class macro.
In Haskell. Has partial application, but is otherwise terrible.