Quick Start

The Worst interpreter is still in development, and only obtainable from source.

  1. Clone the Worst interpreter repository and follow its setup instructions.

  2. Run ./worsti, which will drop you into an interactive session.

    • If you have rlwrap installed, use rlwrap ./worsti for a better experience.

  3. You may now read the rest of this document.

The Worst Interactive Shell

When you start worsti, you’ll be greeted by a prompt:

worst () >

From right to left:

  • > - A prompt marker.

  • () - The state of the stack; at the moment, it’s empty. The top is at the left.

  • worst - A firm, yet gentle reminder of what you’re dealing with.

Try putting some values in, and you’ll see them go on top of the stack:

worst () > 5
worst (5) > "hello" 3/6
worst (1/2 "hello" 5) >

Enter drop to discard the value at the top of the stack:

worst (1/2 "hello" 5) > drop
worst ("hello" 5) > drop drop
worst () >

Try some other functions, like swap and print:

worst () > "test\n" 123
worst (123 "test\n") > swap
worst ("test\n" 123) > print
worst (123) > drop
worst () >

There’s more; full documentation is coming soon. In the meantime, read the interpreter to see how the whole thing works. It includes source code for all built-in functions.