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.

TDQ

From Esolang
Jump to navigation Jump to search

TDQ (or Turing DQ) is an extension of DQ created by User:ChuckEsoteric08.

Additions

Operations are now executed in sequential order. There are now four stacks, which could be seen as registers. Registers are named a, b, c and d. Command D has changed it's meaning since it was equivalent to 1.

Command Description
xy execute command y on stack x. If there is no x then it would be executed on stack a. It is counted as a single instruction
*x if length of stack x is not equal to the next stack (so that a is compared to b, b to c d to a) skip next instruction
D jump to 1-indexed line n, where n is represented in unary as a string of D's.

Computational class

It is Turing-complete, which can be proven by translating Minsky machine with two registers (0 and 1) into it

Minsky machine syntax

INC x Lx

Increment x and jump to instruction Lx

JZDEC x Lx Ly

If x is zero jump to line Lx, else decrement it and jump to Ly

Translation

INC 0 Lx =
 1DLx
INC 1 Lx =
 c1DLx
JZDEC 0 Lx Ly =
 *aDLxb1DLy
JZDEC 1 Lx Ly
*cDLxd1DLy

Where

Dx

Represent string of D's with a length of x