...
Three symbols read two at a time, and cells that remember what they do.
randomIdiot · Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
randomIdiot made ... out of three symbols, the full stop, the colon and the space. The program is cut into blocks of two characters, and six of the nine possible blocks are commands. The cells are brainfuck's with one change. Besides its value each cell keeps an action, output or input, and one command runs whatever action the cell holds. The specification calls every cell an executable program.
Read the story
There are no loops, so a program runs once from start to end.
The machine
| Block | Does |
|---|---|
.: | Add 1 to the cell |
:. | Take 1 from the cell |
.. | Switch the cell between output and input |
:: | Run the cell's action |
. | Move to the next cell |
. | Move to the cell before |
A cell starts at 0 with the output action. Output prints the cell as a byte, and input reads one byte into it. Cells wrap at 256. Any other block stops the run with an error, as in the specification's Common Lisp, and so does a line break. Reading past the end of the input stops the run with an error, as it does in the Common Lisp.
Example
The cat switches the first cell to input, runs it, switches it back to output and runs it again.
The cat switches the first cell to input, runs it, switches it back to output and runs it again. It copies one character, so it prints only the c.
Thirty-three .: count the cell up to 33, the code of the exclamation mark, and :: prints it.
Patterns it teaches
- Encoding tricks: six commands spelled with three symbols, two at a time.
Further
See also
Cell-based
Write your own in Run Convert a program from ...
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: u2e-2e-2e.
Command line
shib run u2e-2e-2e -e '..::..::' --input 'a'shib manual u2e-2e-2eSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/u2e-2e-2e.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org