On this page:
A Worst Interpreter

A Worst Interpreter

You are reading an interpreter for The Worst Programming Language.

It’s written in Typed Racket, but any language will work if you’d like to follow along. As you read on, you will encounter documentation and source code for the core procedures, built-in library functions, and command-line interface of a working Worst interpreter, in roughly that order. A single source file holds this text, the interpreter itself, and a handful of tests.

Reading this interpreter should hopefully give you a good understanding of how it works, and currently serves as the best source of documentation for Worst. If you’d rather just run it and have a poke around, check it out.

This is a work in progress; in particular, it could do with more tests. If there’s anything missing, or you see any other problems, please feel free to file an issue!

    1 Introduction

    2 Data structures

    3 Core operations

      3.1 Resolving functions

      3.2 Calling functions

      3.3 Figuring out what to run next

      3.4 Uplevel

    4 The End

      4.1 Tests

    5 Builtins

      5.1 Quote

      5.2 Uplevel

      5.3 Intermission: Utilities

      5.4 Execution

      5.5 Conditional execution

    6 Exceptions

    7 More builtins

      7.1 Context

      7.2 Definitions and builtins

      7.3 Using Racket code

    8 Reading code

    9 The entry point

    10 Invocation

    11 Program overview

    12 License