
An esoteric programming language compiler on LLVM based on Brainfuck - 8ctocat
https://github.com/brain-labs/brain
======
shakna
LLVM seems like a huge dependency for something based around Brainfuck.

If I'm remembering correctly, the original Brainfuck interpreter was 250kb of
ASM.

~~~
csl
Brainfuck is simple enough that you could just write out the machine code
directly in memory. I think that would make a really good exercise.

I made one based on GNU Lightning to JIT. Even that can be considered a pretty
huge dependency:

[https://github.com/cslarsen/brainfuck-
jit](https://github.com/cslarsen/brainfuck-jit)

The interesting part is how slow a one-to-one translation of Brainfuck code to
machine code will run without any optimizations. That's where the speed comes
from, entirely based on those sweet optimizations. So writing one yourself is
a rite of passage, like writing a Mandelbrot renderer.

The above project, from the looks of it, looks quite mature, and therefore
interesting in its own right.

~~~
shakna
Nothing there I don't agree with.

I was more hoping someone might be able to shed light on why LLVM would be a
good fit for something that it looks like it might be overkill for. Might just
be it's what the authour/s are familiar with.

------
couchand
Why does this link to a fork that seems to be identical to the original? Would
the mods please update the link to the source: [https://github.com/brain-
labs/brain](https://github.com/brain-labs/brain)

