Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A Brainfuck to C transcompiler in Ruby (github.com/prophittcorey)
7 points by cpro on Aug 30, 2015 | hide | past | favorite | 4 comments



Interesting! I just read [1] this morning, which describes an optimizing BF compiler (written in Rust) that compiles to LLVM IR. The article also gives a good overview of optimization techniques used.

[1]: http://www.wilfred.me.uk/blog/2015/08/29/an-optimising-bf-co...

Edit: Just saw this was also discussed on HN: https://news.ycombinator.com/item?id=10141604


Thanks! It's an interesting article, it really takes the compiling to the next level.


Nice work; how about optimising the C output? Ten plusses in a row can be shortened to *p+=10 for example.


Thanks-- that's a good idea. I didn't think of optimization at all but that sounds like a fun step to take next.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: