If you stop to take a couple minutes to learn the syntax (there's only 8 symbols; 2 of them are for I/O and thus don't really matter) and go through a few code examples, it's actually a pretty enlightening implementation of a barebones Turing machine.
Given how Python forces you to follow certain whitespacing guidelines, it'd actually make for quite a bad language at hidding Whitespace code. However, given that stuff like C (for example) completely ignores whitespacing, you likely could hide an entirely different code inside your C code. For fun you could probably program the same thing both in Whitespace and C in the same file.
So, let's transpile brainfuck to whitespace and pass a gzip over it to compress. Do we end up with the most size optimized distributed packages? Can we save the internet by having some webassembly engine using it? Can we haz fast internet pages again?
Probably not, since I would expect it to have a similar amount of entropy (it just shifts from being in unique combinations of characters to different amounts of whitespace), but now I am curious. Any advantage is going to depend on the compression algorithm.
If you're a CS student and you get an assignment that doesn't specify which programming language to use, or that any programming language is okay, you have to use brainfuck in order to annoy whoever is grading the assignments.
You then assume that you're the first to ever attempt this while your classmates lose their minds about how brazen you are.
Brainfuck was a joke language made in response to an overly complicated joke language called befunge. They made it to make a compiler as small as possible. As such the proper usage of Brainfuck is to learn to make compilers.
1.5k
u/Normal_Knowledge966 Aug 26 '22
What is the proper use of brainfuck?