BFT is a BrainFuck Transpiler. BFT translates brainfuck code to native (but ugly) D code during compile-time.
This translated code may also be executed at compile-time, but requires a heavy amount of memory for anything non-trivial.
- dmd, ldc or gdc
- A generous amount of memory.
import std.array;
import bft;
auto program = BFProgram!("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.", 7)();
auto outbuf = appender!(char[])();
program.execute("", outbuf);
assert(outbuf.data == "Hello World!\n");