Tttt
Brainfuck written with the letters a to j, where up is two and left is two.
Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Tttt uses ten letters on a tape of integer cells. The commands are uneven on purpose. a adds 2 but b takes away only 1, and c moves one cell right while d moves two cells left. An odd number needs an a and a b, and stepping one cell left takes dc. The letters k and l enclose comments.
The machine
| Letter | Does |
|---|---|
a b | Add 2, subtract 1 |
c d | Move right 1, move left 2 |
e | Print the cell as a character |
f | Print the cell as a number |
g | Print a newline |
h | Read a character into the cell |
i j | Loop while the cell is not 0, like [ and ] |
k ... l | Comment |
Example
The first is the truth machine.
The first is the truth machine. It builds 48 in a second cell, subtracts it from the input, and prints 0 once or 1 forever. The second adds 2 thirty-six times for H, then adds 2 seventeen times and takes 1 away for i.
Further
Ideas it shows
See also
Cell-based
Write your own in Run Convert a program from Tttt
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: tttt.
Command line
shib run tttt -e 'hchdcicbdcbjcifjf' --input '00'shib manual ttttSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/tttt.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org