nyuuzyou/wikis huggingface dataset:
Regular expression

A regular expression, regexp, or regex is a string which describes a regular language by describing the structure of every string in that language. Each regular language can be recognized by a particular finite-state automaton.
There are several syntaxes and minor variations used to notate regular expression, but they generally consist of the following substructures:
 ab concatenation: match a followed by b
 a|b alternation: match either a or b
 (a|b)a grouping: subvert precendence rules
 a* Kleene closure: match zero or more occurances of a
 ε epsilon (empty): match the null string
Because a regular expression is a string that describes strings, it is a meta-string. Also because of this, it needs either an extended alphabet from the strings it describes, or some concept of quoting.
Category: Computational models
Relative Subleq

Relative Subleq is an OISC esoteric programming language directly based on standard Subleq.
Memory in Relative Subleq is made up of 3 elements:
# a memory pointer, called P
# a memory tape, unbounded in both directions, with each cell being an unbounded signed integer
# an input-output queue, which upon initialization contains the inputs list of the program, terminating the list with the number 0 
Instructions are still 3 arguments (A,B,C), like in Subleq, however rather than being the current location of the pointer and the two cells to the right, they are the cell to the left (A), the current location of P (B), and the cell to the right (C).
The single instruction is described in pseudocode (following Lua's code conventions) as follows, using the notation "tape[x]" to denote "cell with address = (x)":
 A = tape[P-1]
 B = tape[P]
 C = tape[P+1]
 if A ~= 0 then
 a = tape[P+A]
 else
 a = ioqueue:pop()
 end
 
 if B ~= 0 then
 tape[P+B] = tape[P+B] - a
 condjump = (tape[P+B] <= 0)
 else
 ioqueue.push(a)
 condjump = true
 end
 
 if condjump and (C ~= 0) then
 P = P+C
 elseif not condjump then
 P = P+3
 else
 halt()
 end
Outputting is handled as follows:
Upon pushing 0, check if previous backmost item of queue is negative. If so, make a list of the next n many backmost items in the queue, where n is the absolute value of the previous backmost item of the queue. In the list, these should be ordered frontmost to backmost, and not include the newly pushed 0 or the negative-valued item preceding it. For all items k of the new list:
* If 0 < k < 256, replace k in the list with the corresponding ext. ASCII char.
* If k < 0, replace k in the list with the bitwise inversion of k.
* If k == 0, discard all previous items of the list, including this one.
Upon reaching the end of the list, concatenate all remaining integer or char items of the list into a string, and then print the result.
The behavior of values >=256 is left undefined, to permit implementations to use these values for other purposes.
Category:Languages Category:2024 Category:Low-level Category:OISC Category:Unimplemented Category:Cell-based Category:Self-modifying
Remove Line Numbers

Remove Line Numbers (you can use RLN for short), is a joke esolang created by User:None1.
===Syntax===
RLN's syntax is:
 <line-number><spaces><text>
Line number must be a positive decimal integer, and represents exactly the line number of the text.
For example:
 1 a
is correct, but
 -1 a
 0x0f a
 4.5 a
 2 a
 (0110110001)[2] a
 5+1 a
 4^2 a
 sin(90deg) a
are all incorrect.
Note that text can be empty.
===Execution===
When running, the interpreter/compiled executable simply removes all the line numbers from its source code and prints all the text.
===Example Programs===
Hello World:
 1 Hello World!
99 bottles of beers: 
1 99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
1 98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.
1 97 bottles of beer on the wall, 97 bottles of beer.
Take one down and pass it around, 96 bottles of beer on the wall.
1 96 bottles of beer on the wall, 96 bottles of beer.
Take one down and pass it around, 95 bottles of beer on the wall.
1 95 bottles of beer on the wall, 95 bottles of beer.
Take one down and pass it around, 94 bottles of beer on the wall.
1 94 bottles of beer on the wall, 94 bottles of beer.
Take one down and pass it around, 93 bottles of beer on the wall.
1 93 bottles of beer on the wall, 93 bottles of beer.
Take one down and pass it around, 92 bottles of beer on the wall.
1 92 bottles of beer on the wall, 92 bottles of beer.
Take one down and pass it around, 91 bottles of beer on the wall.
--snip--
===Interpreters===
====C++ as Windows executable (64bit)====
#include<cstdio>
#include<cstdlib>
char line[1000000];
int Gets(char *line){
	int i=0,flag=0;
	while(1){
		char c=getchar();
		if(c==EOF||c=='\n') line[i]=0;
		if(c==EOF) return EOF;
		if(c=='\n') return 0;
		if(c!=' ') flag=1;
		if(!flag) continue;
		line[i]=c;
		i++;
	}
}
void error(){
	puts("Invalid syntax");
	exit(1);
}
#define gets Gets
int main(){
	int l=0;
	while(1){
		l++;
		int x=-1;
		if(scanf("%d",&x)==EOF) break;
		if(x!=l) error();
		gets(line);
		puts(line);
	}
	return 0;
}
===See Also===
* Preserve Line Numbers
Category:Languages
Category:Joke languages
Category:Output only
Category:Unusable for programming
Category:Implemented
Category:Total
Category:2023
Rename

rename is an esoteric programming language created by Claudio Calvelli, maintainer of CLC-INTERCAL, in 2010. It relies on a form of self-modification for control flow.
==Instructions==
<nowiki>hex source description
code code
00 (blank line) Execute the next opcode
01 PUSH Push the next opcode to the stack (as a character)
02 POP Discard the top of the stack
03 COPY Duplicate the value on top of the stack
04 APPEND Append the next opcode to the top of the stack (string)
05 INPUT Reads one character from standard input, push to the stack
06 OUTPUT Prints (and discards) the top of the stack
07 SWAP Swap the two values on top of the stack
08 ALTER Pop a string from stack; copy it to program memory after
 this opcode (this ALTERs the program)
09 ADD Pop a number, add it to new top
0A SUBTRACT Pop a number, subtract it from new top
0B MULTIPLY Pop a number, multiply new top by this value
0C DIVIDE Pop a number, divide new top by this value
0D NEGATE Negate number on top of stack
0E CONCATENATE Pop top of stack, append it to new top (string)
0F RENAME Add the next opcode to every single opcode in the program
 (with wraparound, so 200 + 57 == 1)
10-13 reserved (I know what I want here but I'm not telling yet)
14 ARGUMENT Push next command line argument to stack
15 COUNT Push number of command line arguments remaining
16 DEPTH Push the number of stack elements to stack
17 ROTATE Pops two numbers n, m. Rotate the topmost n elements by m
18 OROTATE Same as rotate, but uses next two opcodes as n, m
19 DIG Pops a number(*) n. Duplicates n-th topmost element to top
1A ODIG Same as dig, but uses next opcode as n
1B-FF reserved</nowiki>
==External resources==
* The announcement on alt.lang.intercal
* The first interpreter (note: no guarantees the site is accessible at any time, but it's the only know copy)
* A hello world program (same note as previous link)
Category:Languages
Category:2010
Category:Implemented
Category:Unknown computational class
Reng

Reng is a two-dimensional programming language that borrows mostly from ><> made by User:Conor O'Brien. While being large on structural and manipulation commands, Reng lacks some basic commands like inequality and exponentiation. One of the most dynamic feature of Reng is the notion of redefining characters.
== Language Overview ==
The program structure is a codebox similar to Befunge and ><>. Reng shares many similarities with ><>, having a near-bijection of commands. Reng focuses more on the algorithmic side of programming, along with the self-modification of the program and of its commands. More control structure is provided, and single-line programming is encouraged.
== Commands ==
Undocumented as of yet.
== Interpreters ==
The most updated interpreter is found on jsfiddle, but another one is found here.
Renumbering

Renumbering is an esoteric programming language created by User:DoggyDogWhirl. It was created around the idea of re-assigning values to integers.
==Overview==
Instead of integer literals, Renumbering uses variables whose names are integers, and which are initialized to that integer's value.
Negative integers are preceded with a _ (e.g. _1 is initialized to -1).
The operations +-*/%^ are used on two variables, and re-assign the first variable to the result of the expression (compound assignment operators).
= directly sets the first variable to the value of the second.
Operation 	Description
A = B 	Assignment: Sets A to the value of B.
A [+-*/%^] B	Compound Assignment: Sets A to the result of the operation between the values of A and B.
I A 	Input: Sets A to the value inputted.
O A 	Output: Outputs the value of A. Floors decimals and raises an error if negative.
C A 	Character Output: Outputs the value of A as a character. Floors decimals and raises an error if negative.
G A 	Goto: Execution jumps to the command numbered the value of A (1-indexed).
Floors decimals. Does not jump if less than or equal to 0. Program ends if index is too high.
Relevant xkcd.
==Example programs==
===2===
Outputs 2 as a number.
 O2
Outputs the character "2".
 C50
===Hello, world!===
 C72 C101 C108 C108 C111 C44 C32 C119 C111 C114 C108 C100 C33
===Truth-machine===
 I1 C1 3=1 3-48 3*2 G3
===Cat program===
 I_1 C_1 3=2 3*_1 4=1 4+_1 3/4 G3
===Fibonacci sequence===
 _1=2 2=1 1+0 0=2 O0 C10 G_1
===Infinite counter===
 O0 C10 0+1 G1
===Prime numbers===
 _1=1 _1+1 
 _2=1 _2+1
 _3=_2 _3-_1 _3+1 _3*19 G_3
 _4=_1 _4%_2 
 _5=_4 _4*6 _5*2 _5+1 _4/_5 _4+2 G_4
 O_1 C10 G2
==Implementation==
Implementation in Python
Renumbering/Python Implementation

:< Back to Renumbering
Written in Python 3.
 code="""code goes here"""
 import sys
 
 code=code.split()
 vardict={}
 for i in range(len(code)):
 for sym in "+-*/%^=IOCG":
 if sym in code[i]:
 code[i]=code[i].split(sym)
 if sym in "+-*/%^=":
 assert len(code[i])==2, "Expressions may have only one operation"
 if sym in "IOCG":
 assert code[i][0]=="",i+" does not use an initial variable"
 del code[i][0]
 code[i].insert(0,sym)
 try:
 for num in [1,2]:
 s=1
 if code[i][num][0]=="_":
 s=-1
 code[i][num]=code[i][num][1:]
 code[i][num]=s*eval(code[i][num])
 vardict[code[i][num]]=code[i][num]
 except IndexError:
 pass
 
 cp=0
 while cp<len(code):
 if code[cp][0]=="+":vardict[code[cp][1]]+=vardict[code[cp][2]]
 if code[cp][0]=="-":vardict[code[cp][1]]-=vardict[code[cp][2]]
 if code[cp][0]=="*":vardict[code[cp][1]]*=vardict[code[cp][2]]
 if code[cp][0]=="/":vardict[code[cp][1]]/=vardict[code[cp][2]]
 if code[cp][0]=="%":vardict[code[cp][1]]%=vardict[code[cp][2]]
 if code[cp][0]=="^":vardict[code[cp][1]]**=vardict[code[cp][2]]
 if code[cp][0]=="=":vardict[code[cp][1]]=vardict[code[cp][2]]
 if code[cp][0]=="I":vardict[code[cp][1]]=ord(sys.stdin.read(1))
 if code[cp][0]=="O":print(vardict[code[cp][1]],end="")
 if code[cp][0]=="C":print(chr(int(vardict[code[cp][1]])),end="")
 if code[cp][0]=="G":
 if int(vardict[code[cp][1]])>0:cp=int(vardict[code[cp][1]]//1-2)
 cp+=1
Category:Implementations
Replace

Replace is an esoteric programming language created by Max Black based around regular expressions. All commands in the language follow the syntax of find/replace. The input to these commands is the program itself meaning that you can dynamically change other commands. When all commands have been evaluated the remainder of the program source is outputted.
==Examples==
===Basic Find/Replace===
 abc/def
 abc
This produces the output:
 def/def
 def
The interpreter first finds the command abc/def. It then searches for occurrences of abc of which it finds two in the command itself and the line below. Then both occurrences are promptly replaced with def and since the second line is not a command execution halts.
===Hello World===
 Hello World!
If a line is not a find/replace command then it is simply ignored.
==External resources==
* Offical Interpreter
* Unofficial interpreters in C++, Perl, Go, Ruby and Kotlin
Replacefuck

Replacefuck is a Brainfuck derivative based around pre-processing made by User:TieSoul in 2014.
==Language overview==
Replacefuck is based around pre-processing. Namely, before the actual program, you can define 'functions'. Those functions are defined in this manner:
ZERO:[-]PLUSn:+n
Functions must be defined on separate lines, which is to say, with a linefeed character between them. Additional newlines are not allowed. Variables in functions must be at the end of the function name. Variable n in the PLUS function of the example replaces iself and the character before it with n copies of the character before it, essentially multiplying the character that comes before it by n.
The program itself is also defined as a function PROG, and cannot contain any Brainfuck code, and must consist solely of function calls and comments, like this:
PLUSn:+nCOPYnp:[>n+>p+<nOUTPUTALL:+[>.]PROG:PLUSfPLUSfPLUSfPLUSfPLUSf COPY11 OUTPUTALL
This outputs KK, twice ascii number 75.
Numbers you can use for functions in the PROG function are single-digit hexadecimal numbers: 0-f.
==Computational class==
Translation from Brainfuck easy; Turing-complete.
==External resources==
*TieSoul's original implementation
*Multilang, a shell supporting multiple esolangs, including Replacefuck.
Category:Brainfuck derivatives
Category:Languages
Category:Implemented
Category:2014
Category:Turing complete
Category:Cell-based
Category:Low-level
Replay

Replay is an esoteric programming language.
==Syntax==
A Replay program consists of a series of lines of code, and on each line there is a string of characters which is referred to as a state-name. With the exception of the last line, which may be a duplicate, the state-names on each line must be distinct.
==Execution==
Execution starts at the first line of code, and proceeds step-by-step. With each step, the starting and ending state-names are recorded, and output to the console. In a Replay program the state-name on the last line may be the same as one of the prior lines, in which case execution jumps to that line, creating a loop. If the state-names on every line are distinct, then the program terminates when it gets to the last line.
==Example Programs==
===Program===
 A
 B
 C
 D
===Output===
 A -> B
 B -> C
 C -> D
===Program===
 A
 B
 C
 D
 B
===Output===
 A -> B
 B -> C
 C -> D
 D -> B
 B -> C
 C -> D
 D -> B
 etc. (non-terminating)
==Program Size==
In a Replay program, the maximum number of lines of code, and the maximum size of the strings representing state-names are both theoretically infinite. In practise, a program running on a computer will limit both of these due to limits in available memory and integer representation.
==Turing Completeness==
Replay is Turing Complete. To see why, consider its relationship to Jumpy. Jumpy is considered Turing Complete. We can map a Jumpy program onto an equivalent Replay program as follows. First we identify all the numbers that are actually used when executing the Jumpy program, and re-arrange these states into execution order. If there is a loop, then we identify the number that jumps us back into the loop, and write that as the last line of the Replay program.
===Example===
====Jumpy program====
 3
 2
 1
 4
 5
====Output====
 0 -> 3
 3 -> 4
 4 -> 5
====Replay program====
 0
 3
 4
 5
====Output====
 0 -> 3
 3 -> 4
 4 -> 5
Category:Languages
Reset

Reset is an esolang that is based entirely off of a dream User:Infinitehexagon had about a viral programming language on the internet. This esolang is heavily inspired off of ΙΧΘΥΣ.
==Instructions==
===Lowercase===
Instruction	Description
r 	output the accumulator.
e 	set the accumulator to itself mod 256.
s 	decrement the accumulator by 1.
t 	raise the accumulator to the power of 2.
` 	store input into the accumulator.
1 	increment the accumulator.
===Capital===
Instruction	Description
R 	reset the accumulator to 0.
E 	set the accumulator to itself times 2.
S 	jump to the previous S if the accumulator is a nonzero value.
T 	halt the program.
==Programs==
===Hello World program===
111EtEr
11111Et1r
1111111r
111rr
Category:Languages Category:Unusable for programming
Reso

Reso is a graphical esoteric programming language which defines a logic circuit using a bitmap image. The basic components (AND and XOR) gates can be used to construct other logic gates, and with enough resources, a computer. It uses ten colors: Dark-teal for 'AND' gates, bright-teal for 'XOR' gates, dark-purple for logic gate input, bright-purple for logic gate output, and six colors for the wires (orange, sapphire, and lime wires, with an on/off state each.)
All at once, Reso refers to (1) the graphical language which defines a logic graph, (2) the compiler which maps an image to a Reso circuit, and (3) the interpreter which simulates the Reso circuit and outputs the results.
The language is implemented, but is in the 0.0.x release with breaking changes expected. 
==History==
Reso's first implementation was in 2018 in Python, with a different palette with only two wire colors. Reso was tweaked in 2021 for !!Con, adding a new palette and a third wire color. Reso was then reimplemented in 2023 in Rust, with the Python implementation being deprecated.
In 2024, Reso has ongoing rewrites to make it easier to construct complicated logic components to make it easier to construct non-planar graphs using 2D bitmaps, to address the Wire-crossing problem.
==External resources==
* Reso dev website
* Reso palette reference
* Source code (GitHub)
* Source code (GitLab)
* Rust crate
Category:Languages
Category:Turing complete
Category:Two-dimensional languages
Category:Implemented
Category:Non-textual
Category:Low-level
Category:2024
Category:2018
Category:Self-modifying
Category:Cell-based
Category:Data Types and Structures
Category:Stubs
Resta

Resta(Reversed Questa) is an Esoteric data structure by User:ChuckEsoteric08
==Operations==
 PUSH1 X
Push X to the top of Resta
 PUSH2 X
Push X to the bottom of Resta
 POP X
Pop value at the top (or bottom, depending on the language) and discard it
==See also==
* Questa
Category:Data Types and Structures
Restricted BlooP/FlooP

This is a restricted kind of Douglas Hofstadter's BlooP/FlooP programming language. There is no primitive adding, multiplying, and comparing; there is no conditions and no tests; the only primitive is successor operation.
I use the convention that a question mark is just like a letter and that 1 is the same as YES and 0 is the same as NO. It is also assumed that CELLs are local to each procedure.
You can see how many things are not needed:
 IF
 AT MOST
 QUIT BLOCK
 ABORT LOOP
 addition
 multiplication
 comparison
Actually, the ABORT LOOP command will be needed inside of a MU-LOOP block. You can assume the command "ABORT LOOP;" aborts the innermost mu-loop.
==Add two numbers==
 DEFINE PROCEDURE ADD [X,Y]:
 BEGIN:
 CELL(0) <- X;
 LOOP Y TIMES:
 BEGIN:
 CELL(0) <- ^CELL(0);
 END;
 OUTPUT <- CELL(0);
 END;
==Calculate the predecessor of a number==
 DEFINE PROCEDURE PREDECESSOR [X]:
 BEGIN:
 CELL(0) <- 0;
 CELL(1) <- 0;
 LOOP X TIMES:
 BEGIN:
 LOOP CELL(0) TIMES:
 BEGIN:
 CELL(1) <- ^CELL(1);
 END;
 CELL(0) <- 1;
 END;
 OUTPUT <- CELL(1);
 END;
==Subtract two numbers==
 DEFINE PROCEDURE SUBTRACT [X,Y]:
 BEGIN:
 CELL(0) <- X;
 LOOP Y TIMES:
 BEGIN:
 CELL(0) <- PREDECESSOR[CELL(0)];
 END;
 OUTPUT <- CELL(0);
 END;
==Check if one number is equal to another==
 DEFINE PROCEDURE EQUAL? [X,Y]:
 BEGIN:
 OUTPUT <- YES;
 LOOP ADD[SUBTRACT[X,Y],SUBTRACT[Y,X]] TIMES:
 BEGIN:
 OUTPUT <- NO;
 END;
 END;
==Check if one number is greater than another==
 DEFINE PROCEDURE GREATER? [X,Y]:
 BEGIN:
 LOOP SUBTRACT[X,Y] TIMES:
 BEGIN:
 OUTPUT <- YES;
 END;
 END;
Restricted batch

Restricted batch is an esolang created by User:None1 based on Batch
==Command==
There is only one command: echo. And this command has only one usage:
 echo <STRING>
Which prints out <STRING>.
==Example Programs==
===Hello World===
 echo Hello World!
==Interpreter==
===Python===
while 1:
 try:
 a=input()
 except:
 break
 if a:
 if a.split()[0].lower()=="echo":
 print(a[5:])
 else:
 raise ValueError("Invalid command")
Category:Languages
Category:Joke languages
Category:Output only
Category:Unusable for programming
Category:Total
Restricted chicken

Restricted chicken is a derivative of chicken, created by User:None1
==Command==
There is only one command: chicken, which prints "chicken" (without quotes) , other commands are considered invalid.
==Example Programs==
===Quine 1===
 chicken
===Quine 2===
 chicken
 chicken
Any valid program is a quine.
==Interpreters==
===Python===
while 1:
 try:
 code=input()
 except:
 break
 if code!='chicken':
 raise ValueError('invalid program')
 print('chicken')
===C++===
#include<iostream>
#include<string>
#include<exception>
using namespace std;
int main(){
 string s;
 while(getline(cin,s)){
 if(s!="chicken"){
 throw new exception;
 }
 cout<<"chicken"<<endl;
 }
 return 0;
}
Category:Total
Category:Languages
Category:Joke languages
Category:Unusable for programming
Category:Output only
Category:Implemented
Retina

Retina is a regex-based programming language developed by user:Martin Ender. The main design goal of Retina is to be able to use regular expressions with as little boilerplate code as possible. It runs on the .NET regex engine, meaning that both .NET and ECMAScript flavors are available. It is primarily used for code-golfing.
For more details about the language, see the GitHub repository. This article will be expanded once the feature set of the language stabilises.
== Examples ==
=== Binary to unary conversion ===
 1
 0#
 +`#0
 0##
 0
 (an extra line must be present)
Try this program online.
==External resources==
* GitHub repository including language documentation, C# implementation, issue tracker and example programs.
* Online interpreter at Try It Online.
Category:Languages
Category:Turing complete
Category:Implemented
Category:2015
Return-oriented programming

Return-oriented Programming (ROP) is a naturally occurring esoteric language that arose in the exploitation of W^X programs which means that data in the programs' memory is writable or executable but not both. Programs with W^X cannot be exploited in the usual way of supplying compiled code to be directly executed as data to the program, instead a technique was devised in [1] to piece together a Forth-like programming language out of small segments of already existing "innocent" code that ends in RET.
Programming is done by putting pointers to these gadgets as well as constant data for them to reference on the stack. Hovav describes building a trie of gadgets by searching backwards from RET instructions in libc, after finding enough of these he shows how to piece them together to perform various boolean operations, arithmetic and then unconditional and conditional jumps as well as system calls - it is noted that the "instruction set" of gadgets form a Turing-complete set. The Weird Machines paper [2] discusses the more general phenomenon of higher complexity languages showing up unwanted in programming.
== Example ==
A simple example of loading a constant into a register:
 | ... |
 +------------+
 | 0xdeadbeef |
 +------------+
 | -----------> pop edx
 esp --> +------------+ ret
 | ... |
The constant is stored on the stack and then the gadget to load it is pointed to. When the program execution loads its return address off the stack by popping esp it will execute that gadget.
== References ==
* [1] The Geometry of Innocent Flesh on the Bone - Return-into-libc without Function Calls (on the x86) - Hovav Shacham (2007)
* [2] Exploit programming - Weird Machines From Buffer Overflows to "Weird Machines" and Theory of Computation - Bratus et al. (2011)
Category:Concepts