(OT) Conway's FRACTRAN, a programming language like no other

A FRACTRAN program is a list of fractions. It’s baffling on first sight. Conway provided some example programs in his amusing 1987 paper FRACTRAN: A Simple Universal Programming Language for Arithmetic (doi and sample here)

This program, by way of example, lists the prime numbers:
3/11 847/45 143/6 7/3 10/91 3/7 36/325 1/2 36/5

Remarkably, a list of only 40 fractions is enough to compute the digits of pi. Here’s a picture of how it works:
Screen Shot 2020-04-19 at 20.06.55

In all cases, execution takes very many steps! There’s a fast interpreter by Stuart Geipel here, explained here.

There’s an accessible explanation here.

More here:

There’s a presentation in PDF here.

I should add that there are many other programming languages like no other.

(Continuing the discussion from John Conway has died)

1 Like