
Ask HN: Compile to BF - shakna
I&#x27;m looking for a compiler that takes a more high-level language, and compiles to BF (I think HN will censor the name).<p>Background:<p>My Fun side project this year, is taking a bunch of Arduinos and hooking them together to create something similar to a computer.<p>To make it extensible, so I can keep adding and building it out into something nicer, I created a sort of extended BF, to be on the &quot;central&quot; Arduino, which all the others communicate via.<p>It has all the usual functions, except:<p><pre><code>    ,
</code></pre>
Read from selected pin<p><pre><code>    .
</code></pre>
Output to selected pin<p><pre><code>    (
</code></pre>
Move pin selection to the left<p><pre><code>    )
</code></pre>
Move pin selection to the right<p><pre><code>    0
</code></pre>
Reset the stack and pin selection.<p>This means that I can add and remove components as I like, so long as the core interpreter stays the same. Programs can even be bigger than the interpreter can read at once, so long as 0 doesn&#x27;t appear.<p>But BF sucks almost as much as ASM for hand-writing programs.<p>I don&#x27;t have a lot of experience with compilers, interpreters are more my thing because they&#x27;re so easy.<p>I was hoping something out there, that I haven&#x27;t managed to find, will be simple enough for me to adapt to the core interpreter for my device.
======
jetti
I'm not sure if anything exists like that but it would be an interesting
project to create a brainf*ck backend to LLVM, which would allow any language
to compile to BF

