We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Talk:GOTO 10
Jump to navigation
Jump to search
Unchecked TC proof
I've drafted a computational class section, but I can't currently check the construction within it.
== Computational class ==
GOTO 10 is Turing-complete, as it can simulate 2-register [[Minsky machine]]s. Assuming the states are numbered from <code>1</code> to <code>''N''</code>, with <code>1</code> being the initial state, and the instruction for each state being one of <code>INC (register 1 or 2) (next state)</code> or <code>DEC (register 1 or 2) (next state on successful decrement) (next state on failed decrement)</code>
* If state <code>''I''</code> is an <code>INC 1 ''J''</code> instruction:
''10I'' GOTO 1 WITH 1
''10I'' GOTO 2 WITH 1
1 GOTO 1 WITH N(''10I'') * (N(1) + 1)
2 GOTO 2 WITH N(''10I'') * (N(2) )
''10I'' GOTO ''10J'' WITH 1
* If state <code>''I''</code> is an <code>INC 2 ''J''</code> instruction:
''10I'' GOTO 1 WITH 1
''10I'' GOTO 2 WITH 1
1 GOTO 1 WITH N(''10I'') * (N(1) )
2 GOTO 2 WITH N(''10I'') * (N(2) + 1)
''10I'' GOTO ''10J'' WITH 1
* If state <code>''I''</code> is an <code>DEC 1 ''J'' ''K''</code> instruction:
''10I'' GOTO 1 WITH 1
''10I'' GOTO 2 WITH 1
1 GOTO 1 WITH N(''10I'') * (N(1) - 1)
2 GOTO 2 WITH N(''10I'') * (N(2) )
''10I'' GOTO ''10I+1'' WITH 1
1 GOTO ''10I+1'' WITH N(''10I'')
''10I+1'' GOTO ''10J'' WITH N(1)
''10I+1'' GOTO ''10K'' WITH 1 - N(1)
* If state <code>''I''</code> is an <code>DEC 2 ''J'' ''K''</code> instruction:
''10I'' GOTO 1 WITH 1
''10I'' GOTO 2 WITH 1
1 GOTO 1 WITH N(''10I'') * (N(1) )
2 GOTO 2 WITH N(''10I'') * (N(2) - 1)
''10I'' GOTO ''10I+1'' WITH 2
2 GOTO ''10I+1'' WITH N(''10I'')
''10I+1'' GOTO ''10J'' WITH N(2)
''10I+1'' GOTO ''10K'' WITH 1 - N(2)
* If state <code>''I''</code> is a halting state, no lines are added to the program.
=== Restricted forms ===
Some restricted forms of GOTO 10 may be Turing-complete as well, whether via limiting <code>GOTO</code> count, <code>WITH</code> count, operations, etc.
==== Restricted operations ====
The Minsky machine construction already proves that the <code>/</code> operation is not required; it's also trivially possible to eliminate the <code>+</code> by splitting the expression into multiple lines. Specifically, <code>''r'' GOTO ''r'' WITH N(''10I'') * (N(''r'') + 1)</code> can be replaced with:
''r'' GOTO ''r'' WITH N(''10I'') * N(''r'')
''r'' GOTO ''r'' WITH N(''10I'')
If I understand the language correctly, the main construction should be correct, but there's some behavior I'd like to test first (specifically, the case when the WITH expression returns a negative number)) in the interpreter before continuing. (Maybe it should be considered undefined behavior?) –PkmnQ (talk) 17:49, 15 November 2026 (UTC)