Interactive Bootstraps

Learn low-level programming by bootstrapping your own language

Bootstrapping (verb)

An impossible task, comes from the saying “to pull oneself ub by one’s bootstraps”.

In computing, this refers to getting a compiler up and running, for a language, say LangA, which itself is written in LangA. Such compilers are called self-hosting, and getting the first compiler for LangA requires it to be written in a different language, to avoid the cyclic dependency.

This book was inspired by hearing about GNU MES (Maxwell’s Equations for Software) on the GNU Guile mailing list. It made me realise that writing your bootstrapping compiler can be fun, but it also made me realise that it is often arcane and opaque.

This is similar to how low-level programming is often arcane and opaque – because it isn’t as visible, and the payoff for doing anything is larger than higher-level and user-facing programming, say creating websites.

I aim to challenge both of these, by doing the bootstrapping in a maximally interactive way.

If you have enjoyed this, have suggestions, or want to talk about it, feel free to reach out by leaving a GitHub issue, or by my e-mail available on GitHub.

In case you aren’t reading this as the GitHub pages static site, head over to kovirobi.github.io/secret-chord.

If you are interested in hacking on this book, have a look at ./DEVELOPING.md.

  1. Introduction (3)

    A quick guide to understanding the rest of the book

  2. Numbers in detail (4)

    Or how the computer represents everything

  3. Going FORTH (4)

    Building a small interactive language