This aims to be a practical and robust (but not necessarily complete) implementation of The Kernel Programming Language in RPython. This should give us an optimizing JIT compiler almost for free (see Laurence Tratt's excellent article for more details.)
At the moment guarded continuations look like they're working. We also have the beginnings of a rudimentary command-line debugger.
- Clone the repo.
- Download the PyPy 4.0.0 source (other versions might work, but I'm only testing this one), unzip it in a sibling directory to the icbink repo, and build PyPy.
- Create a virtualenv with
virtualenv -p <the pypy path>/pypy/goal/pypy-c venv
- Add the pypy to the paths of the virtualenv:
echo <the pypy path> > venv/site-packages/pypy.pth
- Activate the virtualenv:
Now the various scripts should work. You should be able to build icbink with or without JIT, and/or run the tests.
Sources of inspiration/pilfering:
- Sam Tobin-Hochstad et al., pycket: Racket implementation in RPython
- Mariano Guerra's plang: another shot at Kernel in RPython
- John Shutt's SINK: scheme-based Kernel implementation
- Queinnec's Lisp in Small Pieces
- Andrés Navarro's Klisp: to my knowledge, the most mature and complete implementation to date.