BrainFuck.Net

As part of their .Net initiative, Microsoft have created a VM which is not only platform independent (theoretically anyway) but also language independent. You can develop for .Net in VB.Net, C++ or C#, Microsoft's Java clone. Microsoft have commissioned several other people to port languages to the .Net platform.

However, in typical Microsoft style, they have totally overlooked one of the most important and useful languages! I speak, of course, of Brainfuck.

Brainfuck is designed to be one the most compact languages possible while still being turing complete. While brainfuck has only 8 commands, it is still theoretically possible to do anything in it that can be done in other languages. The 8 brainfuck commands are:

+ Increment value under pointer
- Decrement value under pointer
> Increment pointer
< Decrement pointer
[ Loop while value under pointer is nonzero
] End of loop
, Read character from input into pointer
. Output value under pointer to screen

To remedy this tragic oversight on the part of Microsoft, I have written a compiler to compile brainfuck code to the MSIL VM.

Newsflash! The Portable.Net compiler now includes a brainfuck frontend. Credit for this goes to Gopal.V. It generates the same code as my compiler does, although the source is from scratch.

Download

FAQ

Links


Simon Howard