QSCM - A tiny bootstrapped Scheme

I am fascinated by systems that are self-sufficients, when I was a kid I wanted to make a lego car that would run by itself but the battery pack was too heavy for the engine that I had. Then I learned about computers, and I became interested in compilers, and more specifically bootstrapped compilers. These compilers are able to ingest their own source code and compile themselves. This page describes my first attempt at writing such a compiler.

As a target for my bootstrapped compiler, I chose C, it’s pretty high level, and if I can make the output of my compiler small enough I can probably have a nice entry for the IOCCC! To make the task non-trivial, we need a source language that is not simply a new syntax for C, we need a semantic gap that the compiler will bridge. A functional language is a natural thing to consider at this point, and if we want easy parsing, it is clear that what we need is something that is similar to Scheme.

https://c9x.me/qscm/

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

https://twitter.com/dev_talk/status/1352407138417704960

Share link for this tweet.