Palaiologos

brainfuck

The hype.

Brainfuck is the most popular esoteric language out there. There have been made many CPU's, compilers, interpreters, tools, astounding projects and tiny snippets. Unlike the other esoteric languages (like Seed or Malbolge), Brainfuck is quite useful one, because it represents a Turing machine in very simple means, therefore it can be used as a theoretical tool for proofs.

My Brainfuck journey started back in 2016, when I discovered this bizzare language. I treated it as a funny tool (I've been still learning programming, I've gone thru JavaScript and C++ back then). Shortly after I made a Brainfuck IDE (convinced by other project of this type on the web), that is still available on Github. There have been three releases, while the third has been private, then lost, and at the end, forgotten.

The fascination didn't burn out. I've made a repository just to store my bits and pieces of code in esoteric languages on Github. I've been first interested in extending brainfuck, so a few virtual machines have been born by tweaking around Brainfuck by removing the useless pieces (and basically getting rid of the spirit at all).

Extending the language to do something easier, when the language has been meant to be hard, isn't very logical move. Around this time, I got interested in so-called code golf, a family of programming contests, that requires the code to be as small (in bytes!) as it's even possible. The programs looked bizzare and obfuscated. In the corelation with my growing interest in lower level programming (can you guess why?), bfos has been made, teaching me a few things about low level development.

Time is flowing. As a very broad and generic statement, I have became the weirdo. Friends suggested me some stupid ideas like maze solver in Brainfuck, and I made it. This is continuing to this day, when my friends laugh at something, and then see me taking this for real and doing it.

Boringness broken.

Aren't the brainfuck extensions and broad tools... unexciting? Summer 2017, the two-month holiday. I certainly do have too big amount of time on my hands, so asm2bf happened. The assembler, targeting Brainfuck. It's not a very big or intriguing project, because the code is just based around some common brainfuck algorithms wrapped around more salvageable syntax. Something failed anyway, so the compiler became very fragile because of my ambitious plan of bootstraping it straightaway. Another nail in the coffin was the fact, that asm2bf has been abadoned for next month, and when I came back to the code, it became a unsalvageable piece of crap, that I didn't know either how to maintain, or remember how to use.

o1:;
    if (r4 >= m[6]) goto o2;
o3:;
    r1 = m[m[7]];
    m[7]++;
    if (r1 != '\0') goto o3;
    r4++;
    goto o1;

After short investigation the inner workings have been revealed, and the code has been patched and made useful once again. Around April of 2019, I made a Subleq emulator in Brainfuck. The spree started, and more and more projects started popping up - JSON formatting webservice in Brainfuck, Lisp and Forth hybrid compiling to brainfuck (why?) and optimizing interpreters.

My recent projects.

My first project in each of languages started to be the interpreter - Elixir, Perl.

The final nail to the coffin in relation of me and Brainfuck was the creation of Izmit 3 - the complete, C89 to Brainfuck compiler, available online. After creation of C compiler, I just assumed there is nothing more for me to explore in Brainfuck, so I've moved on. Now, after all that time passed, after all the experiences from the past and present, I've retired from brainfuck. I loved this language. It put me the way I am now.

Opinion on Brainfuck from current point of view.

From a constructive point of view, Brainfuck is a turing tarpit, a very good theoretical model, B grade esoteric programming language (albeit it's been the first swallow in my little world) and good introduction to esoteric programming language world.

In my opinion, Brainfuck is quite a bit overhyped language. It's not very hard to program if you got the toolchain ready, but it doesn't quite matter, because it's easy to write even without some proper tooling onboard.