Turmin
A Turing machine without a state table. Jumps on the symbol under the head do its work.
Ttulka, 2024 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 9 known programs · Test method
Run it
The idea
Ttulka made Turmin in 2024. The specification says it is neither a Turing machine nor a Minsky machine. It works on a Turing machine's tape, but instead of states it has numbered instructions and a conditional jump, as a Minsky machine has.
Read the story
There are no numbers and no output. A program leaves its answer on the tape. Numbers are written as tally marks, so 2 and 3 are || |||.
The machine
| Instruction | Does |
|---|---|
sS | Write the symbol S |
r l | Move the head right or left |
jSN | Jump to instruction N when the head reads S |
Instructions count from 0, and a jump to an instruction that does not exist halts the run. Every cell starts as a space. A / starts a comment up to a \ or the end of the line.
The input is the tape at the start, with the head on its first symbol. The output is the tape at the end, from the first to the last symbol that is not a space.
Example
The addition.
The addition. It finds the space between the numbers, fills it with a mark, and erases the last mark.
The Turing machine with two states. State 1 is instructions 0 to 3 and rewrites A to X until it reads a B.
The palindrome check eats the first and the last symbol while they agree. It writes 1 when nothing is left, and erases the tape when they differ.
The Fibonacci program in its compact form. The tape holds two numbers and a count, in this run 1, 2 and 3 steps. After the steps it holds 5 and 8.
Patterns it teaches
- Turing tarpit: four instructions on an unbounded tape.
- Tag systems: the specification turns a cyclic tag system into Turmin one production at a time.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from Turmin
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: turmin.
Command line
shib run turmin -e '/ S1
jB3 sX r jA0
/ S2
l' --input 'AAB'shib manual turminSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/turmin.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org