Hey folks, I'm the actual author of this.<p>I actually work on LLVM-proper during my day job. This was just a fun exercise to demonstrate that it was possible. I also have plans to write a tutorial based on it.
Nice work!<p>Let me make a tiny plug for a short Sunday project as well... Brainf*ck in Prolog:<p><a href="http://github.com/danieldk/brainfuck-pl/" rel="nofollow">http://github.com/danieldk/brainfuck-pl/</a><p>One nice thing is that unit testing is really simple:<p><a href="http://github.com/danieldk/brainfuck-pl/blob/master/unittests.pl" rel="nofollow">http://github.com/danieldk/brainfuck-pl/blob/master/unittest...</a><p>And for some very trivial outputs, it can generate the program to create that output.<p><pre><code> ?- brainfuck:interpret([A,B],[],[0],[0],[1,0]).
A = <,
B = + ?
</code></pre>
Ps. Yes, it's easy to improve generation...
I don't know... "neat hack", but it seems there is so much out there that could actually have some kind of practical application that it's a bit of a waste to work on "silly" projects. I love to hack on things that don't have any immediately evident business model or real world application, but I think purposefully working on something that never will is perhaps a bit unfortunate. Yeah, he learned something for sure, but that's pretty much all it can be.<p>To expand on that: if he'd written his own toy language, say, odds are it would never go anywhere, but, who knows... maybe it will find a niche. Using "brainfuck" pretty much guarantees that the code will never find a practical use.