Email or username:

Password:

Forgot your password?
Devine Lu Linvega

So, @wryl, who created Modal, demonstrated to me an interesting connection between Fractran and rewriting programming languages that I couldn't see at first. It is not obvious until you point the registers to symbols in memory, but once named registers defined in rules start to be rewritten, it suddenly becomes obvious that this a very powerful OISC(where the only instruction is Multiply) rewriting engine system, moreso than Thue if I dare say:

wiki.xxiivv.com/site/fractran

6 comments
Devine Lu Linvega

Here's an example run:

:: 5/6 blue.2 red.3 > purple.5
:: 11/21 yellow.7 red.3 > orange.11

AC 126 blue red red yellow
00 126 × 5/6 = 105/1, red purple yellow
01 105 × 11/21 = 55/1, purple orange

(wryl)

@neauoire It's a really subtle case of multi-set rewriting. Because rewrite rules can be formulated over any kind of structure, it's easy to swap other structures in.

FRACTRAN, Petri Nets, some fragments of linear logic, and Nova all share the backing structure of "an unordered bag of things, which can have duplicate items".

It's really neat once you start examining the consequences, because if the things in the bag have some structure, you can pattern-match them.

Then anything is possible.

Devine Lu Linvega

@wryl It's like I told you before, I'm really bad at understanding anything until I spend way too many hours trying to work it out mechanically. It finally clicked last night what "an unordered bag of things " actually mean. I get why you can't order them now.

(wryl)

@neauoire Absolutely relatable. I only really "got" the concept about 3 years after I started digging into it!

Devine Lu Linvega

@wryl me: eating plasticine.
you: doing kickflips on an overboard.

:: c c > done.
:: b b > c
:: a a > b
:: a > a a
:: b > b a
:: c > c a

AC 7 a

7 × 49/7 = 49, a a
49 × 5/49 = 5, b
5 × 35/5 = 35, b a
35 × 49/7 = 245, b a a
245 × 5/49 = 25, b b
25 × 2/25 = 2, c
2 × 14/2 = 14, c a
14 × 49/7 = 98, c a a
98 × 5/49 = 10, c b
10 × 35/5 = 70, c b a
70 × 49/7 = 490, c b a a
490 × 5/49 = 50, c b b
50 × 2/25 = 4, c c
4 × 3/4 = 3, done.

(wryl)

@neauoire Now all you'd need is a multiplication routine written in this style, and a bit of scaffolding, and you have a rudimentary self-interpreter!

Go Up