esolang

fuck-brain

Brainfuck cut down to +, > and ., one to a line. Without < the tape is an accumulator.

None1, 2023 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: !

The idea

None1 made fuck-brain in 2023 as a subset of brainfuck. It keeps three of the eight commands, and two commands in a row need a line feed between them. Since the pointer can only move right, every cell it leaves is lost for good. The specification points out that this turns the tape into one accumulator, so the language runs in constant space.

Read the story

There are no loops and no input. A program runs straight through once and can only count up, clear and print. The Hello World is 1,108 lines long.

The machine

LineDoes
+Add 1 to the accumulator; 255 wraps to 0
>Set it to 0
.Print it as a byte

As the C interpreter on the specification reads a program, each command must be followed by a line feed, and the run stops with an error at the first one that is not. Any other character alone on a line does nothing.

Example

Thirty-three + make 33, and .

Thirty-three + make 33, and . prints it as !.

The Print line feed is ten + and a .. Its Hello World climbs to 72 for H, clears with >, climbs to 101 for e, and so on for all twelve characters.

The specification also translates the language into Weeeeeeeeeeeeeeeeeeeeeeeeeeeeee, where + becomes Infect person and . becomes Check number of infections.

Further

Esoteric subset

Write your own in Run Convert a program from fuck-brain

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: fuck-brain.

Command line

shib run fuck-brain -e '+
+
+
+
+
+
+
+
+
+
.
'
shib manual fuck-brain

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/fuck-brain.js

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

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