Create a Muriel-like language and implementation

9

0

Muriel is a language where the only way to loop is to create a quine and execute it. Your job is to create your own language with this property and an implementation of it in a pre-existing language.

We will define a Muriel-like language like as follows:

  1. It has a built-in command for executing code in its own language, similar to Muriel's @ command or python's exec.
  2. It is Turing complete.
  3. If you remove the built-in execution command it is no longer Turing complete.

Muriel is Muriel-like with @ as its built-in execution command. Smurf is also Muriel-like (its built-in execution command is x). Python is not Muriel-like, since it is still Turing complete if you remove exec.

Your job is to create a Muriel-like programming language, and then to provide an implementation of it in a language of your choice. Your score is the length of the implementation, which you are trying to minimize.

Notes:

  1. Your built-in execution does not need to function exactly like Muriel. It is up to you how it handles termination of the child program, errors, scoping, etc...
  2. The language you write the implementation can not itself be Muriel-like. (This is so that @ is not a valid entry.) It also must have existed before this post.

PyRulez

Posted 2017-05-31T22:13:37.497

Reputation: 6 547

Is Underload a Muriel-like language?

– alephalpha – 2017-06-01T03:25:44.727

@JerryJeremiah Does my edit make it clearer? – PyRulez – 2017-06-01T03:31:01.660

@alephalpha That wiki says "Without ^, the remaining program will always decrease in size, eventually halting." If this is true, then yes, Underload is Muriel-like. – PyRulez – 2017-06-01T03:31:37.750

What do you do if your target language has multiple eval commands? (Eg Python's exec and eval) Require the removal of all of them to lose TCness? – CalculatorFeline – 2017-06-24T21:07:46.210

1@PyRulez I think this should be [tag:popularity-contest] rather than code-golf, because otherwise the choice of implementation language would make it a chameleon challenge – Uriel – 2017-06-24T23:38:26.470

@Uriel what's a chameleon challenge? – PyRulez – 2017-06-25T08:47:00.227

A challenge that looks like one thing (implement a language) but is another (choose your base language very carefully). – CalculatorFeline – 2017-06-25T17:25:22.137

Answers

3

Python 3 and "The minimum TC subset of Underload but with the characters changed to 2019, reversed, and with a 0 on top", 156 bytes

c=input()
n=1
t=c
s=[]
while c:
 *c,i=c
 if n:
  if"6">i:n+=int(i)-1
  if n:t=[i]+t
  else:s+=[t];t=[]
 elif"2"==i:n=1
 elif"2">i:s+=s[-1:]
 else:c+=s.pop()

Try it online!

Explanations in the header, commented code in the footer.

CalculatorFeline

Posted 2017-05-31T22:13:37.497

Reputation: 2 608

3

RIP grand chart

– Uriel – 2017-06-24T23:26:31.327