My blog. Like it? Subscribe to my feed or check out the archives.

A brainfuck to assembly compiler 18 Jul 08

So this afternoon I wrote a brainfuck to x86/Linux assembly compiler in Python. You can check it out right here. Not a particularly taxing task but it was a fun diversion.

Here's "cat" in brainfuck: ,[.,] Short and sweet (and with the caveat it expects end-of-file as zero). It's probably one of the shortest useful programs you can construct with the language. Even "hello world" is a verbose beast.

Post a comment