Compiler C to Brainfuck (for harassing a professor)?

Sevenless picture Sevenless · Feb 26, 2011 · Viewed 10.3k times · Source

A professor of mine has said he'll accept homework assignments in any language we'd care to use. I'm on good enough terms that I'd like to mess with him a bit and submit a valid homework assignment using brainfuck, whitespace, or some equally "useful" language.

I have the C-sources for a few simple numerical analysis routines as well as the compiled output and the assembly files they generate.

Does anyone know of a decompiler (or a C->brainfuck translator) that could give me something akin to the "brainfuck source code"?

Answer

user166390 picture user166390 · Feb 26, 2011

Just use APL or J.

Unlike BF, they were actually designed to serve a "useful" (and not a "useful as in BF" sense) purpose - and yet can easily make Perl code-golf entries look like novels. (The dedication and mental training to enjoy these languages is currently more than my skill/effort levels.)

If the goal is using a purely esoteric language, I have always enjoyed the look of Piet programs. It looks prettier and is actually able to solve common CS homework problems. Following the links will reveal "Piet assemblers" and other tools. Win.

Happy coding.