Brainfuck is an esoteric programming language created in 1993 by Urban Muller. According to the esoteric-language community’s reference, Muller designed it “in an attempt to make a language for which he could write the smallest possible compiler” for the Amiga operating system, version 2.0, and he succeeded with a compiler of just 240 bytes. The extreme minimalism was the entire point: the language exists to be tiny, not to be pleasant.
The language has only eight instructions, each a single character, and every other character in a source file is treated as a comment. The program operates on an array of memory cells, each starting at zero, with a movable pointer. The instructions are greater-than and less-than to move the pointer right or left, plus and minus to increment or decrement the current cell, period and comma to output or input a single character, and the square brackets to form loops that run while the current cell is nonzero. That is the whole language.
Despite this spareness, Brainfuck is Turing complete, meaning it can in principle compute anything any other programming language can compute. This combination of a minimal instruction set with full computational power makes it a classic example of what is called a Turing tarpit: a system in which everything is possible but nothing of interest is easy. Writing even a simple program, such as one that prints “Hello, World!”, requires long sequences of these eight symbols and a great deal of patience.
Brainfuck became the most famous esoteric language of all, the example people reach for when they want to show how strange a programming language can be. Its profanity-laced name is part of its notoriety, and it has spawned countless variants and ports. It sits at the center of the esolang tradition and is closely related to code golf, where its compactness and the challenge of writing anything at all in it make it a recurring favorite.