Bring five readers who confirm their email and you get a month of the paper, free.

The paper is A$5 a month from day one. The Daily is free forever.

Eight glyphs and a tape

Brainfuck · Lesson 1

Eight glyphs and a tape

What Brainfuck is, and why anyone sat down to write it.

Lessons · Brainfuck · Lesson 1 of 10 · On the house

Eight glyphs and a tape

What Brainfuck is, and why anyone sat down to write it.

A newspaper still of a Brainfuck lesson
Lesson 1 is on the house. Eight commands. Everything else is a comment.

Here's the short version. Brainfuck is an esoteric programming language. Urban Müller published it in 1993, with a compiler small enough to be a dare. He named it to shock. We will say the name, then we will write. The joke is the size of the alphabet, not the insult.

There are eight commands. That is the whole language. A greater-than. A less-than. A plus. A minus. A dot. A comma. An opening bracket. A closing bracket. Any other character is ignored — a comment, a note in the margin, a letter to yourself.

The alphabet

+-<>.,[]
The whole vocabulary. Eight glyphs. You will live in these.

The machine underneath is simple on purpose. A long row of cells — a tape. A pointer that sits on one cell at a time. You change that cell, or you move the pointer, or you look at a cell and decide whether to loop. That is a program.

Quiz

How many commands does Brainfuck actually have?

Check

Type the eight glyphs in this order: plus, minus, greater-than, less-than, dot, comma, open bracket, close bracket. No spaces.

That's the door. Next time we sit with the tape itself, and we do not wave our hands at it.

Eight glyphs and a tape · Brainfuck — The Gold Standard