Gotolang
One instruction a line, and every road goes through goto.
icitry, 2026 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 5 known programs · Test method
Run it
The idea
icitry made Gotolang in 2026 and wrote its interpreter in Rust. The specification says the only instruction is goto, plus a few more. There are no blocks, loops or functions. A loop is a label, a comparison and an if that jumps back, so a program reads like the assembly a compiler would make of it.
Read the story
Variables need no declaration. They hold signed 64-bit integers and start at 0. The showpiece is a brainfuck interpreter written in Gotolang, with 10 tape cells and programs of at most 29 commands, typed in as numbers. It is not the older GotoLang.
The machine
| Instruction | Does |
|---|---|
label name | Mark a place to jump to |
goto name | Jump there |
eq a b lt a b | Set the flag to whether a = b or a < b |
if name | Jump when the flag is true |
set x a add x a sub x a | Set x to a, add a to x, take a from x |
print a print "text" | Print a number or a string |
read x | Read an integer into x |
halt | Stop |
An operand is an integer or a variable. Only print takes a string, with escapes such as \n. A # starts a comment. Unknown labels, labels defined twice and malformed lines stop the program before it runs. The specification leaves overflow open, and numbers wrap at 64 bits.
Example
The count sets the flag with lt i 5.
The count sets the flag with lt i 5. While it is true, if body jumps into the body; once i reaches 5 the next line, goto done, leaves the loop.
The factorial has no multiplication to use, so its inner loop adds old to fact i times.
On 10 it prints 3628800. The prompt and the answer share a line, as print adds no line feed.
Patterns it teaches
- Counter machines; variables to add to and take from, a test and a jump are all a program needs.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from Gotolang
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: gotolang.
Command line
shib run gotolang -e 'print "Hello, World!"'shib manual gotolangSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/gotolang.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org