
Let me see your Lisp implementation. Here's mine. - krig
https://github.com/krig/LISP
======
krig
It seemed appropriate to post this today. Did this while learning lisp about
two years ago. Nothing special, a pretty straight forward implementation of
the original LISP paper written while reading the paper, basically. It's
difficult to describe the feeling when it clicks and the eval function comes
together. All of the complexity of writing a language and an interpreter,
reduced to what is basically one function that fits in a page. That is mind
blowing.

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.

R.I.P.

------
jacquesm
Warts and all: <http://ww.com/ascheme.c.txt>

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 >

------
nostrademons
Two of them:

[http://jonathan.tang.name/files/scheme_in_48/tutorial/overvi...](http://jonathan.tang.name/files/scheme_in_48/tutorial/overview.html)

<http://jonathan.tang.name/files/arclite/>

~~~
adam-a
I remember seeing your tutorial before and thinking it looked like a great
exercise. Do you think it would be worthwhile for someone with a moderate
Haskell background who wants to learn some Scheme? Or is it best to go into it
the other way round?

~~~
nostrademons
I think it might be quicker to read some Scheme programs to get a feel for the
language. It's usually harder to understand exactly what a program is doing by
looking at the source code than it is to look at the output of the program and
figure out how it got there. (This is also why I always ask for demos and
changelist descriptions that explain the intent of the change when I do code
reviews at work.)

Some time, it might be fun to write a Haskell interpreter in Scheme. :-)
There're all sorts of cool challenges involving type inference there.

------
coffeeaddicted
Hm, not really sure if I really understood Lisp, but at least I tried once
implementing one which kinda worked (basically I was using it for ini-files
and it's coded in c++).
<http://www.michaelzeilfelder.de/bin/GrowTime/src/Lisp.h>
<http://www.michaelzeilfelder.de/bin/GrowTime/src/Lisp.cc>
<http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.h>
[http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.c...](http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.cc)
[http://www.michaelzeilfelder.de/bin/GrowTime/src/TestLispMai...](http://www.michaelzeilfelder.de/bin/GrowTime/src/TestLispMain.cc)

------
tikhonj
Here's mine, in JavaScript: <https://github.com/TikhonJelvis/js-scheme> Live
here: <http://inst.eecs.berkeley.edu/~tikhon/scheme>

I never got macros to work :( Still, the basics like lambdas do work.

The really cute bit is that it lets you include <script language="scheme">
blocks in your html and actually parses them. It even lets the scheme code
access JavaScript objects using some special syntax.

There's one of those blocks in the source of the page; be sure to check it
out.

------
eliben
Cool idea :-)

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

------
technomancy
Mine, uh, has the distinction of being the only one implemented entirely while
riding the bus: <https://github.com/technomancy/bus-scheme>

------
rictic
<https://github.com/rictic/twerp-h>

Tiny stackless lisp with continuations, written in Haskell.

~150 lines of interpreter, ~40 lines of parser.

------
kingkilr
<https://bitbucket.org/pypy/lang-scheme/>

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 :)

------
pwpwp
<https://github.com/manuel/edgelisp> (Lisp->JavaScript compiler)

<https://github.com/manuel/ell> (Lisp->C compiler)

<https://github.com/manuel/schampignon> (Kernel interpreter in JS)

------
Scriptor
<https://github.com/Scriptor/pharen> (Lisp -> PHP)

It's been a while since I worked on it, but I think I might start again pretty
soon.

------
lisper
<https://github.com/rongarret/Ciel>

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.

------
inimino
Here's mine in JavaScript, done as exercise 51 of Chapter 5 of SICP:
[http://boshi.inimino.org/3box/inimino/projects/SICP/chap_5/E...](http://boshi.inimino.org/3box/inimino/projects/SICP/chap_5/Ex51/src/test.html)

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.

------
jcoglan
Two variants of Scheme, with shared libraries:

<http://github.com/jcoglan/heist> <http://fargo.jcoglan.com>

If it weren't for Lisp it would never have been so easy for total noobs like
me to get into language hacking.

------
gyepi
<https://github.com/gyepisam/perl-lisp>

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.

------
akkartik
<http://github.com/akkartik/wart>

Arc-like names, python-like keyword args and indent-sensitivity.

------
yoklov
<https://gist.github.com/1311342>

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

------
sjs
<https://github.com/samsonjs/lake>

Just a half-baked implementation of a simple Scheme in C.

------
nakkaya
[http://nakkaya.com/2010/08/24/a-micro-manual-for-lisp-
implem...](http://nakkaya.com/2010/08/24/a-micro-manual-for-lisp-implemented-
in-c/)

------
Jasber
Port of Peter Norvig's Lispy to CoffeScript:
<https://github.com/bradjasper/lispy.coffee/>

------
bitsai
<https://github.com/bitsai/lisp-in-clojure>

------
fogus
<http://github.com/fogus/lithp>

------
syncopate
Peter Norvig's lispy ported to 800 lines of C:

<https://github.com/sck/clispy>

There's also a new version I've been working on that's more R5RS compatible
and will support compilation to x64_86:

<https://github.com/sck/ponzi>

RIP John ...

------
lclarkmichalek
I've been working on a MACLISP interpreter based on 80's manual I found on my
fathers bookshelf. It's quite fun working backward, and seeing how the dialect
influenced modern lisp.

------
shaunxcode
literally just wrote this last night and pushed it live this morning before
hearing the news. I had just changed my gmail status to "season of the lisp"
as I go through a seasonal fixation w/ lisp every year starting in october -
when an old colleague messaged me to inform me of his passing.

<https://github.com/ORDER-OF-NO/scphpeme>

(CONS (QUOTE R) (LIST (QUOTE I) (QUOTE P)))

------
GrooveStomp
Pretty warty implementation. You have to pass strings and their lengths to a C
function. Ah well, it's the intention that counts. :)

<https://github.com/GrooveStomp/SnakeEyes>

------
spacemanaki
I was currently working through "An incremental approach to compiler
construction" in Clojure, so this isn't done:
<https://github.com/spacemanaki/incremental-compiler>

Previously, in C and to C, for the end of SICP:
<https://github.com/spacemanaki/lisp-in-c>

------
mhewett
Lisp implemented in Java. Fairly complete set of datatypes and functions, but
no objects. Has been available for 10 years. <http://jatha.sourceforge.net/>

------
doelie_
<http://zwizwa.be/-/libprim/>

Lisp in 3 stages: primitive data, composite data, composite functions.

------
minopret
Mine is in Python with several usual and some less usual influences: John
McCarthy "Recursive Functions of..." by way of Paul Graham "The Roots of
Lisp"; Peter Norvig "(How to Write..." and tail recursion from his "(An ((Even
Better)..."; quoted-printable encoding of characters; Wikipedia & Knuth's
enthusiasm for the balanced ternary number base. I have gone a very short way
to start translating Lisp programs to Python code. Also I have gone a very
short way to do relevant proofs in Coq in the manner of Benjamin C. Pierce, et
al. "Software Foundations". My notions are to implement the Calculus of
Constructions in the simplified form found in Claudio S. Coen, "Mathematical
Libraries as Proof Assistant Environments", and natural deduction on top of
that. And a TR SECD machine. Oh, and algorithms from Artificial Intelligence:
A Modern Approach. And a pony... <http://github.com/minopret/minopret-lisp>

------
jsn
<https://github.com/jsn/sillyscheme>

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)".

------
AndresNavarro
A Kernel interpreter in C: <http://www.bitbucket.org/AndresNavarro/klisp>

Just this week I got my first fork and a bunch of nice contributions.

------
grouzen
This is mine implementation on C -> <https://github.com/grouzen/fflisp> I
wrote it after I read original LISP 1.5 book (%.

------
hasenj
Arc interpreter in coffee-script

<https://github.com/hasenj/jsarc/blob/master/arc.coffee>

------
willurd
js-lisp: <https://github.com/willurd/js-lisp>

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

------
groovy2shoes
<http://github.com/baguette/lemma>

------
antoinehersen
<https://github.com/antoinehersen/petitML>

Lambda calculus to PPC assembly.

------
lautis
<https://github.com/lautis/lisp-prolog/blob/master/lisp.pl>

Tiny lisp written in Prolog in exchange for some course credits.

------
leppie
<http://ironscheme.codeplex.com>

------
pabloPXL
A very cheap, still in progress implementation in js :)
<https://github.com/pabloPXL/jils>

------
wsxiaoys
<http://github.com/wsxiaoys/carc>

An implementation try introducing arc style first-class macro.

------
gredman
<https://bitbucket.org/gr3dman/lishp>

In Haskell. Has partial application, but is otherwise terrible.

------
pavelludiq
If only all the toy lisps were instead patches for sbcl, abcl, ccl, clisp,
clojure, racket, chicken or gambit...

~~~
wanorris
Implementing a tiny Lisp is an exercise in learning to be a better programmer
by teaching yourself how language implementations work. Creating a patch for
someone else's Lisp interpreter is not a reasonable substitute.

