EsoPy Framework
A kit for making esolangs, and the plain line-numbered language it makes when you change nothing.
ce2lo, 2024 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
ce2lo made the EsoPy Framework in 2024. It is a Python template with a lexer, an interpreter and a runner. Its user makes a new esolang by renaming the keywords and symbols in two tables. The specification shows one Fibonacci program three times. In the default syntax a line reads GOIF 12 counter, in the confusing one ??? 12 #, and in the verbose one ifZeroJumpTo 12 counter. The program runs the default language.
The machine
Each line is one instruction. Lines count from 1, comments and blank lines too, and jumps go to a line number.
| Instruction | Does |
|---|---|
name = value | Assign a number, a string, a variable or a sum like i + j |
+ - * / | Arithmetic on whole numbers, with brackets |
GOTO n | Jump to line n |
GOIF n name | Jump to line n if the variable is 0 |
INPUT name | Read a line into the variable |
PRINT name | Print the variable and a line feed |
END | Stop |
@ text | A comment line |
The specification does not say what / gives or what happens at the end of input. In this implementation / rounds down and INPUT ends the program when no line is left.
Example
The cat reads a line, prints it and jumps back to line 1, the comment, until the input runs out.
The cat reads a line, prints it and jumps back to line 1, the comment, until the input runs out.
The default Fibonacci prints as many numbers as the input says. Line 10 jumps to the END on line 12 once the counter reaches 0, and line 11 jumps back to the PRINT on line 5.
See also
Also in Turing tarpits
Write your own in Run Convert a program from EsoPy Framework
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: esopy-framework.
Command line
shib run esopy-framework -e '@ Simple Cat program
INPUT a
PRINT a
GOTO 1' --input 'hello
world
'shib manual esopy-frameworkSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/esopy-framework.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org