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
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.
| Order | Finds | Removes |
|---|---|---|
| 1 | matched [ ] | both brackets of every pair |
| 2 | other characters | all 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…
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
- Hostile design: the interpreter takes your program apart.
- Every text runs: there is no program it cannot answer.
Further
See also
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 errorfuckSource
- 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