Talk:Suich
Unclear documentation
I don't think the Truth-machine for Suich is well-documented; for example, if a 0x02 character was inputted into the console, the line should be 0, as 2 mod 2 is 0. However, it was described as "anything else is 1". (Just for convenience, the documentation is provided as well. "The pointers are respectively modulo the number of lines and modulo the length of lines. ")--A (talk)
08:37, 14 June 2019 (UTC)
- Note that the documentation for
I
says "the line 's counter", not the "line counter". TuxCrafting (talk) 08:43, 14 June 2019 (UTC)
Computational class
I do not know whether other computational models can compile to Suich, but I think it is not Turing-complete because there is no memory available that is not dynamic. The two only available memory in this language (which is the line pointer + counter) is mapped to the memory, which means that if an accumulator is set in this language, the control flow has to go to the same place in the program, which demonstrates that the language can only execute the same command at each memory state; a Turing-machine can definitely do much more than this, as a Turing-machine's state transition is not dependent to the memory, and it certainly can execute different commands even if the memory state is the same from the previous memory state. --A (talk)
08:46, 14 June 2019 (UTC)
- The control flow is independent from the stored data. The command pointer and the line pointer, which control which character is executed, re independent from the counter that every line has. And since the control flow travels in a sawtooth pattern, it is possible to affect the memory stored by every line. As the character adder shows, Suitch is capable of looping conditionally and affecting other counters based on the value of one counter, so I think that it may be possible to convert a Minsky machine to it. TuxCrafting (talk) 08:54, 14 June 2019 (UTC)
I don't think that Suich can unconditionally jump unconsecutive lines, as the line pointer can only increment and decrement. Can you demonstrate a way to jump to unconsecutive lines? --A (talk)
10:50, 14 June 2019 (UTC)
- You can't, but by padding with nop's you can kind of do that (some of the examples rely on this to go to a line with a guaranteed 0 counter to skip commands). TuxCrafting (talk) 10:53, 14 June 2019 (UTC)
"Decrementpocalypse" → Suich
Let's consider a language called Decrementpocalypse which is based on Subtractpocalypse. This language has 2 commands (registers contain unbounded positive integers and indexed with 0-based positive indices):
+R
— Increment register R.-R
— Decrement register R, or restart execution at the start of the program if it is 0.- The program halts if it arrives at the end.
Converting this language to Suich is very trivial. To convert a N-register Decrementpocalypse to Suich, first start with a (N+1)x(number of instructions*(N+1)+1) "line-major" program filled with nops everywhere except at (N,number of instructions*(N+1)-1), where it is h
.
Each instruction at index I is then converted:
+R
→ (R,I*(N+1)+R) =i
-R
→ (R,I*(N+1)+R) =d
For example, +0+0-0-1
with 2 register becomes:
i i d d h
(Note the trailing space.)
The computational class of Decrementpocalypse is unknown, but it might be Turing-complete since Subtractpocalypse and the similar Brainpocalypse are. TuxCrafting (talk) 11:22, 14 June 2019 (UTC)
- I think Brainpocalypse can compile to it:
+ i - d < and > Make sure that the number of cells(accumulators in this case) are bounded, which makes this trivial.
"Brainpocalypse is Turing-complete, given a sufficiently long tape" which does not mean that the tape is unbounded.
- An explicit halting command is mandatory; it was simulated by h.--
A (talk)
12:01, 14 June 2019 (UTC)- You can't just handwave out
<
and>
like that. The Brainpocalypse TCness proof relies on the tape position being dynamic and kept on program restart. TuxCrafting (talk) 12:04, 14 June 2019 (UTC)
- You can't just handwave out