LearnReferenceCulture

Culture

Müller made brainfuck to get a small compiler and “moved on to other things”, in his words. The language “had served its purpose. Or so I thought” [1]. What happened next was done by other people, for their own reasons: the pleasure of a hard puzzle with simple rules, the sport of making programs as short as possible, and the wish to understand how computers work underneath.

Why people do this

A puzzle with a guaranteed answer

The README of 1993 ends its description with a dare: "Who can program anything useful with it? :)" [2] Because the language can compute anything computable (see Theory), every task has a solution. Finding it is the game. Mats Linander ends a long technical article on the subject with the plainest statement of the motive we found: "mucking around with brainfuck is just plain fun" [3].

Constraints

Taking nearly everything away makes ordinary things interesting again. Adding two numbers is a small invention. Printing a number in decimal is a real program. People who like sonnets or chess problems will know the feeling.

A way of thinking about computing

Michael Mateas and Nick Montfort, who studied such "weird languages" as an art form, put it this way: minimal languages "comment on the space of computation". They draw attention to how little structure a universal machine needs [4]. For them brainfuck is the model case: "an archetypically minimalist language".

Learning

The language is small enough to implement in an evening and real enough to be worth it. Müller: "you can write that one in half an hour" [1]. So it is a common first project for people learning how interpreters and compilers work. Eli Bendersky built a whole series on just-in-time compilation around it [5], and a brainfuck interpreter is one of the standard tasks in a widely used comparison of programming languages [6].

The author looks at all this with amused surprise. On an implementation of brainfuck inside the game Minecraft: "People are weird." On the programs: "these people scare me" [1].

Code golf: as short as possible

Code golf is the sport of solving a task in the fewest characters. Brainfuck is a natural course for it: programs are long by nature, so every saving counts, and the tricks are strange and deep.

The best-documented case is "Hello, World!". On the Code Golf site of Stack Exchange, the user primo posted a program of 78 commands in January 2016 and offered a standing reward to anyone who could beat it. In April 2018 the user KSab answered with 72, found by a search program written for the purpose [7]. Details are under Notable programs.

Other standing records:

Contests

Organised contests have been held since at least 1999, when the Hugi size-coding competition set the task of the smallest interpreter and received entries of 98, 100 and 102 bytes [11].

The community held its own. brainfuck.org keeps the results of several "Brainfuck Golf" contests (shortest program for a task such as sorting bytes), of a "Brainfuck Component Competition" and of a "Logical Brainfuck Competition", and photographs of a prize: an abacus with an inscription [12]. The Brainfuck Archive has a folder of golf results too [13].

A game: BF Joust

BF Joust turns the language into a fight. Two programs run at the same time on one tape of 10 to 30 cells, starting at opposite ends. Each guards a "flag" in its own first cell and wins by bringing the other's flag to zero or by making the other leave the tape. A match is played over every tape length. The game was invented by Kerim Aydin in a community that plays a game of changing rules, and it has a permanent tournament ("hill") run by a chat robot, to which anyone can send a program [14].

Obfuscation, and code as speech

A program in brainfuck is hard to read, and that is an attraction too. It stands in the tradition of obfuscated programming, which Mateas and Montfort discuss alongside weird languages [4].

Once it served an argument. David Touretzky of Carnegie Mellon University collected versions of a legally disputed program in as many forms as he could find, among them a version in brainfuck, to show that program code cannot be cleanly separated from other kinds of expression. The gallery describes the brainfuck exhibit as "a truly minimalist description of the algorithm" [15].

And there is a T-shirt. Müller wore one to his talk with a short brainfuck program on it. Run it and it prints "GEEK" [1].

Where the community lives

Places to find people and material, with what each is for.
PlaceWhat it is
The Esolang wikiThe shared notebook of the esoteric-languages community: conventions, algorithms, constants, implementations, derivatives. Free to edit; its content is in the public domain [16] [17]
The chat channel #esolangsA live chat on the Libera.Chat network, with public logs. It gives 9 December 2002 as its birthday and moved to its present home in 2021. The portal also lists other chat groups [18]
brainfuck.orgDaniel Cristofani's site: programs, a reference, advice to implementors, contest results, and the series "get good at brainfuck" [12] [19]
Code Golf Stack ExchangeA question-and-answer site for golf in every language. Home of the "Hello, World!" records [7] [18]
The Brainfuck ArchiveAn older file archive of programs, implementations and tools, collected by Jeff Johnston and kept by Panu Kalliokoski [13]
Frans Faase's pages and Brian Raiter's pageTwo long-standing personal collections: proofs, an interpreter in brainfuck, a tiny compiler, links [20] [21]

On this site the way in is Start here, which leads to Brainfuck basics, ten short lessons on the language. The playground, the challenges and the code patterns are for playing: write, practise, copy.

Limits

Read next

Notes and sources

Where a source is a community wiki or the author's own account, the entry or the text says so.

  1. Urban Müller, talk at Tamedia TX, 2017, read as the community transcript on the Esolang wiki: Tamedia TX 2017 transcript. The transcript says its last page is missing. Wikipedia gives the title as "Brainfuck, or how I learned to change the problem" and the date as 13 June 2017; we did not watch the recording. Opened 11 October 2026.
  2. Urban Müller, brainfuck-2.lha, Aminet, dev/lang, dated 9 June 1993: the package page on Aminet. We read the files in the archive: README, bfc.asm (the compiler), bfi.c (the interpreter) and the six example programs. Sizes and dates are those of the archive listing. Opened 11 October 2026.
  3. Mats Linander, "brainfuck optimization strategies", 7 January 2015: the article on calmerthanyouare.org. Opened 11 October 2026.
  4. Michael Mateas and Nick Montfort, "A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics", Proceedings of the 6th Digital Arts and Culture Conference, IT University of Copenhagen, 1 to 3 December 2005, pages 144 to 153: the paper on nickm.com (PDF). Opened 11 October 2026.
  5. Eli Bendersky, "Adventures in JIT compilation: Part 1, an interpreter", 20 March 2017: part 1 on eli.thegreenplace.net. Opened 11 October 2026.
  6. kostya, benchmarks: kostya/benchmarks on GitHub. Opened 11 October 2026.
  7. Code Golf Stack Exchange, answers to the "Hello, World!" challenge: the answer by KSab (27 April 2018, 72 bytes) and the answer by primo (3 January 2016, 78 bytes). Read through the Stack Exchange API. Opened 11 October 2026.
  8. Esolang wiki, "Brainfuck constants": the wiki's table of constants. Opened 11 October 2026.
  9. Daniel B Cristofani, dbfi.b: the self-interpreter on brainfuck.org. The count of 423 commands is ours, of the file without its closing comment. Opened 11 October 2026.
  10. Oleg Mazonka and Daniel B. Cristofani, "A Very Short Self-Interpreter", arXiv:cs/0311032, 21 November 2003: the abstract on arXiv. We read the abstract only. Opened 11 October 2026.
  11. Hugi Size Coding Competition, list of past competitions: the competition archive on hugi.scene.org. Competition 6 (1999) asked for a brainfuck interpreter. Opened 11 October 2026.
  12. Daniel B Cristofani, brainfuck.org: the main page. The page licenses his programs under Creative Commons Attribution-ShareAlike 4.0. Opened 11 October 2026.
  13. The Brainfuck Archive, maintained by Panu Kalliokoski, first collected by Jeff Johnston: the archive at esoteric.sange.fi and its README.txt. Opened 11 October 2026.
  14. Esolang wiki, "BF Joust": the wiki article on BF Joust. Opened 11 October 2026.
  15. David S. Touretzky, "Gallery of CSS Descramblers", Carnegie Mellon University: the gallery at cs.cmu.edu. Opened 11 October 2026.
  16. Esolang wiki, "Brainfuck": the wiki article on brainfuck. A community wiki; we use it for conventions and for its list of results, and name it where it is our only source. Opened 11 October 2026.
  17. Esolang wiki, "Brainfuck algorithms": the wiki's collection of algorithms. Opened 11 October 2026.
  18. Esolang wiki, "Community portal": the wiki's community portal. Opened 11 October 2026.
  19. Daniel B Cristofani, "get good at brainfuck": the series on brainfuck.org. Opened 11 October 2026.
  20. Frans Faase, "Brainf***": the brainfuck pages on iwriteiam.nl. Opened 11 October 2026.
  21. Brian Raiter, "Brainfuck: An Eight-Instruction Turing-Complete Programming Language": the brainfuck page on muppetlabs.com. Opened 11 October 2026.