2 ms·
Fractran is a wild ride as far as esolangs go. At first it seems impossible to build any programs in it, then you learn a few tricks like special primes for con
by siraben 5y ago
Fractran is a wild ride as far as esolangs go. At first it seems impossible to build any programs in it, then you learn a few tricks like special primes for control flow and abstracting up to an imperative language. Being able to capture these abstractions in Lisp shows how powerful features like macros and homoiconicity are.
It carries over to statically typed languages too. I translated the blog post to Haskell (using the tagless-final design pattern), allowing one to represent Fractran programs as values, pretty print them and pass them through an optimizer[0]
[0] https://siraben.github.io/2020/02/26/translating_cl.html https://siraben.github.io/2020/02/26/translating_cl.html