Talk:Turi ip ip ip
Jump to navigation
Jump to search
turi ip
turi ip ip ip ip ip ip ip ip tshka ip tura ik ip --SpaceByte (talk) 17:29, 16 July 2022 (UTC)
Turing-completeness proof
Turi ip ip ip can be proven Turing-complete by translation from Portable Minsky Machine Notation.
Opcodes of stack operation are used to reduce the length of the proof
Program starts with:
turi ip ip
Additionally there is a P
which is used like that:
turi P
would push P
'th prime number to the stack (with 0th being 2), would later be converted to P+1 ip's.
Translation
inc(P)
is translated as:
turi P mul
dec(P)
is translated as:
turi P swap div
Conditionals
An if statement
if(dec(P) { abc } else { xyz }
is translated as:
turi ip ip swap dup turi P swap mod eugh eugh dup sub add dup sub add swap turi ip ip sub swap turi P swap div xyz turi ip turi ip tarisha add dup sub add swap eugh eugh turi ip ip sub swap turi P swap div abc swap tarisha add
A while loop
while(dec(P)) { ... }
is translated as:
turi ip ip swap dup turi P swap mod eugh eugh dup sub add dup sub add swap turi ip ip sub swap turi ip turi ip tarisha add dup sub add swap eugh eugh turi ip ip sub add ... turi ip ip swap dup turi P swap mod eugh eugh dup sub add dup sub add swap turi ip ip sub swap turi ip turi ip tarisha add dup sub add swap tarisha add