Hacker News new | comments | show | ask | jobs | submit login
A Haskell monad that produces Brainfuck programs (joeyh.name)
36 points by mzehrer on Dec 23, 2014 | hide | past | web | favorite | 7 comments



A monadic generation of the grammar is interesting. It reminds me of the following submission to ICFP 2011; it was placed the 3rd place in the main contest.

https://github.com/tanakh/ICFP2011


"+[>[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<.---.+++++++..+++.[-]++++++++++++++++++++++++++++++++++++++++++++.------------.[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<.-------.++.++++++++.------.+++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<++++++.---------.[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<+++++++++++++++.----.[-]+++++++++++++++++++++++++++++++++.<]"


This is an infinite loop printing "hello, hacker news!", for the curious.


Brainfuck may be a bit of a silly use case, but we use similar approaches to e.g. manage database transaction boundaries in a safe way, while making higher-level functionality available.


that sounds interesting. Any blog explaining ?


Not that I'm aware of. I intend to write a post about it sooner or later.


Capitalization is important here. Downcase that "B" and the article would need to enumerate all Haskell programs. ;)




Applications are open for YC Winter 2019

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

Search: