John Conway's FRACTRAN, a ridiculous, yet surprisingly deep language (2020)
raganwald.com
raganwald.com
sumTo :: FracComp repr => Integer -> [repr [Rational]]
sumTo n = [addi "c" 0, addi "n" n, while (jge "n" 0) [adds "c" "n", subi "n" 1]]
And the compiler would output this: λ> runAssembler (sumTo 10) -- Program length: 31
Right [847425747 % 2,13 % 3,19 % 13,11 % 3,11 % 29,31 % 11,41 % 31,23
% 11,23 % 47,2279 % 23,59 % 301,59 % 41,67 % 413,329 % 67,61 % 59,73 %
61,83 % 73,71 % 61,71 % 97,445 % 71,707 % 89,103 % 5353,103 % 83,109 %
5459,5141 % 109,107 % 103,113 % 749,113 % 19,131 % 113,29 % 131,127 %
113]
λ> runAsm (sumTo 10)
[(Prime 97,55),(Prime 107,1)]
[0] https://github.com/siraben/hasktranI'll repost my comment from that thread:
>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...
Reducing them to FRACTRAN requires dealing with some VERY big numbers for not a lot of benefit. You’re probably dealing with those on an abacus anyway…
But you could only read them after you unscrolled 50 feet of story about how much they enjoyed the buffet platters at Bel's temple as a kid before watching the sacrifices
https://codegolf.stackexchange.com/questions/5210/convert-fr...
Building Fizzbuzz in Fractran from the Bottom Up (2016) - https://news.ycombinator.com/item?id=28448283 - Sept 2021 (5 comments)
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)
Building FizzBuzz in Fractran from the Bottom Up - https://news.ycombinator.com/item?id=22866303 - April 2020 (1 comment)
FRACTRAN - https://news.ycombinator.com/item?id=14202367 - April 2017 (8 comments)
Building Fizzbuzz in Fractran from the bottom up - https://news.ycombinator.com/item?id=11894141 - June 2016 (3 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)
https://www.youtube.com/watch?v=-Hx8RixhoOMIf you could do those steps the entire process would be self contained, which you should be able to if the claim of yielding all possible computations is correct.
(actually, it is log2(x) that would need to be implemented and not 2^x, but my point remains).
tl;dr: a 'usage' of fractran is that fratcran programs are collatz-like sequences, thus, the behaviour of collatz-like sequences is undecidable.