esolang

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

Expected: Hello, World!

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

CharDoes
+ - < >As in brainfuck, on 64-bit cells
[ ] tLoop for ever, break out of the loop
?x(...)Run the parentheses if the cell equals x
i lRead a byte, store how many input bytes are left
O oPrint the cell as a character, as a number
n0 if the cell is negative, else 1
px Px 'c'Copy to cell x, copy from cell x, set to a character
r xAdd 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.

Further

Ideas it shows

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 ecliptica

Source

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