Skip to content
@tinyinterpreters

Tiny Interpreters

Learn how programming languages work, one tiny interpreter at a time.

Tiny Interpreters

Learn how programming languages work, one tiny interpreter at a time.

Hi, I'm Dwayne, and this is where you'll find the interpreters behind Tiny Interpreters. Each one is a small, complete interpreter written in Elm that grows out of the one before it. If you read them in order you get to watch a language take shape one idea at a time.

Explore the interpreters

The journey begins with CONST, an interpreter which takes a non-negative integer literal from source text to value. From there, each interpreter's description names the one it extends, so you can follow the language as it grows through the repositories.

Read the blog

Each interpreter comes with a blog post that walks through it in detail, and you'll find every post at blog.tinyinterpreters.dev.

Join the newsletter

Subscribe to hear about each new interpreter.

Pinned Loading

  1. diff diff Public

    DIFF extends CONST with difference expressions whose operands are themselves expressions, introducing recursion throughout the interpreter.

    Elm 1

  2. zero zero Public

    ZERO extends DIFF with the zero? predicate, Boolean values, and runtime type errors.

    Elm 1

  3. if if Public

    IF extends ZERO with conditional expressions, using Boolean values to choose which branch to evaluate.

    Elm 1

  4. var var Public

    VAR extends IF with variable expressions and environments, allowing programs to refer to values by name.

    Elm 1

  5. let let Public

    LET extends VAR with let expressions, allowing programs to introduce local bindings with their own scope.

    Elm 1

  6. fun fun Public

    FUN extends LET with first-class functions. Both dynamically and lexically scoped functions are explored.

    Elm 1

Repositories

Showing 10 of 11 repositories

Top languages

Loading…

Most used topics

Loading…