esolang

Heebolang

Brainfuck with the commands swapped for the punctuation that is easiest to mix up.

Polybagel, 2020 · Turing complete: with unbounded memory · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: 10 9 8 7 6 5 4 3 2 1 0

The idea

Polybagel made Heebolang in 2020, on a bored Sunday night, with one aim. It should be as hard to read and to write as possible. It works much like brainfuck, but the commands are characters that look alike. , moves right and . moves left. ; adds and : subtracts. A whole program is one line.

Read the story

The specification also gives it files and a small canvas to paint on. This implementation leaves those out.

The machine

Memory is 256 cells of whole numbers and a pointer that starts on the first.

CommandDoes
, .Move right or left
; :Add or subtract 1
=Read a line and keep the code of its first character
(Mark the start of a loop
)Go back to the mark, unless the cell is 0
` | Print the cell as a number, one to a line
-Print the cell as a character

The test comes at the end of the loop, so a loop always runs at least once. Left out are R and W, which read and write a file named in [ ], and &, @ and P{x|y}, which clear, show and paint the 15 by 30 canvas.

Example

The countdown.

The countdown. Ten ; make 10, and the loop takes 1 off and prints until the cell is 0.

Typing Hello World at = keeps only the H, and - prints it.

Expected: H

The first program, (;`) , counts 1, 2, 3 and on. Its cell would only come back to 0 after 4,294,967,296 counts, when the 32-bit number wraps.

Patterns it teaches

Further

Cell-based

Write your own in Run Convert a program from Heebolang

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: heebolang.

Command line

shib run heebolang -e '=' --input 'Hello World
'
shib manual heebolang

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/heebolang.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org