Talk:I/D machine

Some notes
First of all, congratulations on inventing this thing. The simplicity is incredible. I can't believe it's real.

Whereas I don't doubt you have everything under control regarding the cyclic tag translation, I'm writing these notes here for the benefit of everyone; I was surprised by the simplicity of this method when I devised it for my cyclic tag language to Kantate translation back in the day.

It's fascinating how well cyclic tag language works with array/random-access memory. The target language more or less only needs a method for increasing cells. It amazes me how simple, blind increasing of cells will create the conditional behaviour of the '0' and '1' instructions. The memory string can be implemented with two pointers: one that points at the beginning of the simulated memory string's first digit and one that points at its last digit. Assumed is an array that is unbounded and empty/filled with zeroes. In the simulated memory string, 0 is represented with 0, and 1 with what I call 'the fixed amount'. In this case perhaps the fixed amount of 1 suffices, in my Kantate work it had to be something else because the Kantate instructions had to be interleaved with the simulated memory string. Here's a way of translating the cyclic tag language instructions: --Keymaker (talk) 11:13, 17 March 2018 (UTC)
 * ';' becomes simply a matter of increasing the start pointer by the fixed amount. As the starting pointer moves, the erasing of first digit is simulated.
 * '0' becomes adding the value of the cell the start pointer points at (either '0' or 'the fixed amount') to the end pointer (thus causing it to point to the next simulated cell, or not). If first in memory string was 0, the end pointer didn't move (p+0=p). If first in memory string is 1 (the fixed amount), the end pointer now points to the next cell (which has value 0, since the array is filled with zeroes) -- the appending of a 0 has been simulated.
 * '1' becomes adding the value of the cell the start pointer points at to the end pointer (like above), then adding the value of the cell the start pointer points at to the cell the end pointer (which was just updated) points at. If first in memory string was 0, the end pointer didn't move -- and since that first was 0, adding it the last cell won't change the last cell's value (whether it's 0 or 1/the fixed amount). If first in memory was 1 (the fixed amount), the end pointer moved one cell forward (and the cell it now points at is 0), and when the value under the start pointer (1 in this case) is added to that 0-cell, the cell becomes 1 (the fixed amount), and the appending of a 1 has been simulated.
 * That's a pretty elegant construction! I don't think the way it does conditionals works for the I/D machine in particular because "add A to B" is actually very hard to do in the I/D machine (unless A is a constant, when it's trivial), so I used the "bit bucket" approach instead (basically, having a duplicate queue that unwanted elements get pushed on). Note that for every I command in the source, something has to get incremented, so you'd need somewhere to throw away unwanted increments anyway, and a spare queue is a good use of that. --ais523 05:57, 18 March 2018 (UTC)