Talk:Mutating Stack Machine
In the interest of Turing-completeness
While I completely understand the appeal of minimalism, I think adding a few choice instructions to MSM could bring it a long way toward being capable of universal computation. As evidenced by all of the common OISCs, branching is pretty much essential. I propose an instruction that pops the topmost value and stores it elsewhere, and then another which either skips or executes the next instruction based on a comparison between the separate value and the top of the stack. With a bit of extreme cleverness, I suspect this would give MSM enough power to simulate the string rewriting paradigm of ///. --(this comment by Deciode at 20:13, 5 August 2013 UTC; please sign your comments with ~~~~)
- It's a good proposal, although I'm pretty sure branching alone can be achieved with eval-like split (:) instruction which allows to effectively evaluate constructed statements and perform a loop. Anyway, these two instructions you proposed can just be united into one that compares two topmost values, and the most suitable character for it is obviously a question mark (?). So, it will be implemented and described in the article ASAP (not today, though :)) This will give us a cool 7-instruction set with simple and complex branching, and I see no reason to go beyond it to 8 or larger number of instructions. Stay tuned and await the version with ? tomorrow. :) Plugnburn (talk) 22:10, 5 August 2013 (BST)
I think MSM is probably TC (even without ?) but the small queue part means translating Underload directly will not work. Fueue works somewhat similarly but won't be translatable directly either because everything else still works with stacks. Also, dynamically building nested program blocks may require something quine-like. --Ørjan (talk) 02:40, 8 August 2013 (BST)