Bootstappable Tarot Release

I am releasing a fully bootstrappable release of the Tarot scheme compiler today!

You can bootstrap it by first compiling the compiler by running it on the tinyscheme interpreter. This takes about 10 mins on a fast CPU. After that you can self host it in about 20 seconds.

You can read more about the internal works of this system here. If there are any aspects of the compiler that are unclear, you are very welcome to ask me about it!

(Note: It doesn’t implement any scheme specification. It’s just the parts of R5RS that I tend to use. No first class continuations. It doesn’t have hygienic macros.)

To give it a go you can get all the sources:

git clone
git clone
git clone
git clone
git clone

then run the scripts:

bash tarot-scripts/
bash tarot-scripts/
bash tarot-scripts/
bash tarot-scripts/
bash tarot-scripts/

You need tests to run the tests!

I hope it all works smoothly, if there are any issues tell me.

UPDATE Jan 2019.

tinyscheme suddenly stopped working. Some kind of GC error.

So I implemented a new tiny scheme interpreter and bootstrapped tarot off that!

UPDATE April 2019.

Further work making the single_cream based bootstrap smoother.


tarot is a scheme compiler
it is written in scheme (1917 lines)
it runs on top of a virtual machine
the virtual machine is written in C (2036 lines)
it can compile itself
it takes 14 seconds to self host

single_cream is a scheme interpreter
it is written in C (1705 lines)
it has supporting code and a standard library in scheme (691 lines)
it can run tarot
it takes 1 min 40 seconds to bootstrap tarot
it can run on top of linux or asmc,
it can execute minikanren, jbob and the tarot compiler.

$ wc -l tarot/src/*c
 1705 src/sch3.c
$ wc -l tarot/src/*scm
  221 src/init.scm
  358 src/preprocessor.scm
  112 src/std.scm
  691 total
$ linecount tarot-compiler/ '*.scm'
$ linecount tarot-vm '*.c'