Brainf*ck - Weird Programming Languages #2

Page views: 0
Published on: 5/23/2026, 7:09:31 PM
Last editted on: 5/23/2026, 8:08:44 PM

Uhm... excuse my language. But you saw it right, a language called Brainf*ck actually exists - and it does exactly what it says, f...~ destroys your brain.

It is one of the most famous esoteric programming languages. Some might have heard it already, some might have not. I found it randomly while I was chatting in a nerdy Discord server. Brainf*ck is a Turing-complete language, meaning you can implement anything that most programming languages can. I thought so too, until I actually tried doing something with it.

It is next level! It fries your brain in ways you have never imagined.

There are ONLY 8 operators. That is all you got to work with! No variables, strings or any of that.

+-.,[]<> // these are all the operators supported

Anything else is ignored; or treated as comments

Despite there being only 8 operators, people has done projects that are next level! This language was never meant to be anything other than a meme language. Yet, there are insane people. Here are some of the work they have done

A teaser

Here's a few lines copied from the Brainfck to brainfck interpreter from the above examples - for those that are lazy to open a link.

[-]+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[-]<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<[>[-],>[-]+++++++++++++++++++++++++++++++++>>>[-]>>[-
]<<<<<<[->>>>+>>+<<<<<<]>>>>>>[-<<<<<<+>>>>>>]<[-]>[-]<<<<<[->>>>+>+<<<<<]>>>>>[
-<<<<<+>>>>>]<<<[-]+[[-]>>>[-]>[-]<<<[->>+>+<<<]>>>[-<<<+>>>]<[>[-]>[-]<<<[->>+>
+<<<]>>>[-<<<+>>>]<[<<<<[-]+>->->>[-]]<[-]]<<<]<[-]+>>>>[-]>[-]<<<[->>+>+<<<]>>>
[-<<<+>>>]<[<<<<[-]>>>>[-]][-]>[-]<<[->+>+<<]>>[-<<+>>]<[<<<<[-]>>>>[-]]<<<[-]>[
-]<<[->+>+<<]>>[-<<+>>]<[<<<<[-]>>>>[-]]<<[-]>[-]<<<[->>+>+<<<]>>>[-<<<+>>>]<[>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[-]<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[-]<<[->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

It's crazy... and beautiful! This is definitely the pinnacle of what the human brain can reach.

How to Brainf*ck

We have already learned there are 8 operators. It works a little similar to how a computer works internally.

Brainfuck operates on an array of memory cells, each initially set to zero. (In the original implementation, the array was 30,000 cells long, but this may not be part of the language specification; different sizes for the array length and cell size give different variants of the language). There is a pointer, initially pointing to the first memory cell.

  • (defintion from esolangs.org)
Command Description
+ Incrememnt the memory cell at the pointer
- Decrement the memory cell at the pointer
> Move the pointer to the right
< Move the pointer to the left
. Output the value (corresponding ASCII value) of the current cell
, Input a character and store it's ASCII value in the current cell
[ Enter if the current cell value is not 0, else skip to the matching ]
] Loop back to the matching [ if the current cell value is not 0. Exit the loop otherwise

Check esolangs.org for more detailed information about Brainf*ck

There are many options to run a Brainf*ck program. You could use an online compiler, or find an executable from Github. There's many. You could also try the interpreter and debugger I made with Assembly! It has a debugger interface inspired from GDB. Give it a try, can be useful to help you understand how it works too!

bfasm debugger interface (bfasm interpreter and debugger, created by me!)

Brainf*ck philosophy

It completely changes how you think, or approach a problem. If you don't adapt, it will f~ destroy your brain.

Brainfck is a really minimalist language. Brainfck forces to treat code as a piece of art, that has to be carefully constructed, extracting the maximum creativity out from a developer. There's no one way to approach a problem, as everything is determined by how creative you are, and how much you are willing to push. To program with Brainf*ck, a developer has to plan ahead. There are no control structures - no if's, no for loops. Everything has to be carefully architectured with numbers and operations on them.

Hello world!

Writing Hello world is easy, as all you have to do is incrementing or decrementing the pointer until the correct ASCII value is met.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. H
+++++++++++++++++++++++++++++. e
+++++++. l
. l
+++. o
-------------------------------------------------------------------------------. (space)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++. W
++++++++++++++++++++++++. o
+++. r
------. l
--------. d

That is rather long, so we can be creative, and use some math to make it shorter. The following example uses some sort of magic (sort of a multiplication) to make it shorter

>++++++++[<+++++++++>-] < .
>++[<+++++++++++++>-] < +++ .
+++++++ . .
+++ .
>++++++++[<---------->-] < +.
>+++++++++++[<+++++>-] < .
>++++++[<++++>-] < .
+++ .
------ .
-------- .

Usually, I'd include a Fibonacci series or palindrome checker alongside these - but Brainfu*k's verbosity makes that a space nightmare. Feel free to drop your own solution in the comments! I might add mine there too if I get around to it.

Here are some other Brainf*ck that me and some other people wrote. There are all sorts of things here, from basics to really advanced stuff - including arts! Check them out and get inspired

Conclusion

Brainf*ck is one of the most fun ways to challenge yourself with coding! One of the reasons for that is that it forces you to think differently. In this post, we discussed what kind of language it is, and why it is so weird, and how far it can be pushed!

Obviously this is not a tutorial. However, if you are planning to learn more about this language, I suggest you to check out https://esolangs.org/wiki/Brainfuck.

If you want to see more of this kind, feel free to check out this post, where I have listed out all the chapters of this series

Thanks for reading! See you soon with another chapter...

Replies

No replies yet

Create a reply