esolang

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

Expected: Hello World

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.

InstructionDoes
name = valueAssign a number, a string, a variable or a sum like i + j
+ - * /Arithmetic on whole numbers, with brackets
GOTO nJump to line n
GOIF n nameJump to line n if the variable is 0
INPUT nameRead a line into the variable
PRINT namePrint the variable and a line feed
ENDStop
@ textA 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.

Expected: hello

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.

Expected: 1 1 2 3 5 8 13 21 34 55

Further

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-framework

Source

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