Talk:3code

From Esolang
Jump to: navigation, search

Computational class

I think it's Turing-complete, at least as implemented by the Python interpreter, as the variables can store infinitely large numbers. A Brainfuck-style tape can be constructed like this:

0=x=y

F %     2 -[i *[/[i j] j]]
F ^     2 =[j 0] then 1 else *[i ^[i -[j 1]]]?
F front 1 <[i 0] then 0 else /[x ^[256 i]]?
F back  1 <[i 0] then 0 else %[x ^[256 i]]?

F Tget  0 %[front[y] 256]
F Tset  1 +[+[*[front[+[y 1]] ^[256 +[y 1]]] *[i ^[256 y]]] back[y]]=x
F Trew  1 -[y i]=y
F Tfwd  1 +[y i]=y

I've tested this with the Python interpreter and it works. The C++ interpreter doesn't like it at all, though, so it depends on which one is right. --Marinus 14:36, 31 March 2011 (UTC)