esolang

Esolang spec

Every program reads like the wiki page of an esolang, and the list of its commands is what runs.

None1, 2026 · Turing complete: yes · ●●○ moderate · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: Hello, world!

The idea

None1 made Esolang spec in 2026. A program reads like a page on esolangs.org. It names the esolang and its inventor, lists the memory the esolang has, and then gives each command with its behaviour. The header does nothing but has to be there. The commands section is the program, run from top to bottom, and the command names are the labels it jumps to.

The machine

Memory is any of a stack, a queue, an accumulator and a tape, all of whole numbers without bounds. Behaviours move values through a hidden number t.

BehaviourDoes
Take 5t becomes 5
Pop stack, Get value of accumulatort takes a value
Push it into queue, Store it in current cellA value takes t
Read an integer, Read a charactert reads input
Print it as an integer, Print "text"Output
Add accumulator by it, Multiply stack top by 3Change a value in place
If accumulator is nonzero, If stack is emptySkip the rest of the command when false
Jump to matching bGo to the command named b

Commas and "and" join behaviours into one command. Any "it" can be a number, which t takes first. Words are case-insensitive. The compiler to C++ tests the accumulator and the cell the wrong way round, so this implementation follows the table.

Example

The truth machine.

The truth machine. On 1 the last command jumps back to b forever, on 0 it falls off the end.

Expected: 0

A countdown from 3 in the accumulator.

Expected: 321

Patterns it teaches

  • Camouflage: the program is dressed as the page that would describe it.

Further

Queue-based

Pseudonatural

Write your own in Run Convert a program from Esolang spec

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: esolang-spec.

Command line

shib run esolang-spec -e 'h is an esolang invented by w.
==Memory==
This esolang has a stack.
==Commands==
* h: Print "Hello, world!"'
shib manual esolang-spec

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/esolang-spec.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org