nyuuzyou/wikis huggingface dataset:
Mutable compile-time state in C++

In C++, constexpr functions are supposed to be pure functions in the Haskell sense: deterministic (the return value is a mathematical function of the arguments) and without side effects. But the rules of C++ got so complicated that there turned out to be ways to create impure constexpr functions. 
The methods use SFINAE to detect whether some function is defined. Most of the straightforward ways of these are undefined behavior without diagnostics according to the C++ standard. But Filip Roséen found techniques that are genuinely allowed by the C++ standard, and not just because of some trivial to fix mistakes. He described these in a series of three blog posts in 2015.
#https://web.archive.org/web/20161217033223/http://b.atch.se/posts/non-constant-constant-expressions/ Non-constant constant-expressions in C++
#https://web.archive.org/web/20161217232535/http://b.atch.se/posts/constexpr-counter/ How to implement a constant-expression counter in C++
#https://web.archive.org/web/20161217033218/http://b.atch.se/posts/constexpr-meta-container/ How to implement a compile-time meta-container in C++
(Also known as stateful meta-programming in C++)
Category:Proofs
Mutual Modification Machine

Mutual Modification Machine is a Brainfuck derivative where program and memory can switch roles, and this switching serves as the main mechanism for control flow.
== Instructions ==
Mutual Modification Machine borrows all of Brainfuck's instructions except for looping instructions which are replaced by the "#" instruction. In Mutual Modification Machine, the program is a circular tape (wraps around after the last instruction as opposed to halting) howand the memory tape is an unbounded one, initially.
If we encouter a "#" instruction and the current cell is non-zero, we create a new run where the program is interpreted as the memory and vice versa, with pointers being set to 0. The swap also carries the state of being unbounded or circular. Upon halting, we swap the roles back again and continue with the next instruction after the "#", but the modifications to the program persists. Halting only occurs when we encounter a zero cell in the program.
Category:Usability unknown
Category:Languages
Category:Cell-based
Category:2024
Category:Brainfuck derivatives
Category:Unimplemented
Muxleq

MUXLEQ is an experiment in adding a single instruction to Subleq in order to greatly speed up the virtual machine by howerj. Most programs that will run under Subleq will run under MUXLEQ. It adds an instruction that also takes three operands and performs a multiplexing operation on them (hence the name). This allows greatly sped up loading, storing, and naturally bitwise operations. This is not the only experiment in adding an instruction to Subleq (or other OISC variants), for example the paper Subleq(-): An Area-Efﬁcient Two-Instruction-Set Computer describes a two instruction variant that instead adds a bit-reversal function that greatly speeds up some code and should be trivial to implement in hardware given an already working Subleq implementation.
MUXLEQ is capable of running SUBLEQ eFORTH a full blown programming language, along with a modified variant that runs faster on the MUXLEQ machine. The modified
version of SUBLEQ eForth is available in the MUXLEQ repo
The Pseudo-code for the machine is:
 while pc >= 0:
 	a = m[pc + 0]
 	b = m[pc + 1]
 	c = m[pc + 2]
 	pc = pc + 3
 	if a == -1:
 		m[b] = get_byte()
 	else if b == -1:
 		put_byte(m[a])
 	else if c != -1 and c < 0:
 c = abs(c)
 		m[b] = (m[a] & ~m[c]) | (m[b] & m[c])
 	else:
 		r = m[b] - m[a]
 		if r <= 0:
 			pc = c
 		m[b] = r
And a 16-bit implementation in C:
 #include <stdint.h>
 #include <stdio.h>
 
 typedef uint16_t u16;
 static const u16 n = -1;
 static u16 m[1<<16], prog = 0, pc = 0;
 
 int main(int argc, char **argv) {
 	if (setvbuf(stdout, NULL, _IONBF, 0) < 0)
 		return 1;
 	for (long i = 1, d = 0; i < argc; i++) {
 		FILE *f = fopen(argv[i], "rb");
 		if (!f)
 			return 2;
 		while (fscanf(f, "%ld,", &d) > 0)
 			m[prog++] = d;
 		if (fclose(f) < 0)
 			return 3;
 	}
 	for (pc = 0; pc < 32768;) {
 		u16 a = m[pc++], b = m[pc++], c = m[pc++];
 		if (a == n) {
 			m[b] = getchar();
 		} else if (b == n) {
 			if (putchar(m[a]) < 0)
 				return 3;
 		} else if (c & 0x8000 && c != n) {
 			u16 mc = m[c & 0x7FFF];
 			m[b] = (m[a] & ~mc) | (m[b] & mc);
 		} else {
 			u16 r = m[b] - m[a];
 			if (r == 0 || r & 32768)
 				pc = c;
 			m[b] = r;
 		}
 	}
 	return 0;
 }
That does not rely on any signed arithmetic and should be very portable.
With a multiplexing operation it becomes trivial to implement the bitwise operators AND, OR, XOR, Invert and even loading and storing.
Category:Languages Category:Implemented Category:Low-level
My-new-esolang.txt

my-new-esolang.txt is an esolang that was rescued from an old hard drive in August 6, 2024 by User:Tommyaweosme. The hard drive was of his, but unfortunately he cannot remember the language.
== The file ==
Most of it was corrupted except the end. It consists mostly of examples.
 Hello World program:
 Pifmmpypsme
 
 Alternative:
 P[h[e[l[l[o[w[o[r[l[d
 
 Truth Machine:
 I
 >1-(P[1)
 >0-P[0
 
 Cat:
 PI
 
 I'm sure there are more programs to be found in this amazing language! :D
 
 - This is BluefireHD, signing off -
Tommyaweosme was called "BluefireHD" back when this file was made.
Category:Languages
MyOwnLanguage

MyOwnLanguage is an esoteric programming language invented by CGCC User Ilmari Karonen in the standard loopholes post.
== Instructions ==
* x: read a sequence of numbers, split them into groups of three, and print the last numbers of those groups where the second number is less than the first
==Interpreter in Python 3==
 def MyOwnLanguage():
 iseq = tuple(map(int, input().split()))
 seq = tuple(zip(iseq[::3], iseq[1::3], iseq[2::3]))
 for a, b, c in seq:
 if b < a:
 print(c)
Category:Languages
Category:2014
Category:Total
Category:Unusable for programming
Category:Golfing language
Category:Implemented
MyScript

MyScript is an esolang created by User:PythonshellDebugwindow in late 2019. It was based on JavaScript.
==Syntax==
===Functions===
Functions in MyScript are different in that they don't need brackets, e.g. function() -> function and add(a, b) -> add a b. This means that functions can't have arbitrary amounts of arguments (but an array could easily be used instead). So what in many languages would be
 B(A(D()), C(D(), B(E(), D()), E())))
if instruction A takes 1 argument, B takes 2, C takes 3, and D and E both take none, then the equivalent MyScript code would be
 B A D C D B E D E
===User-Defined Functions===
To create one:
 var fname is func *args
 ...
To return:
 return
Or:
 return val
Function to print Hello World:
 var printHelloWorld is func
 say "Hello, World!"
Function to add 2 numbers:
 var add2Numbers is func firstNum secondNum
 return add firstNum secondNum
Function to sum an array (this one’s a bit more advanced):
 var sumArray is func a
 var res is 0
 var i is 0
 while less i arrlen a,
 res is add res itemat a i
 i is add i 1
 return res
===Variables===
To create one:
 var vname is val
To modify one once created:
 vname is val
To access one once created:
 vname
===Math===
To add A and B:
 add A B
To subtract them:
 subtract A B
Multiply:
 multiply A B
Divide:
 divide A B
===Switch===
In MyScript, the keywords if and else keywords are used with the check keyword to form a switch statement:
 check val?
 if value1,
 ...
 if value2,
 ...
 ...
 if valueN,
 ...
 else,
 ...
if is like case, and else is like default. You can have any amount of ifs, and 0 or 1 elses.
===While===
Executes code while condition converted to a boolean evaluates to yes (true):
 while condition,
 code
Loops until the user says "stop":
 say "Say 'stop' to stop"
 while not equals ask "stop",
 say "Say 'stop' to stop"
 say "You said 'stop'"
==Datatypes==
Datatype 	Example
Integer 	123
Float/double	123.45
String 	"abc\nThis is a \"test\""
Boolean 	yes
Array 	[123, 4.5, "s", no, 0, 3.14159]
Strings only use double quotes (valid escape sequences are \0, \n, \\, \t, \f, and \"), and Boolean true is represented by yes and false by no.
==Examples==
===Hello, World!===
 say "Hello, World!"
===Cat===
 say ask
===Infinite cat===
 while yes,
 say ask
===Truth-machine===
 check ask?
 if "1",
 while yes,
 say "1"
 else,
 say "0"
===Simple "class"===
 var MyClass is func prop
 return [prop]
 var MyClass_myMethod is func obj
 say concat "obj.prop: " itemat obj 0
 var MyClass_getProp is func obj
 return itemat obj 0
 var myObject is MyClass "Hello!"
 MyClass_myMethod myObject
This should print obj.prop: Hello!.
Category:2019 Category:Languages Category:Turing complete Category:Unimplemented
My Whole Life

This is a Brain[DATA EXPUNGED] based on my life with strict parents.
== Commands ==
Arguments in commands are stringed characted counts. Punctuation counts as a decimal point followed by the count of letters (e.g. "let me move out"=3243 and "go home, because I am tired"=24.7125). Using 'please' makes a number negative. Also, 'go out' will pop the stack then return it (can be combined with please for 0-stack pop)
 Caption text
Instruction 	Needs argument?	What it does
can I ...? 	yes 	add arg to cell
dad, can I ...? 	yes 	subtract arg from cell
may I ...? 	yes 	multiply cell by arg
dad, may I ...? 	yes 	divide cell by arg
shall I ...? 	yes 	raise cell to arg power
please let me ... 	yes 	modulo cell by arg
okay 	no 	go to last cell
fine 	no 	go to next cell
no 	no 	if cell is zero, get char input and store into cell, else, print cell value as Unicode char (rounded down)
ask your mother 	no 	print cell value
yes 	no 	print cell value as binary (WARNING: THIS INSTRUCTION IS VERY DANGEROUS)
where do babies come from?	no 	get number input and store into cell
excuse me 	no 	zero cell
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Example 	Example 	Example
Mycelium

Mycelium is an image-based esoteric programming language designed by Lode Vandevenne in 2005. The commands are read from a png image. There is some freedom in the colors you can give a pixel to get a certain command, so it's possible to create an image out of commands or encode the commands in a photo.
Mycelium has both memory and a stack. Stack and Memory are of arbitrary size and consist out of signed integers of at least 32 bits. There is also a gosub stack used to remember where to return to. It remembers the location and direction of the instruction pointer.
==Commands==
Every command is an RGB pixel with 8 bit per color channel. R % 16 (R modulo 16) selects the command or group of commands, G and B select the behaviour, the actual command or data. For some commands, G and B are unused and may be anything.
*IP = Instruction Pointer (x, y, direction)
*MP = Memory Pointer
**MP = Memory value the MP is pointing at
R % 16	Description
0 	NOP
1 	Set IP direction (B % 4 selects direction: e, s, w, n)
2 	Jump over next 256 * G + B pixels
3 	If popped value is 0, jump over next 256 * G + B pixels
4 	Translocation command (B % 8 selects: goto, gosub, return, relative goto, relative gosub)
5 	Memory command (B % 8 selects: set *MP, set *MP, get MP, set MP, MP++, MP--)
6 	Set code pixel color channel (self modifying)
7 	Get code pixel color channel
8 	Push constant: 256 * G + B.
9 	Push two constants: G and B
10 	Stack commands (B % 4 selects: pop, dup, swap, dup2)
11 	Math commands (B % 32 selects: +, -, *, /, %, |, &, ^, ~, >>, <<, ==, !=, >, <, >=, <=, &&, ||, !)
12 	I/O commands (B % 4 selects: print char, get char, print integer)
Other values result in undefined behavior.
==External resources==
* Mycelium interpreter source, examples and spec
* Mycelium in the Esoteric File Archive
Category:Languages
Category:Cell-based
Category:Two-dimensional languages
Category:Implemented
Category:Low-level
Category:Non-textual
Category:2005
Myndzi

Myndzi is a utility IRC cyborg whose main feature is drawing the lower two lines of ascii stick figures if someone else draws the upper line. Myndzi was used by the esoteric languages community. It used to dwell on the #esoteric channel on the freenode IRC server under the nick myndzi. Myndzi's bot half is apparently on hiatus since some time between 2015 and 2019.
An example for basic interaction with myndzi is the following.
 <izabera> \o/
 <myndzi> |
 <myndzi> /`\
Myndzi tries to line up its two lines of output with the first line assuming that the output is formatted in the way that irssi formats lines, so it takes into account the length of IRC nicks. If your nick is shorter than myndzi's, then you usually need to start the first line of the stick figures with spaces, or else myndzi believes that it can't line its answer up below yours, so it won't reply at all.
fungot has a command celebrate to output the first line of several stick figures, triggering myndzi.
Category:People
MysticScript

= MysticScript =
== Overview ==
MysticScript is an esoteric programming language inspired by ancient runes and mystical symbols. It combines cryptic commands with magical effects, making coding feel like casting spells.
== Basic Commands ==
* `%summon` - Start the program
* `%whisper` - Print command
* `%blend` - Addition
* `%split` - Subtraction
* `%chant` - Loop
* `%vanish` - End the program
== Example Programs ==
=== Hello World ===
 
%summon
%whisper "Hello, World!"
%vanish
 
=== Addition ===
 
%summon
%whisper 5 %blend 7
%vanish
 
=== Looping ===
 
%summon
%chant 3
 %whisper "Looping through the mystic realms!"
%vanish
 
MysticScript allows you to harness the power of ancient runes in your code, creating an enchanting and arcane programming experience. CodePhantom (talk)
Myth

Myth is a minimalist Turing-complete non-deterministic esoteric programming language based on the string-rewriting paradigm. Its reference implementation was created by User:Plugnburn for 140byt.es contest in JavaScript (ECMAScript 5 standard) on July 30, 2013 and is only 137 bytes long.
==Language structure==
The interpreter is non-interactive. It takes the Myth code in JSON format as the input and returns the final state as the output.
Myth code consists of key-value string replacement rules.
The string "_" (single underscore) is used as the key to specify the initial state, so it's the only string in Myth that cannot be used as a rewriting rule.
Myth computational model is similar to those in Thue, PROLAN/M and REBEL. The interpreter takes the initial state, repeatedly loops through the rules and applies the first matching substitution, then repeats the outer loop until no rules match the current state, and returns the final state to the environment.
==Examples==
Hello world:
 {"_":"Hello world!"}
Or more complicated version that also shows the rewriting concept:
 {"a":"Hello","b":"world","_":"a b!"}
Binary number increment (a port from Thue page):
 {"1_":"1++","0_":"1","01++":"10","11++":"1++0","_0":"_","_1++":"10","_":"_11111111111_"}
==Implementation==
Reference implementation in JavaScript (137 bytes):
 function(m,y,t,h){m=JSON.parse(m);for(y=m._;h=1;){for(t in m)if(t!="_"&&~y.indexOf(t)){y=y.replace(t,m[t]);h=0;break}if(h)break}return y}
Shorter implementation (106 bytes):
 (m,y,t,h)=>{h=m=JSON.parse(m);for(y=m._;h;)for(t in h=0,m)if(!h&&t!="_")y=y.replace(t,x=>m[h=t]);return y}
==Turing completeness==
As the Myth code can be transparently translated to Thue and vice versa (moreover, Myth code can be considered a JSON-serialized version of Thue code), Myth is also Turing-complete.
==See also==
* String-rewriting paradigm
* Thue
* PROLAN/M
* 140byt.es contest
Category:String-rewriting paradigm
Category:Nondeterministic
Category:Languages
Category:Implemented
Category:Low-level
Category:Turing complete
Category:Turing tarpits
Category:2013
M×N-Dimensional Brainfuck

M×N-Dimensional Brainfuck is a brainfuck derivative with an M-dimensional tape and an N-dimensional program.
The initial pointer direction is positive in the first dimension.
The initial program counter direction is positive in the first dimension.
==Instructions==
Instruction	Description
> 	Move the pointer forward
< 	Rotate the pointer direction
+ 	Increment the memory cell at the pointer
- 	Decrement the memory cell at the pointer
. 	Write the character in the memory cell at the pointer
, 	Read a character and store it in the memory cell at the pointer
[ 	Rotate the program counter direction if the memory cell at the pointer contains zero
] 	Reverse rotate the program counter direction if the memory cell at the pointer contains a nonzero value
Rotating from moving positively/negatively in the nth dimension results in moving positively/negatively in the (n+1)th dimension. Rotating from moving positively/negatively in the Mth/Nth dimension results in moving negatively/positively in the first dimension.
Category:Languages
Category:Low-level
Category:Brainfuck derivatives
Category:Cell-based
Category:Multi-dimensional languages
Category:2016
Möbius

Möbius is an esoteric programming language which works on a Möbius strip. 
== Data Model ==
Möbius works on a resizable möbius ring of deques; initially, there is only a single deque. To access a side of the deques, one must go to that side on the möbius ring. There is a convenient command to do this. Along with the tape of deques, there is a 3-tuple of scalars to be used for variable storage and a stack that can be used for saving the data in this infinite array. I use that data model a lot.
All data storage mechanisms can hold an unbounded number of long integers.
== Commands ==
Command 	Name 	Meaning 	Before	After
! 	NOT 	Logical inversion (0→1, n→0) 	a... 	...(!a)
" 	STRING 	Toggle string mode (start/stop injecting characters as their Unicode values (adds a null before starting))	N/A 	N/A
# 	LOTS 	Pop n, pop v, inject n vs 	ab... 	...(b a times)
$ 	DROP 	Remove a value and discard it 	ab... 	b...
% 	TURN 	Go 360 degrees around the tape 	N/A 	N/A
& 	LOC 	inject the current location 	b... 	(loc)b... (output "a")
' 	INSERT 	Create a new empty deque to the right of the current location 	N/A 	N/A
( 	STARTBLOCK	Begin a command block 	N/A 	N/A
) 	ENDBLOCK 	End a block of commands 	N/A 	N/A
* 	JUMP 	Pop a value and go that many deques around the tape 	ab... 	b...
+ 	INC 	Pop a value and inject its successor 	a... 	...(a+1)
, 	INPUT 	Get a single character as input and enqueue its Unicode value 	... 	...(ord)
- 	DEC 	Pop a value and inject its predecessor 	a... 	...(a-1)
. 	PRINT 	Pop a number and output its Unicode equivalent 	a... 	...
/ 	??? 	??? 	??? 	???
/[0-9A-Fa-f]{1, 4}/	VAL 	Inject a value from a hex code 	... 	...a
== Computational Class ==
The language is not Turing-complete in its current state because it has no flow control mechanism whatsoever. It is impossible for any command to be executed more than once. Thus, every program will halt. If there were a way to conditionally repeat a "block of commands," like, e.g. Brainfuck's [], it would likely be Turing-complete.
 
Category:Languages
Category:Unimplemented
Category:Deque-based
Category:Stack-based
Category:2015
Category:Total
Category:Unusable for programming
Category:Total
N--

N-- is a 6 instruction minimalistic variable based language founded upon the manipulation of bit sequences.
== Commands ==
N	NAND-combines the first bit of its first two inputs. Format: Ninvar1invar2outputvar
L	Left shift, shifts the bits of the select variable. Format: Lvariable
R	Right shift, shifts the bits of the select variable. Format: Rvariable
^	Removes the first bit of a variable. Format: ^variable
v	Adds a 0 bit to the end of a variable. Format: vvariable
!	Nullifies a variable, having it contain a single 0 once done. Format: !variable
== Data Types ==
All data is fundamentally represented in binary sequences of an arbitrary extent. In response to particular circumstances' necessitation, these may be decoded into unsigned integer numbers, or encoded from that numeric type into the bit format.
== Architecture ==
N--'s maintenance of the program data ensues from the use of variables, bifurcating into a quadruple of special-purpose specimens and an abitrary account of such defined by the developer.
=== Variable Naming ===
Variables specified by the programmer are handled as two letter sequences in lowercase, i.e. na, pc, or aa. A user-defined variable always starts with 0 bits.
=== Input and Output ===
N-- accepts both input and output, input and output are mapped to a special case variables named $i and $o respectively. All output is made in the format of ANSII based on binary to decimal.
=== Control Flow ===
$p is the program counter and can be modified to move the pointer to a different character in the data. $s contains the length of the program in characters.
== Examples ==
None not by me, make some and put them here and i will be grateful
=== Initalizing a 0 and 1 variable ===
 vaavabNaaaaab
=== Infinite loop ===
 !$p
=== Evergoing binary appender ===
 ^aaNaaaaaaLaa!$p
=== Input and Output ===
This program queries the user for two characters, NAND-combines their first bits, and prints the result to the standard output by adminiculum of the special variable $o:
 N$i$i$o
==Interpreter==
* Common Lisp implementation of the N-- programming language.
Category:Languages
Category:Low-level
Category:Implemented
N10

n10 is an esolang invented by User:AnotherUser05.
==Syntax==
Every command is one character followed by a numerical, conditional, or math input.
Spaces aren't necessary, but if you want to, you can use them to make your code more readable.
 o - Print the ASCII value.
 n - Print the value.
 i - Returns the user's input.
 u - get another user input.
 +, -, /, * - self explanatory, used in inputs. 1+1
 ~ - mark down an id.
 j - jump to the given id.
 s - if the condition is true, then skip the next command. = < > ! are used.
 v - create a variable with the given id.
 w - use this variable with the given id.
 z - set the current variable to the input.
 ^ - returns a variable with the given id.
==Examples==
===Truth Machine===
 usi=0j1j2~1n1j1~2n0
===Cat program===
 uni
===Adds two numbers===
 v1v2w1uziuw2zin^1+^2
here's a much shorter one:
 v1w1uziun^1+i
===Fixed Repeating Output===
 uv2w2zi~3n1z^2-1s^2=0j3n0
===Fibonacci sequence===
 v0v1w1z1v2~5w2z^0+^1w0z^1w1z^2n^2j5
===Not finite loop===
 ~1j1
Category:Languages