Interpriterlol
Designed to look dumb and feel dumb, yet Turing complete. Every decision is a goto to a computed line.
Zlfp, 2026 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Zlfp made Interpriterlol in 2026. It has variables, strings, lists and references, but no if, no loop, no and, no or and no not. What it has is goto(n), which goes to line n, counting from 0, and comparisons that give the numbers 1 and 0. So a program decides by doing arithmetic on line numbers. goto((x > 5) + 7) goes to line 8 if x is above 5 and to line 7 otherwise.
Read the story
The specification builds and, or and not the same way. Two conditions are both true when their average is 1, and at least one is true when the average is above 0. Less than or equal is spelled =<, to match >=.
The machine
| Statement | Does |
|---|---|
write(value) | Print a value and a line feed |
goto(n) | Go to line n; outside the program the run ends |
get(prompt) getnum(prompt) | Print the prompt, read a line as a string or a number |
name = value | Set a variable, or the one it refers to |
name = ~other | Make name a reference to other |
name ~= value | Set a reference variable itself |
The specification points to an interpreter on GitHub but does not show it. Its rule that goto takes a number without a fraction "or .0" points to Python, so numbers work as in Python. A number written with a point is a float and prints as 1.0.
Example
The truth machine.
The truth machine. Line 0 jumps to the start at line 3, and lines 1 and 2 are jumps kept for later. Line 4 goes to line 2 if the number is 0 or 1 and to line 1 otherwise, and on 0 line 7 picks line 8, which goes to line 10.
A reference. Setting b sets a, until ~= takes b back.
The FizzBuzz counts with i = 0.0, so it prints 1.0, 2.0, fizz, 4.0, buzz and on to 100.
Patterns it teaches
- Turing completeness: a computed goto and comparisons that are numbers are enough for every branch.
Further
See also
Also in Jokes
Write your own in Run Convert a program from Interpriterlol
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: interpriterlol.
Command line
shib run interpriterlol -e 'write("Hello, world!")'shib manual interpriterlolSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/interpriterlol.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org