get good at brainfuck

The brainfuck language conceals its heart like an artichoke. It was put forth as a joke, and its code is notoriously opaque, so people play with brainfuck briefly and drop it before becoming proficient. I'd like to help people get their teeth into it.

I've written some rather abstract advice over the years; now I want to try another approach. I'm presenting a series of some of my most interesting programs, with detailed commentary. I'll note many of my mistakes. I hope this will be illuminating for anyone who's interested in brainfuck or wants to improve their skills.

This series assumes basic knowledge of the brainfuck language; it should hopefully be accessible to anyone who can figure out programs at this level:

These examples build on each other some; I suggest reading at least parts 1 and 2 before skipping ahead to whatever's most interesting.

This project is in a rough and unfinished state. Please let me know which parts could be clearer or more helpful, or any other suggestions or questions. Email feedback to (my first name) at brainfuck dot org.

Prefatory notes:

These are (currently) plain text files. They're best read on something wider than a phone screen, and in a monospaced font.

Because brainfuck is not self-documenting at all (not even naming or numbering variables), the code needs supplementing with maps of the state of memory at different times. Visualizers can be helpful, but maps you write yourself can be more meaningful and more flexible. I make a bunch of them when writing programs or reading other people's. For the programs in this series, I'm providing overview maps showing the general arrangement of data in memory, but I would strongly suggest you map for yourself the way the data moves and changes over time.

Thanks for reading, and good luck! Let me know how it goes.

1: Fibonacci numbers
2: rule 30 random number generator
3: brainfuck interpreter
4: e
5: Quicksort
6: factorials
7: golden ratio
8: Tic-tac-toe
9: Life