Muriel
Muriel is an esoteric programming language designed by Matthew Westcott in 2001.
Etymology
The name Muriel is an acronym that stands for Monumentally Useless Re-Iterative Execution Language.
Computational model
Like SMITH, Muriel has no traditional control structures. Instead, Muriel has a command to replace the currently running Muriel program with a given string, and run that instead. This leads to a programming method where a program must quine itself in order to perform any sort of loop.
General syntax
A Muriel program consists zero or more instructions separated by ; (semicolons).
Instructions
a:0
|
Assign the integer variable a with the value 0 . Integer variables can be any lowercase letter [a-z] and value can be any integer expression.
|
A:"Foo"
|
Assign the string variable A with the value Foo . String variables can be any uppercase letter [A-Z] and value can be any string expression.
|
."Foo"
|
Output Foo . Can be any string expression.
|
@".$0"
|
Execute the Muriel program .$0 . Can be any string expression. Variables in the current program are not passed down and control does not return to the parent program on completion.
|
Expressions
If multiple expressions are chained, they are evaluated left to right. Brackets can be used to determine the order of operation ($1+1
is invalid but $(1+1)
is "2"
).
Integer
123
|
Integer literal in decimal. Can be negative. |
a
|
Value of the integer variable a . Integer variables can be any lowercase letter [a-z].
|
1+2
|
Addition of two integer expressions. |
4-2
|
Substraction. Unary minus is allowed (-x means 0-x ).
|
2*2
|
Multiplication. |
2=2
|
Equality test. 1 if true, 0 if false. |
2>1
|
Greater than test. 1 if true, 0 if false. |
2<3
|
Less than test. 1 if true, 0 if false. |
#N
|
Number represented by string expression N . Causes an error if N does not make sense as a number.
|
&N
|
Length of string N .
|
String
"Bar"
|
String literal. Valid escape sequences are \" for " , \n for new line and \\ for \ .
|
A
|
Value of the string variable A . String variables can be any uppercase letter [A-Z].
|
~
|
String received from user input. |
"X"+"Y"
|
Concatenation of two string expressions. |
$n
|
String representation of integer expression n .
|
%N,a,b
|
Substring of N , starting at character a included (first character is 0) up to b excluded. Errors if numbers are out of range or a > b .
|
|N
|
Replaces all " , \ and new lines in the string N by their respective escape sequences.
|
Computational class
There exists an interpreter for the language Bub written in Muriel. Since Bub is a small variant of Brainfuck, it ought to be possible to show through simulation and reduction that Muriel is Turing-complete as well.
See also
- Smurf is an attempt to make a Turing tarpit out of Muriel.
External resources
- Muriel website (from the Wayback Machine; retrieved on 5 December 2002)
- Muriel interpreter in Perl
- Muriel in the Esoteric File Archive