So I was at some point really into PDP-8. Single-byte instructions (8-ish of them,) 12-bit words, single register, small memory, basic drivers. Yet people managed to accomplish some really impressive feats with it, like writing an #OS. It was part of my inspiration for OS.bf in #Brainfuck.

And now that I’m eyeing this cute and super basic calculator with a single memory register, I start recalling. The days I used PDP manual as reading on the bus or in university locker rooms. The attempts to reconcile #Lisp syntax and PDP instruction set. The wish to build a computing infrastructure atop this infinitely tiny foundation.

I keep justifying this calculator purchase to myself, while I should’ve just learned #Fractran instead.

Implemented the factorial function in 12 fractions, it takes 306 rewrites to reach fac(5).
429/1001, 13/143, 910/195, 143/65, 13/39, 437/221, 57/38, 665/437, 29/19, 667/203, 13/29, 4485/527

https://lists.sr.ht/~rabbits/horadric/%[email protected]%3E

I couldn't find any previous implementation online, but I did find a teacher's homework assignment that suggests that students had try and implement it, and I just can't.. imagine, like, where do I sign up to take Fractran programming classes even

https://www.cs.cmu.edu/~sutner/dmp/Conway-Fractran.pdf

#fractran

I'm still growing the #fractran documentation with examples and improvements. There's hardly a day that goes by when I don't find a better way to tackle some problem or other.
https://wiki.xxiivv.com/site/fractran.html
fractran

By Devine Lu Linvega

XXIIVV

Коллац на фрактране

Я хочу сыграть с вами в одну игру... — Дж. Конвей, про игру "Жизнь" (и про фрактран тоже) Эту статью я хотел написать ещё полтора года назад, но почему-то замешкался и стёр черновик. Но вот наконец дошли руки. Суть игры Вы задаёте список неотрицательных рациональных дробей (программу) и некоторое натуральное число (состояние). Ищете в программе первую дробь, такую, что произведение её на состояние остаётся натуральным. Это значение становится новым состоянием. Повторяете процедуру. Если ни одна из дробей не подошла, программа останавливается. Этот список дробей является программой на эзотерическом языке Фрактран , о котором на хабре была статья . Ну и раз в этой статье упомянута гипотеза Коллаца, то понятно, какой именно хелловорлд мы будем писать на фрактране.

https://habr.com/ru/articles/864300/

#фрактран #эзоланги #эзотерические_языки #интерпретатор #fractran

Коллац на фрактране

Я хочу сыграть с вами в одну игру... — Дж. Конвей, про игру "Жизнь" Эту статью я хотел написать ещё полтора года назад, но почему-то замешкался и стёр черновик. Но вот наконец дошли руки. Суть игры Вы...

Хабр
gur desire to design a #fractran #quine tatoo, but also gur lack of standard/defacto output systems for it making it less doable

A #fractran model in #rakulang

my $c=True;
while $c {
for @p ->(\t,\n) {
$c=True;
for n.keys ->\v {
if a{v}:exists and a{v}>=n{v}
or t{v}:exists and t{v}>=n{v}
{
$c=True
} else {
$c=False;last
}
}
if $c {
for a.keys ->\v {
if t{v}:exists {a{v}+=t{v}}
if n{v}:exists {a{v}-=n{v}}
}
for t.keys ->\v {
if not a{v}:exists {a{v}=t{v}}
}
last
}
}
}

Today in chaotic batshit crazy computing: A stack-machine can be implemented in #Fractran, but it's not for the faint of heart.

The theory is that we can keep a stack of zeros and ones in a single register using binary encoding for that number, a little like Church encoding but with bit-shifting.

- Pushing a 0 onto the stack is equivalent to doubling the number.
- Pushing a 1 is equivalent to doubling and adding 1.
- Popping is equivalent to dividing by 2, where the remainder is the value.

I love that Conway pitched #Fractran as some ridiculous advertisement as if to compete with turing machines already flooding the market.

"Matches any machine on the market! Make workday real easy!"

After a couple of days of trying different tactics, I found a nice way for implementing Fizzbuzz in John Conway's #fractran in 27 Fractions.

37 1/79 1/83 1/89 606/97 89/87264 79/2727 83/3232 1/101 25123/365 39479/511 46657/803 61013/949 68191/1241 82547/1387 104081/1679 111259/2117 1/2263 3977/37 4171/41 4559/43 5141/47 5723/53 5917/59 6499/61 6887/67 7081/71 17945/73

src: https://git.sr.ht/~rabbits/fractran/tree/main/item/examples/fizzbuzz.fra
docs: https://wiki.xxiivv.com/site/fractran.html
someone else's attempt: https://gist.githubusercontent.com/malisper/7227bc8c428949d8c1f277effca28d14/raw/47935e1c9411681618da00bc786e86d8a7f96792/gistfile1.txt

Tinkering around with a FRACTRAN library I wrote in Common Lisp :^)

I was too lazy to add sequential functions, but it is possible if you assign a unique prime to each function (as it will permit only that function)

Prime numbers just happen to be a powerful way to express the concept of "distinct" objects. In this case, the "objects" are registers/memory addresses. Might try replacing primes with strings...

https://patpatpat.xyz/data/fractran.lisp

#lisp #commonlisp #emacs #fractran #esolang