← Back to context

Comment by extraduder_ire

19 hours ago

There have been some other attempts to build compilers that output brainfuck.

This one supports some LLVM IR instructions: https://github.com/caozhanhao/llvm-brainfuck

There's a list of others here, with asm2bf seeming the most complete: https://esolangs.org/wiki/Brainfuck_code_generation

The operations generated for the DSL does cover most of the assembly instructions present in asm2bf on insoection. And goes further by supporting some math.h values by hardcoding them and making them more optimal.

Though the important distinction here is instructions there seem to be for integer types as the base and mine uses fixed point arithmetic by default.