Ecliptica
Brainfuck whose loops never check anything. You leave them by breaking out.
Baldibacak, 2024 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Baldibacak made Ecliptica in 2024. It keeps brainfuck's tape and its + - < >, but its cells are signed 64-bit numbers and its loops are different. [ and ] loop for ever. The test moves inside, as ?x(...), which runs its parentheses only when the cell equals x, and t breaks out of the loop. So brainfuck's [->+<] becomes [->+<?0(t)].
Read the story
On top of that come a few conveniences. o prints a cell as a number, 'A' sets a cell to a character, p and P copy between the current cell and a numbered one, and x ends the program.
The machine
| Char | Does |
|---|---|
+ - < > | As in brainfuck, on 64-bit cells |
[ ] t | Loop for ever, break out of the loop |
?x(...) | Run the parentheses if the cell equals x |
i l | Read a byte, store how many input bytes are left |
O o | Print the cell as a character, as a number |
n | 0 if the cell is negative, else 1 |
px Px 'c' | Copy to cell x, copy from cell x, set to a character |
r x | Add 0 or 1 at random, end the program |
Example
The Hello World, brainfuck with ?0(t) at the end of each loop.
The Hello World, brainfuck with ?0(t) at the end of each loop.
The truth machine stops at once on a 0. On a 1 it loops printing the cell as a number, and the cell holds the character 1, so it prints 49 again and again.
Ideas it shows
See also
Ecliptica builds on Brainfuck.
Brainfuck derivatives
Cell-based
Write your own in Run Convert a program from Ecliptica
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: ecliptica.
Command line
shib run ecliptica -e 'i?48(x)?49([1o])' --input '0'shib manual eclipticaSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/ecliptica.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org