Mapfuck 2: Turing Boogaloo
Mapfuck 2: turing boogaloo is a derivative of the original mapfuck programing language made by User:QTpye (talk) with 2 differences
instead of updating the instruction map base on the last char, it updates the map based on the last char and then updates a second time based on the next char in the program
the next and last char are wrapped around to the first and last char of the program
this causes a major problem. while we can take a piece of code and extract the instructions that it generates
if we try to reverse it. and design a piece of code based on a set of instructions we want it is very difficult at best and impossible at worst
here is an example of the program +
being run
step 1: assemble the map
this is the default map, put through the previous char`s change table (it's self due to wraping), and then next char`s change table (it's self due to wraping)
so the instruction table becomes
instruction | default | + | + |
1 | 1 | 1 | 1 |
2 | 2 | 3 | 5 |
3 | 3 | 5 | 2 |
4 | 4 | 7 | 6 |
5 | 5 | 2 | 3 |
6 | 6 | 4 | 7 |
7 | 7 | 6 | 4 |
8 | 8 | 8 | 8 |
instruction | char # |
1 | 1 |
2 | 5 |
3 | 2 |
4 | 6 |
5 | 3 |
6 | 7 |
7 | 4 |
8 | 8 |
so the instruction for char 3 is instruction 5.
so the program +
Outputs the character signified by the cell at the pointer