Cell
A row of numbered cells. Jump to any of them by its number, and set it in one go.
OsmineYT, 2019 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
OsmineYT made Cell in 2019, to make a Turing complete language first. It works like brainfuck, but a program does not have to walk to a cell. j5 jumps straight to cell 5, and a72 puts 72 in the cell at once, so the Hello, World! needs no loops at all. The two loop commands are by JonoCode9374.
The machine
| Command | Does |
|---|---|
j<n> | Jump to cell n |
n p | Go to the next or previous cell |
a<n> | Set the cell to n |
+ - | Add or take 1 |
. , | Print the cell as a character, or read one |
{ | If the cell is 0, go ahead to the next } |
} | If the cell is not 0, go back to the previous { |
The specification says the next } and the previous {, not the matching ones, so loops do not nest. There are 30,000 cells, as in the Python interpreter the specification links, and , gives 0 at the end of the input.
Example
The specification calls the second one a one-time cat.
The specification calls the second one a one-time cat. It reads one character and prints it.
A loop. Cell 1 holds 42, the code of *, and cell 0 counts down from 5.
Patterns it teaches
- Turing tarpit; brainfuck's tape, with a jump to any cell.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from Cell
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: cell.
Command line
shib run cell -e 'j0 , .' --input 'x'shib manual cellSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/cell.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org