# Brainfuck

> esoteric, minimalist programming language

**Wikidata**: [Q244627](https://www.wikidata.org/wiki/Q244627)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Brainfuck)  
**Source**: https://4ort.xyz/entity/brainfuck

## Summary
Brainfuck is an esoteric, minimalist programming language designed to be extremely simple in structure but challenging to use. Created in 1993 by Swiss computer scientist Urban Müller, it consists of only eight commands, making it a classic example of a Turing tarpit—a language that is theoretically powerful but impractical for most tasks.

## Key Facts
- **Created in 1993** by Urban Müller, a Swiss computer scientist.
- **Minimalist design**: Uses only **8 commands** (`><+-.,[]`), making it one of the simplest programming languages.
- **Classified as** an esoteric programming language and a Turing tarpit.
- **Influenced by** P′′ (a 1964 primitive language) and the UNIX utility `false`.
- **File extensions**: `.b` and `.bf`.
- **Notable implementations**: Includes `ed.bf` (a text editor) and `os.bf` (an operating system written in Brainfuck).
- **Aliases**: Also known as BF, Ook!, or other stylized variants (e.g., Brainf**k).
- **Official website**: [brainfuck.org](https://brainfuck.org/).

## FAQs
### Q: Who created Brainfuck?
A: Brainfuck was created in 1993 by **Urban Müller**, a Swiss computer scientist.

### Q: What makes Brainfuck unique?
A: It is one of the most minimalist programming languages, using only **8 commands**, yet it is Turing-complete, meaning it can compute anything computable given enough time and memory.

### Q: Is Brainfuck used for real-world programming?
A: No, Brainfuck is an **esoteric language** designed for theoretical interest rather than practical use. It is intentionally difficult to read and write.

### Q: What are some examples of Brainfuck programs?
A: A simple "Hello World" program in Brainfuck is notoriously complex, but examples can be found on its [Wikimedia page](https://commons.wikimedia.org/wiki/Special:FilePath/Hello_World_Brainfuck.png).

### Q: Are there other languages like Brainfuck?
A: Yes, it is part of a family of esoteric languages, including **P′′** (its predecessor) and **Ook!**, a Brainfuck derivative with a different syntax.

## Why It Matters
Brainfuck serves as a thought experiment in computational theory, demonstrating how a language can be both **Turing-complete** (capable of universal computation) and **extremely minimalist**. While impractical for real-world applications, it challenges programmers to think differently about code structure and efficiency. Its influence extends to the broader field of esoteric programming, inspiring other languages and serving as a benchmark for simplicity in design. Additionally, Brainfuck has been used in academic settings to teach concepts like **Turing completeness** and **compiler design**, proving that even "useless" languages can have educational value.

## Notable For
- **Minimalism**: One of the simplest Turing-complete languages, with only 8 commands.
- **Turing tarpit**: A prime example of a language that is theoretically powerful but intentionally difficult to use.
- **Cultural impact**: Inspired numerous esoteric languages and remains a popular challenge among programmers.
- **Unconventional implementations**: Used to create a **text editor (`ed.bf`)** and even an **operating system (`os.bf`)**.
- **Educational tool**: Often used to demonstrate fundamental computing concepts in an extreme, stripped-down form.

## Body
### Origins and Creation
Brainfuck was developed in **1993** by **Urban Müller**, a Swiss computer scientist. It was designed as an experiment in minimalism, pushing the boundaries of how simple a programming language could be while remaining Turing-complete. The language draws inspiration from **P′′**, a 1964 primitive language, and the UNIX utility `false`.

### Language Design
Brainfuck consists of **eight commands**:
- `>` and `<`: Move the data pointer right or left.
- `+` and `-`: Increment or decrement the byte at the data pointer.
- `.` and `,`: Output the byte at the data pointer or accept one byte of input.
- `[` and `]`: Jump past the matching bracket if the byte at the data pointer is zero (or jump back if it is nonzero).

Despite its simplicity, Brainfuck is **Turing-complete**, meaning it can compute any algorithm given enough resources.

### Applications and Implementations
While not practical for most tasks, Brainfuck has been used to create:
- **ed.bf**: A line-oriented text editor written entirely in Brainfuck.
- **os.bf**: An experimental operating system written in Brainfuck.
- **Ook!**: A derivative language that replaces Brainfuck’s symbols with words like "Ook" for humor.

### Community and Influence
Brainfuck has a dedicated following in the **esoteric programming** community. It is frequently discussed on platforms like:
- **Subreddit**: [r/brainfuck](https://www.reddit.com/r/brainfuck/) (created in 2009).
- **Stack Exchange**: [brainfuck tag](https://stackoverflow.com/tags/brainfuck) on Stack Overflow.
- **Esolang Wiki**: [Brainfuck page](https://esolangs.org/wiki/Brainfuck).

### Technical Details
- **File formats**: Uses `.b` and `.bf` extensions.
- **Paradigm**: Imperative and esoteric programming.
- **Dialect**: Considered a dialect of **P′′**.
- **Notable variants**: Ook! replaces commands with playful syntax (e.g., "Ook. Ook?").

## Schema Markup
```json
{
  "@context": "https://schema.org",
  "@type": "Thing",
  "name": "Brainfuck",
  "description": "An esoteric, minimalist programming language created in 1993 by Urban Müller, consisting of only eight commands.",
  "url": "https://brainfuck.org/",
  "sameAs": [
    "https://www.wikidata.org/wiki/Q18897",
    "https://en.wikipedia.org/wiki/Brainfuck"
  ],
  "additionalType": "https://www.wikidata.org/wiki/Q18897"
}

## References

1. Freebase Data Dumps. 2013
2. [Source](https://esolangs.org/wiki/Brainfuck)