esolang

ErrorFuck

Brainfuck with an interpreter that finds fault with every command and deletes it.

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

Tested with 3 known programs · Test method

Run it

Expected: Only idiots use +!!! -> ] Unmatched bracket.

The idea

None1 made ErrorFuck in 2023, after ErrorFull. It reads a brainfuck program and never runs it. Instead it complains about the loops, then about every other character, then about each of the six commands in turn, and removes whatever it complained about. Some of the complaints are nonsense on purpose.

Read the story

Every program ends in an error. The specification calls the language completely unusable for programming.

The machine

Each step prints its complaint, then -> and what is left of the program.

OrderFindsRemoves
1matched [ ]both brackets of every pair
2other charactersall but +-><,.[]
3 to 8+ - , . < >every one of them

A step with nothing to remove says nothing. What is left at the end can only be brackets without a partner, so the last line is Unmatched bracket., or, when nothing is left, the question why you gave it an empty program.

Example

The specification's own example feeds it the commented truth machine from the brainfuck article, and gets…
Expected: Loops in BF make your program unpredictable, please remove the loops and be predictable. -> . Using . is a sign of debugging, which in fact proves that you're stupid, so please don't use output. -> Are you crazy?! Why did you give me an empty program???

The specification's own example feeds it the commented truth machine from the brainfuck article, and gets 8 complaints. The comments go in the second step, and the last command to go is >.

Patterns it teaches

Further

ErrorFuck builds on Brainfuck.

Brainfuck derivatives

Write your own in Run Convert a program from ErrorFuck

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run errorfuck -e '+++++++++>>,<<->+++++<>+++>-<->>+++++>++++++++++<->-<<>>.<<>>-.'
shib manual errorfuck

Source

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

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

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