Aviva Directory » Computers & Internet » Programming » Brainfuck

In this part of our computer programming language guide, we'll be focusing on a quirky language known as Brainfuck.

Brainfuck is an esoteric language created by Urban Müller in 1993, whose goal was to create the smallest possible compiler.

Brainfuck consists of only eight simple commands (+, -, <, >, [, ], ., and ,). It operates on a data pointer and an instruction pointer.

Despite its simplicity, Brainfuck is fully Turing complete, although its lack of abstraction makes writing practical programs cumbersome. The language is an example of a Turing tarpit in that it can be used to write any program, but it would be impractical to do so because the language provides so little abstraction that the programs would be very long and complicated. In other words, while the language features are simplistic, programs written in Brainfuck would be complicated.

For this reason, Brainfuck is a playful experiment rather than a practical tool, as it requires programmers to break down commands into microscopic steps. Its purpose is to amuse and challenge programmers. Nevertheless, enthusiasts have created Brainfuck interpreters, compilers, and even Brainfuck-based art or puzzles.

Its name reflects its complexity, as the term suggests something so complicated or unusual that it exceeds human understanding.

To avoid cultural sensitivities, aliases such as brainfsck, branflakes, brainfrick, and others are sometimes used.

Brainfuck is a minor variation of the P programming language created by Corrado Böhm in 1964, which was explicitly based on the Turing machine. Böhm's P language used six symbols, equivalent to Brainfuck commands, to compute any computable function.

Brainfuck stands in stark contrast to high-level languages such as Python, Java, and C++. While Python emphasizes readability and expressiveness, Brainfuck prioritizes minimalism. Brainfuck lacks loops, conditionals, and functions, making it challenging to write all but the most trivial programs.

Brainfuck is an unusual language that pushes the boundaries of what programming can be while technically being a legitimate programming language.

 

 

Recommended Resources


Search for Brainfuck on Google or Bing