This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mrm_rui.c -- translate Minsky register machine to Rui | |
Daniel Cristofani | |
6/2020 */ | |
/* This program translates register machine programs, as described in Marvin | |
Minsky's 1967 book _Computation: Finite and Infinite Machines_, into Rui | |
programs as described at https://esolangs.org/wiki/Rui, thus proving Rui | |
to be Turing-complete. | |
Minsky's book gives several varieties of register machine. This program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+6 +7 +9 | |
+8 -7 *11 -9 *12 -8 $ *8 . -6 *7 *6 | |
=0 +4 -7 *7 . . . . *13 -7 +10 :3 | |
-9 *9 ~ . . -0 =7 . -6 *6 *7 +5 -7 *7 . . . . -0 +14 -7 . *7 :2 | |
-9 *9 ~ . . -0 . +14 -7 . *7 . -10 w -7 *11 -6 *15 =10 $ :3 | |
=6:6 | |
=7:7 | |
=8:8 | |
=9:9 | |
=10:10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r *7 | |
=0 +3 . -7 *7 . . . . . . *4 -1 -7 +9 +8 +8 :2 | |
-8 . *8 ~ . . -0 =1 ~ . . -9 w +10 -7 . *5 -8 *6 :2 | |
. :7 | |
=100 *7 ! | |
=10 *8 ! | |
=7:7 | |
=8:8 | |
=9:9 | |
. -0 *11 ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r +5 +4 . | |
. *3 -1 -4 $ *4 +5 -2 :2 | |
. . . *4 =2 . | |
=4 :4 | |
=1 ~ -0 =1 . -4 w |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* drui.c -- Rui interpreter | |
Daniel Cristofani | |
7/2020 */ | |
/* A reasonably fast interpreter for the Rui programming language, as described at https://esolangs.org/wiki/Rui | |
This uses the GMP bignum library, so it will need to be compiled with something like | |
gcc drui.c -O2 -o drui -lgmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w *2 =1 :1 | |
=1 $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r | |
w +5 . *4 +3 $ . . -0 . -6 :2 | |
. . -0 . -0 =4 *3 -0 :2 | |
. . -0 . . =6 . *3 ! | |
-1 -0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+2 . *6 +3 . . . -0 . -6 +5 :1 | |
-1 -0 =1 . -5 +4 w -4 *4 :1 | |
-1 . -0 . -0 =4 *6 -0 +5 :1 | |
=4 :4 | |
=5 :5 | |
. =2 -0 . . =6 . *6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-3 *2 -7 *7 *7 -5 +10. *4 -4 . -0 +6 . *8 $ -2 . :1 | |
=9 *3 | |
=3 :3 | |
=1 -0 . | |
=5 :5 | |
-8 . . . *3 *7 ! | |
=7 :7 | |
=8 :8 | |
=9 :9 | |
-0 =4 . +9 +3 +7 -3 w -9 +11. *9 -7 *5 :1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+7 +4 +3 :10 | |
=2:2 | |
=3:3 | |
=4:4 | |
=5:5 | |
=6:6 | |
=7:7 | |
=8:8 | |
=9:9 | |
-8 =120 +12 *11 . =151 *11 . =47 *11 -3 $ *3 -7 $ *7 . -0 *8 :13 |
OlderNewer