-
-
Save deciode/6155815 to your computer and use it in GitHub Desktop.
msm=->s{s=[*s.chars];(e=s.shift;e==?;?s<<s[-1]:e==?:?s.concat(s.pop.split''):e==?,?s.pop: e==?/?s.insert(-2,s.pop):e==?.?s<<s.pop+s.pop: s<<(e!=?'?e:s.shift))while s[1];s} |
Glad to see someone is actually interested in MSM. :) When possible, will test your implementation (on REPL.it it threw syntax error, unexpected '>'). Thank you very much.
It's easily my favorite of the three languages you've created in the past few days. Have you given yourself some sort of esolang-per-day challenge? :P As for the error, repl.it is using a really old version of Ruby which doesn't support the ->
lambda syntax. proc{}
is just so wordy, though, and compatibility pretty much gets thrown out the window for golf.
I have a few more things to say about MSM, but I'll start the discussion over on the wiki for the sake of posterity.
I'm too weak for such a challenge (esolang-per-day) but the idea seems good. :-D That's just a bunch of minimal syntax/minimal interpreter thoughts collected in da brain that suddenly got implemented one by one.
As for MSM, the most interesting question for me is whether it is Turing-complete. I feel that a subset of Underload can be implemented in MSM but I don't know for sure if it will reduce to the one among those subsets proven to be Turing-complete, so this question is open.
As for Myth and Impera, they are isomorphic to Thue (more exactly, PROLAN/M) and Minsky machine respectively, so their Turing-completeness is obvoius.
As for future ideas... i have one to absolutely minimize the number of instructions and symbols and put a very damn simple principle behind it, but ain't sure if the result will be Turing-complete or usable at all. >_<
Updated the implementation and article with new ? instruction, time to update your port ;)
This is a severely golfed (171-character) Ruby implementation of @plugnburn's MSM esolang. The handling of the
:
operation could very likely be shorter, but everything else is pretty tight.