Hacker News new | past | comments | ask | show | jobs | submit login
Building Fizzbuzz in Fractran from the Bottom Up (2016) (malisper.me)
44 points by ColinWright on Sept 7, 2021 | hide | past | favorite | 5 comments



For some reason this makes me imagine an alternate history sci-fi universe where Pythagoras (famous for his love of fractions) invents FRACTRAN. Then Archimedes builds a mechanical computer to execute those programs, and one of the successors of Alexander The Great puts the computer to use in warfare and conquers the world. Science is accelerated so that nuclear physics are invented by the time Jesus is born...


Conway's talk from ~1987 Fractran: A Ridiculous Logical Language https://www.youtube.com/watch?v=548BH-YFT1E

PDF of Conway's 1987 paper FRACTRAN: A Simple Universal Programming Language for Arithmetic http://libgen.gs/get.php?md5=b9f27f8b145f82a70a8b3cc32141234...


A few tiny threads:

Building Fizzbuzz in Fractran from the Bottom Up - https://news.ycombinator.com/item?id=23583673 - June 2020 (1 comment)

Building FizzBuzz in Fractran from the Bottom Up - https://news.ycombinator.com/item?id=22866303 - April 2020 (1 comment)

Building Fizzbuzz in Fractran from the bottom up - https://news.ycombinator.com/item?id=11894141 - June 2016 (3 comments)

More generally:

Open Problems in Communication and Computation (1987) [pdf] - https://news.ycombinator.com/item?id=26074413 - Feb 2021 (2 comments)

Remembering John Conway's FRACTRAN - https://news.ycombinator.com/item?id=23142232 - May 2020 (14 comments)

FRACTRAN - https://news.ycombinator.com/item?id=14202367 - April 2017 (8 comments)

In FRACTRAN, every program is a list of functions - https://news.ycombinator.com/item?id=10091053 - Aug 2015 (1 comment)

FRACTRAN - the esoteric programming language invented by John H Conway - https://news.ycombinator.com/item?id=3119937 - Oct 2011 (1 comment)


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


That's so interesting seeing the somewhat usable language rise from the most basic elements.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: