అంతులేనిబైనరీలు
Brainfuck on bits, with a loop turned inside out and a forever loop that only } can end.
Turing complete: yes · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
The name is Telugu for endless binaries, pronounced /antulenibaɪnaɾilu/. The tape never ends and every cell holds 0 or 1. The specification names no author and no year.
Read the story
It keeps the flip, the moves and the loop of Boolfuck, so with its endless tape it is Turing complete. Then it adds two more loops. ( and ) are the loop turned inside out, skipping on 1 and repeating on 0 where [ and ] skip on 0 and repeat on 1. { starts a forever loop that runs to the end of the program and starts again, and } is the rare way out.
The machine
| Char | Does |
|---|---|
+ | Flip the bit under the pointer |
> < | Move right or left |
. | Print the bit as the character 0 or 1 |
, | Read a bit |
[ ] | Skip past ] on 0, go back to [ on 1 |
( ) | Skip past ) on 1, go back to ( on 0 |
{ | Start a forever loop, which comes back to its start at the end of the program |
} | Leave the innermost forever loop |
Every other character is a comment. The specification leaves the end of the input open. This implementation ends the run there, which is what lets the cat stop.
Example
The first is the Hello world, which prints 11111011111.
The first is the Hello world, which prints 11111011111. The cat has no }, so its forever loop reads and prints until the input runs out.
The last is the second truth machine. On 0 it prints 0, leaves the loop at }, flips the bit to 1 so that ) does not jump back, and stops. On 1 the ( jumps past ) to the end of the program, and the forever loop prints 1 again and again.
Patterns it teaches
- Turing tarpit: bits, a pointer and one loop are enough once the tape has no end.
See also
అంతులేనిబైనరీలు builds on Brainfuck.
Brainfuck derivatives
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: uc05-c02-c24-c41-c32-c47-c28-c3f-c2c-c48-c28-c30-c40-c32-c41.
Command line
shib run uc05-c02-c24-c41-c32-c47-c28-c3f-c2c-c48-c28-c30-c40-c32-c41 -e '{,.' --input '0110'shib manual uc05-c02-c24-c41-c32-c47-c28-c3f-c2c-c48-c28-c30-c40-c32-c41Source
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/uc05-c02-c24-c41-c32-c47-c28-c3f-c2c-c48-c28-c30-c40-c32-c41.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org