nyuuzyou/wikis huggingface dataset:
McCulloch's second machine

McCulloch's second machine is a partial function on digit strings defined in Raymond Smullyan's book The Lady or the Tiger? and Other Logical Puzzles (1982). 
== Definition ==
The machine implements a partial function m whose domain and range is the set of non-empty strings of digits 1 to 9. (The digit 0 or empty strings are specifically forbidden.) The function is defined by four rules. Here, ++ means concatenation and reverse means reversing the order of digits in a string.
;Rule 1: If x is a nonempty digit string, then m(2 ++ x) = x.
;Rule 2: If x is a nonempty digit string and m(x) is defined, then m(3 ++ x) = m(x) ++ 2 ++ m(x).
;Rule 3: If x is a nonempty digit string and m(x) is defined, then m(4 ++ x) = reverse(m(x)). 
;Rule 4: If x is a nonempty digit string and m(x) is defined, then m(5 ++ x) = m(x) ++ m(x).
A digit string is called mortal iff iterating the machine on it eventually leads to a string that is not in the domain of the machine. It is otherwise called immortal. 
== Discussion ==
The machine is defined for exactly the digit strings matching the following regular expression: /^[345]*2[1-9]+$/
Some strings are fixed points: m(323) = 323; m(5252) = 5252. 
Some strings lead to a 2-cycle when iterated on the machine:
:3243 -> 43243 -> 34234 -> 43243
Some strings are immortal because they lead to an ever growing sequence of strings. Some grow very quickly, eg.
:3235 -> 35235 -> 353523535 -> 353535352353535353535353523535353523535353523535353535353535235353535 -> [a 15445 digit long string]
and some grow slowly, eg.
:5232 -> 3232 -> 32232 -> 2322232 -> 322232 -> 223222232 -> 23222232 -> 3222232 -> 22232222232 -> 2232222232 -> 232222232 -> 32222232 -> 2222322222232 -> 222322222232 -> 22322222232 -> 2322222232 -> 322222232 -> 222223222222232 -> 22223222222232 -> 2223222222232 -> 223222222232 -> 23222222232 -> 3222222232 -> 22222232222222232 -> 2222232222222232 -> 222232222222232 -> 22232222222232 -> 2232222222232 -> 232222222232 -> 32222222232 -> 2222222322222222232 -> 222222322222222232 -> 22222322222222232 -> 2222322222222232 -> 222322222222232 -> 22322222222232 -> 2322222222232 -> 322222222232 -> 222222223222222222232 -> 22222223222222222232
All strings that contain any digit other than 2, 3, 4, 5 are mortal. User:b_jonas would like to see a proof on whether it's algorithmically decidable whether a string is mortal.
== Implementation ==
The following perl code defines the function m2 which computes m, or returns undef if m is not defined.
 sub m2 { 
 if ($_[0]=~/\A([345]*)2([1-9]+)\z/) { 
 my$t=$2; 
 for my$p(reverse split//,$1) { 
 $t = 3 eq$p ? $t.2 .$t : 4 eq$p ? reverse$t : 5 eq$p ? $t x2 : die; 
 } 
 return $t; 
 } else { 
 return undef; 
 } 
 }
== History ==
McCulloch's first machine, defined in the same book, is a restriction of this function where only the first two of the rules is given. McCulloch's third machine is a related function. The sultan's daughter is a related function defined in the later book The Riddle of Scheherazade.
Category:Implemented
Category:Before 1993
Category:String-rewriting paradigm
McCulloch's third machine

McCulloch's third machine is a partial function on digit strings defined in Raymond Smullyan's book The Lady or the Tiger? and Other Logical Puzzles (1982). 
== Definition ==
The machine implements a partial function m whose domain and range is the set of non-empty strings of digits 1 to 9. (The digit 0 or empty strings are specifically forbidden.) The function is defined by four rules. Here, ++ means concatenation and reverse means reversing the order of digits in a string.
;Rule M-I: If x is a nonempty digit string, then m(2 ++ x ++ 2) = x.
;Rule M-II: If x is a nonempty digit string and m(x) is defined, then m(6 ++ x) = 2 ++ m(x).
;Rule M-III: If x is a nonempty digit string and m(x) is defined, then m(4 ++ x) = reverse(m(x)). 
;Rule M-IV: If x is a nonempty digit string and m(x) is defined, then m(5 ++ x) = m(x) ++ m(x).
A digit string is called mortal iff iterating the machine on it eventually leads to a string that is not in the domain of the machine. It is otherwise called immortal. 
== Discussion ==
The machine is defined for exactly the digit strings matching the following regular expression: /^[456]*2[1-9][1-9]*2$/
The string 5464254642 is a fixed point, because m(5464254642) = 5464254642. The string 52546422 bootstraps this string in one step. The strings 4564245642, 46452464522 are other fixed points.
== Implementation ==
The following perl code defines the function m3 which computes m, or returns undef if m is not defined.
 sub m3 { 
 if ($_[0]=~/\A([456]*)2([1-9]+)2\z/) { 
 my$t=$2; for my$p(reverse split//,$1) { 
 $t = 6 eq$p ? 2 .$t : 4 eq$p ? reverse$t : 5 eq$p ? $t x2 : die;
 }
 return $t;
 } else {
 return undef; 
 } 
 } 
== History ==
The book defines an equivalent variant that operates on strings of letters instead of digits. In this, the letters Q, V, R, L take place of the digits 2, 4, 5, 6.
McCulloch's second machine is a related function. The sultan's daughter is a related function defined in the later book The Riddle of Scheherazade.
== External resources ==
Shortest Key for the Monte Carlo Lock of Smullyan
Category:Implemented
Category:Before 1993
Category:String-rewriting paradigm
Md5sha1fuck

Md5sha1fuck is an esolang invented by User:Scientificworld.
==Theory==
Connect the md5 value and the sha1 value of the string together, detect all the characters of the result string, and then convert to a brainfuck program.
If the character is '0' or '1', it will convert to '.'
If the character is '2' or '3', it will convert to ','
If the character is '4' or '5', it will convert to '+'
If the character is '6' or '7', it will convert to '-'
If the character is '8' or '9', it will convert to '>'
If the character is 'a' or 'b', it will convert to '<'
If the character is 'c' or 'd', it will convert to '['
If the character is 'e' or 'f', it will convert to ']'
Finally, execute the brainfuck program.
==Examples==
I don't know...
IT IS TOO DIFFICULT TO USE!!
== Turing completeness ==
You can't have infinite code, so no, this is not Turing complete.
==External resources==
The official implementation
Category:Languages Category:Implemented Category:Brainfuck derivatives
MdX

mdX is a family of languages created in the Esolangs Discord server by User:Andrew3335 and terra in 2020, based around md5 sums and interpreting the hashes given from strings as code.
== Language ==
An mdX program is a file where every line is md5-summed, then the concatenation of the checksums of each line is treated as X code (X is either an assembly or another language/bytecode).
==mdfuck==
mdfuck is the first ever implemented language in the mdX family, based around brainfuck. An interpreter was created by User:Palaiologos, shown below:
 #!/bin/bash
 
 bf=$(mktemp)
 
 while read line; do
 (printf "0: " ; echo $line | md5sum | head -c 32) | xxd -r >> $bf
 done
 
 nComments=`cat $bf | perl -pe "s/[\+\-\[\]\<\>]//g;" | wc -c | cut -f1 -d' '`
 
 if [ $nComments -gt 0 ]; then
 echo "This program contains illegal characters."
 exit 1
 fi
 
 bfi $bf
 
 rm -f $bf
Category:Languages
Category:Turing complete
Category:2020
Meadow

Meadow is a computational model invented by User:Hakerh400 in 2021.
== Overview ==
Interpreter creates a database of all expressions that are ever constructued (implicitly or explicitly) during the program execution. Comparing two previously constructed expressions always has constant time, independently of the length or depth of the expressions.
Memory cannot be deallocated until the program halts. This can speed up the program by deduplicating computation, but it may result in memory overflow.
== Paradigm ==
This computational model inherently has functional paradigm. Recursive implementation perfectly fits with caching previous results, because recursive implementations of most algorithms depend on the results of previous recursive calls. For example, if you want to compute n-th fibonacci number, you may do it like this:
 fib 0 = 0
 fib 1 = 1
 fib (n + 2) = (fib (n + 1)) + (fib n)
You may think that this has exponential time complexity. However, in Meadow this has linear time complexity, because the result of each call is cached and it is not computed again. Moreover, even partially-applied functions are cached.
Despite being pure functional, Meadow is not lazy. It eagerly evaluates all arguments before entering a function call. However, this is not observable from the program itself.
== Details ==
There are only four different things in the program:
* Symbol - A unique value that is associated to a constant global identifier. Two symbols are equal iff the have the same name.
* Struct - A structural pair of two reduced expressions. A reduced expression is either a symbol, or a struct. Two structs are equal iff their corresponding first and second elements are equal.
* Call - A pair of two reduced expressions. Each call is then reduced either to a symbol, or to a struct, and the mapping between each call and its reduced expression is preserved. Two calls are equal iff their reduced expressions are equal (not the two expressions that are in their pairs, but the two resulting expressions).
* Alias - Similar to a call, but instead of having two elements, it has a name, which is unique for each alias. Two aliases are equal iff their reduced expressions are equal.
Since Meadow is a framework for programming languages, an interpreter for a programming language simply defined a handler for expressions and then feeds the Meadow with expressions. Meadow then recursively calls the handler and builds up the database until all expressions are reduced.
Comparing to Haskell, data constructor names are symbols, nullary functions are aliases, unary functions are symbols, partially-applied binary (and other multi-argument) functions are structs and fully-applied (except nullary) functions are calls.
== Interpreters ==
Interpreter
Category:Languages
Category:Turing complete
Category:2021
Category:Implemented
Category:Functional paradigm
Category:Computational models
Meander

Meander is a minimalistic esolang with only four instructions, created by Brian McPherson[user ns] in 2014.
==Overview==
Programs are treated by the interpreter as being in the form of a one-dimensional tape, but are conceptually equivalent to being in the form of a two-dimensional surface of a tube created by curling the tape to form a spiral with a circumference of 80 cells. For convenience, programs are displayed two-dimensionally as 80-column lines of ASCII text characters.
Pointers have both a position and an angle, with the value of the angle determining how far and in which direction each pointer moves when advanced, emulating movement on a two-dimensional plane.
The instruction pointer is initially placed at the start of the program, and the data pointer is initially placed at the first cell after the end of the program, with both pointers having an initial angle of zero degrees.
All undefined cells have an initial value of zero. There is no input or output, except through direct access to the content of the memory cells.
When loading the source-code, interpreters should ignore all non-command characters, white-space and newline codes. The program-area of the "tape" should contain no non-command characters when the program begins.
==Commands==
Instruction	Meaning
! 	Rotate instruction pointer 45° clockwise
- 	Rotate data pointer 90° clockwise
+ 	Increment value in cell at data pointer and advance data pointer
? 	If value at data pointer is equal to 0 then rotate instruction pointer 90° clockwise, otherwise rotate instruction pointer 270° clockwise
===Pointer Movement===
Pointer Angle	Pointer advances by
0 degrees 	+1 cells per move
45 degrees 	+81 cells per move
90 degrees 	+80 cells per move
135 degrees 	+79 cells per move
180 degrees 	-1 cells per move
225 degrees 	-81 cells per move
270 degrees 	-80 cells per move
315 degrees 	-79 cells per move
==See also==
* Implementation in C
Category:Languages
Category:Low-level
Category:Self-modifying
Category:Two-dimensional_languages
Category:2014
Mel

Mel (Minsky machine equivalent language) is an esolang invented by User:None1.
==Commands==
Every line is a command:
 +++...+<accumulator name>
Increases the accumulator by the number of +'s.
For example:
 +++A
Adds A by 3.
 ---...-<accumulator name>
If accumulator is not zero, decrement the accumulator, otherwise jump to line x, where x is the number of -'s (1-indexed).
For example:
 ---B
Decrements B if it's nonzero, otherwise jumps to line 3.
There are two accumulators: A and B, they are both unbounded. Programs are case-insensitive.
==Translation from minsky machine==
It can be easily translated, for example, this minsky machine program, in Szewczyk notation for Minsky machine notation:
1 -1
1 1
1 1
Can be translated to:
 +A
 -A
 -A
So, it is Turing complete.
==Interpreter in Python==
 import sys
 c=sys.stdin.read().lower().strip().split('\n')
 ip=0
 acc=[0,0]
 while ip<len(c):
 cmd=c[ip]
 idx=(0 if cmd[-1]=='a' else 1)
 if cmd[0]=='+':
 ip+=1
 acc[idx]+=len(cmd)-1
 else:
 if acc[idx]:
 acc[idx]-=1
 ip+=1
 else:
 ip=len(cmd)-2
 # print('a={} b={}'.format(*acc))
Category:Languages
Category:2024
Category:Turing complete
Category:Implemented
Category:No IO
Memescript

Memescript 1.0 is an esoteric language based off of the "frick frack" meme and influenced by brainfuck.
== Commands ==
Command 	Integer Value	Description
what the 	N/A 	start the program
frick frack 	1 	PUSH next value to stack
diddily dack	2 	ADD next value to top of stack value
patty wack 	3 	SUBTRACT next value from top of stack value
snick snack 	4 	MULTIPLY top of stack value by next value
crack pack 	5 	DIVIDE top of stack value by next value
slack mack 	6 	POP top of stack
quarterback 	7 	PRINT - next value is what to print as (2 = character, 1 = integer)
crackerjack 	8 	READ - next value is what to read as (2 = character, 1 = integer)
biofeedback 	9 	begin loop - equivalent to Brainf**k’s [
backtrack 	10 	end loop (ish) - equivalent to Brainf**k’s ]
thumbtack 	11 	not yet implemented
sidetrack 	12 	not yet implemented
tic tac 	13 	not yet implemented
does she 	N/A 	reserved for future use
think she 	N/A 	reserved for future use
is doin 	N/A 	reserved for future use
==Example programs==
===Truth Machine===
what the crackerjack frick frack biofeedback quarterback frick frack backtrack quarterback frick frack
Category:Languages
Category:Unimplemented
Category:2018
Category:Stack-based
Category:Push-down automata
Memfractal

Memfractal is esoteric programming language invented by User:Zzo38.
The entire program must be bounded by a rectangle of # in the border, and ^v<> one each in each side pointing into the program, for example:
 #####v#####
 # #
 # #
 # #
 > <
 # #
 # #
 # #
 #####^#####
Commands are:
* + Embed an entire copy of the program. Each copy also stores one bit of memory. This memory remains even if you exit the block and enter it again later (even from a different direction).
* /\ Change direction of program flow by mirror.
* * Toggle bit of memory of current block.
* X Act / if bit is 1, or \ if bit is 0.
* # Hitting the border is error.
==Computational class==
It has unlimited amount of memory, but it can be accessed only by fractal. Programs can enter/exit a block in only four points. I don't know if you can make decision at an arbitrary point from the local point of memory.
==External Resources==
* Python implementation
Category:Languages
Category:2010
Category:Implemented
Category:Reversible computing
Category:Two-dimensional languages
Category:Unknown computational class
Memfuck

:This article is a work in progress.
Memfuck is a theorized esoteric programming language devised by User:Goosey. Based on brainfuck, Memfuck has many characteristics that resemble brainfuck.
== Overview ==
Much like brainfuck, Memfuck uses a 1D array through which the pointer can move and change values. Unlike brainfuck, Each element in the array is not a single piece of data, but a stack.
A notable difference is that data is not immediately written when incremented, but rather, it's stored as pending data. Pending data is contained in a memory stack. Upon pushing the pending data, the data is popped from the top of the memory stack and pushed to the cell stack, all data in the memory stack will be moved.
=== Commands ===
Command 	Description
> 	Move the pointer to the right
< 	Move the pointer to the left
Increment the value in the memory stack.	
Decrement the value in the memory stack.	
. 	Retrieve the newest value stored in the stack of the current cell and display it in the output
, 	Input and push it to the memory stack. Strings are separated into characters and stored from right to left
[ 	Jumps to the instruction directly after the matching ] if the stacks newest element in the current cell is zero.
] 	Jump back to the matching [ if cell stack is nonzero. (directives of [] can be changed, explained below)
/ 	Pop the newest value in the current cells stack.
\ 	Push the pending data to the top of the current cells stack.
' 	The following character will be converted to it's ASCII code and pushed to the pending data which is ready to be written.
= 	Destroy the memory stack.
==== Brackets ====
Brackets are used to direct flow of a program, the brackets directives can be changed depending on what values the memory stack contains. The directives are controlled by the memory stack, while the compared values are checked against the current cell, and possibly multiple values in the current cell.
Memory Stack	Operation
0 	Operate normally and check for non-zero values.
1 	Compare the top two items of the cell stack and check for equality.
2 	Compare the top two items of the cell stack and check for inequality.
3 	Check for a NULL(0) value.
4 	Ignore the bracket.
== Examples ==
=== Hello World ===
 '!\'d\'l\'r\'o\'W\' \'o\'l\'l\'e\'H\ [./]
=== Cat ===
 (you forgot to add a space to format this)+\[,.]
=== Brackets ===
==== Bracket Equality Check ====
This will loop once, leaving [1] with the data of 1.
 +\+\+[>\<-\+]
== Related Languages ==
* Dimensifuck - A brainfuck variation of multiple dimensions.
* Brainfuck - The famous, 8-command, turing-complete, esoteric language.
Category:Languages
Category:2010
Category:Turing complete
Category:Unimplemented
Category:Brainfuck derivatives
Meow (Martsadas)

Meow is a joke esolang created by User:Martsadas that has 2 registers that can store integers.
=== Instructions: ===
Instruction 	What it does
Meow 	Outputs the value in the register a as an ASCII character to stdout
Put [expression] 	Sets the register a to [expression]
Get 	Reads the first byte from stdin and stores it into the register a
Purr [string] 	Outputs [string] to stdout
Go [expression] [name]	Goes to label [name] if [expression] is negative
Cat [name] 	Creates a new label named [name]
Move 	Swaps the primary register a and the secondary register b
Exit 	Halts the program
=== Notes: ===
* Expressions can't have spaces
* The primary register is a and the secondary register is b
* When there is no more input in stdin, Meow Will assume that the input is -1
=== Example programs ===
==== Cat program ====
 Cat loop
 Get
 Meow
 Go a exit
 Go -1 loop
 Cat exit Exit
==== Hello, world! ====
 Purr "Hello, World" Exit
==== Truth-machine ====
 Get
 Move
 Put b-48
 Cat loop
 Move Meow Move
 Go -a loop
 Exit
==== 99 bottles of beer ====
 Put 99
 Cat loop
 
 Move
 Put 48+(b/10) Meow
 Put 48+(b%10) Meow
 
 Purr " bottles of beer on the wall,
 "
 
 Put 48+(b/10) Meow
 Put 48+(b%10) Meow
 
 Purr " bottles of beer.
 Take 1 down,
 Pass it around,
 "
 
 Move
 Put a-1
 Move
 
 Put 48+(b/10) Meow
 Put 48+(b%10) Meow
 
 Move
 
 Purr " bottles of beer!
 
 "
 
 Go -(a-2) loop
 
 Purr "2 bottles of beer on the wall,
 2 bottles of beer.
 Take 1 down,
 Pass it around,
 1 bottle of beer on the wall, 
 
 1 bottle of beer on the wall,
 1 bottle of beer.
 Take 1 down,
 Pass it around,
 0 bottles of beer on the wall,
 "
 
 Exit
==== FizzBuzz ====
 Put 0
 Cat loop
 Put a+1
 Go (a%15)-1 fizzbuzz
 Go (a%3)-1 fizz
 Go (a%5)-1 buzz
 Go -1 num
 Exit
 
 Cat fizzbuzz
 Purr "FizzBuzz
 " Go a-999 loop Exit
 
 Cat fizz
 Purr "Fizz
 " Go a-999 loop Exit
 
 Cat buzz
 Purr "Buzz
 " Go a-999 loop Exit
 
 Cat num
 Move
 
 Put 48+(b/100%10) Meow
 Put 48+(b/10%10) Meow
 Put 48+(b%10) Meow
 Purr "
 "
 
 Move
 Go a-999 loop Exit
==== Factorial ====
 Get Meow
 Purr "! = "
 Put a-48
 Move Put 1 Move
 
 Cat loop
 Move Put a*b Move
 Put a-1
 Go -(a-1) loop
 
 Put 48+(b/100000%10) Meow
 Put 48+(b/10000%10) Meow
 Put 48+(b/1000%10) Meow
 Put 48+(b/100%10) Meow
 Put 48+(b/10%10) Meow
 Put 48+(b%10) Meow
 
 Exit
==Interpreter==
* Common Lisp implementation of the Meow programming language.
Category:Joke languages
Category:Languages
Category:Thematic
Category:Pseudonatural
Category:Implemented
Meow (tommyaweosme)

meow is a language created by user:tommyaweosme.
== commands ==
=== datatypes ===
 cat - string
 treat - number
 toy - float
 sleep - boolean
 kitty() - convert to cat
 feed() - convert to treat
 play() - convert to toy
 snore() - convert to sleep
=== loops ===
 roar(x[pythoncompare]y): - if
 mew(x[pythoncompare]y): - while
 bark([statement]): - if statement is error
 purr,: - else
 purrr,(x[pythoncompare]y): - elif
=== other ===
 (varname) = meow([pythonstatement]) - do math or whatever statement
 meow() - print cat or whatever statement
 dinner (commandname): - define command
 pet - input (also works when defining variable)
== examples ==
=== hello world ===
 meow("hello world")
=== cat ===
 meow(pet)
==== inficat ====
 mew(1==1):
 meow(pet)
=== amo gus ===
 whar = pet
 roar(whar==amo):
 meow(gus)
 purrr,(whar==gus):
 meow(amo)
=== truth machine ===
 whar = pet
 meow(whar)
 snore(whar)
 mew(whar):
 feed(whar)
 meow(whar)
 snore(whar)
Category:Languages Category:Pseudonatural Category:Unimplemented
Meq

Meq was created by Richard Sparrow (User:TheMeq) in April 2015. 
==Instructions==
You have 1000 pointers that can be assigned a value. 
Loops cannot be nested within each other.
Instruction	Description
> 	Increase pointer location by 1.
< 	Decrease pointer location by 1.
r 	Reset pointer location to 0.
t 	Set current pointer value to 0.
+ 	Increase value contained in current pointer by 1.
- 	Decrease value contained in current pointer by 1.
= 	Increase value contained in current pointer by 10.
_ 	Decrease value contained in current pointer by 10.
. 	Increase value contained in current pointer by 50.
, 	Decrease value contained in current pointer by 50.
: 	Increase value contained in current pointer by 100.
; 	Decrease value contained in current pointer by 100.
p 	Print out the ASCII code of the value in the current pointer.
g 	Print out the value in the current pointer.
q 	Set the first reserved variable to the value in the current pointer.
w 	Set the second reserved variable to the value in the current pointer.
z 	Set the first reserved variable to the value of the second reserved variable.
x 	Set the second reserved variable to the value of the first reserved variable.
a 	Add the value of the first reserved variable to the second reserved variable and put it in the current pointer.
s 	Subtract the value of the first reserved variable from the second reserved variable and put it in the current pointer.
d 	Multiply the values of the first reserved variable and the second reserved variable and put it in the current pointer.
w 	Divide the value of the first reserved variable into the second reserved variable and put it in the current pointer.
[ 	Start a loop, the number of loops is determined by the value in the previous pointer.
] 	End the loop.
@ 	Print out the Meq About screen.
! 	End of Program marker.
==Hello World==
.==++>:+>+>[:++++++++>]:=+>===++>.===+++++++>:=+>:=++++>:++++++++>:rp>p>>p>p>p>p>p>p>p>p>p!
==External resources==
*