6 ms·
A Haskell monad that produces Brainfuck programs
- lifthrasiir 12y agoA 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 https://github.com/tanakh/ICFP2011
- lmm 12y agoBrainfuck 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.
- deleted 12y ago[deleted]
- joeyh 12y ago"+[>[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<.---.+++++++..+++.[-]++++++++++++++++++++++++++++++++++++++++++++.------------.[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<.-------.++.++++++++.------.+++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<++++++.---------.[-]+++++++++++++>[-]<[->+<]>[->[-]++++++++[-<<+>>]<]<+++++++++++++++.----.[-]+++++++++++++++++++++++++++++++++.<]"
- Mathnerd314 12y agoThis is an infinite loop printing "hello, hacker news!", for the curious.
- al2o3cr 12y agoCapitalization is important here. Downcase that "B" and the article would need to enumerate all Haskell programs. ;)