This commit is contained in:
razetime 2022-03-18 21:51:42 +05:30
parent c3a73e60bb
commit 614a837519
2 changed files with 19 additions and 1 deletions

View File

@ -31,5 +31,5 @@ RunFractran ← {
seq 200 RunFractran 2"17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1"
•Out "Generated numbers: "•Repr seq
•Out "Primes: "•Repr (=)(2())/ seq
•Out "Primes: "•Repr 12(=)(2())/ seq

18
subleq.bqn Normal file
View File

@ -0,0 +1,18 @@
# Subleq interpreter
_while_ {𝔽𝔾𝔽_𝕣_𝔾𝔽𝔾𝕩}
ToNum {neg '-'=𝕩 (¯1neg)×10×+˜´·-'0'neg𝕩}
Subleq {
𝕊 memory:
{
𝕊 ipmem:
{
¯1b·: ip+3, (@-˜•term.CharB@)(b) mem;
a¯1·: •Out @+amem, ip+3, mem;
abc : d b-(mem)a, (0<d)c, ip+3, d(b) mem
} mem˜ip+3
} _while_ {𝕊 ipmem: ip0} 0memory
}
Subleq ToNum¨•args