DOSC TWiki snapshot as of mid-2005

Top

BrainFuck


Brain Fuck was created by "Urban Müller, whose goal was apparently to create a Turing-complete language for which he could write the smallest compiler ever...His compiler was 240 bytes in size"1

When talking about unreadable code (or code that you wrote but don't understand anymore...), how about this:

[[>]>[>]>>[>]+[<]<<[<]<[<]>[[>]>.[>]>>[>]<+[<]<<[<]<[<]>-]>[>]>>>>>.[<]<[<]>]
#The above line is the main, print ++> form and copy loop, I wrote it in a
#moment of lucidity straight out of my head, and I know what it does, but
#not exactly how it works any more.
(from 2)

So BrainFuck is a really neat but quirky and perverse computer language.

In fact, someone even wrote an implementation of DeCSS in BF: (see http://www-2.cs.cmu.edu/~dst/DeCSS/Gallery/css-brainfuck.txt )


[1] http://www.muppetlabs.com/~breadbox/bf/
[2] http://www.catseye.mb.ca/esoteric/bf/src/new/jb-quine.txt




RobinsonTryon - 16 Feb 2003