esolang

Hello Fuck!

Brainfuck where every cell holds a word, and the only two words are Hello and World.

None1 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: Hello World

The idea

None1 made Hello Fuck! as a brainfuck derivative whose tape holds strings. A cell can only ever be Hello or World, and every cell starts as Hello. So the tape is a tape of bits that happen to print as words, and printing a cell prints its word and a space. Hello World is three characters long.

Read the story

The specification notes that this is brainfuck with bit cells, Hello for 0 and World for 1, which makes it probably Turing complete. Input reads whole words and keeps only those two.

The machine

CommandDoes
*Swap the cell between Hello and World
> <Move the pointer
,Read a word; keep it if it is Hello or World
.Print the cell and a space
[Jump past the matching ] if the cell is Hello
]Jump back to the matching [ if the cell is World

Every other character does nothing.

Example

It prints the first cell, swaps it and prints it again.

It prints the first cell, swaps it and prints it again.

The truth machine reads one word. On Hello it skips the loop and prints Hello once; on World it prints World forever.

Expected: Hello

Patterns it teaches

  • Turing tarpit: brainfuck's commands on cells of one bit, spelled out as words.

Further

Also in Jokes

Write your own in Run Convert a program from Hello Fuck!

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run hello-fuck -e '.*.'
shib manual hello-fuck

Source

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

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

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