InputSet
		
		
		
		Jump to navigation
		Jump to search
		
InputSet is an esolang by User:ChuckEsoteric08 inspired by Wheat.
Specification
Memory consists of variables which contain arbitrary long strings. On the start of the program all of them are set to empty string
a, b and c are arguments that can be replaced with:
(a) which returns value of variable a.
(a/n) which returns n-th symbol in string a.
{a} which returns lenght of string a.
$ for refecencing current character in for loop
In all commands except in "input" command, argument a in "set" command and argument b in "replace" command. Arguments are seperated by space.
input a | 
Store user input in variable a
 | 
output a | 
Output string a
 | 
set a b | 
Set variable a to string b
 | 
for a { | 
Run code between this command and matching } command for every character in string a.
 | 
} | 
End for-loop | 
if a b [ | 
If string a is equal to string b execute commands between this command and matching ] command
 | 
] | 
End if-statement | 
forever ( | 
Start of forever loop | 
) | 
End forever loop | 
replace a b c | 
Replace a-th character in variable b with string c. If there is no c, then it would delete that symbol.
 | 
Examples
Hello, World!
output Hello,World!
Computational class
InputSet is Turing-complete because there is Cyclic Tag interpreter in it (version with comments is here):
input data
input program
forever (
for (program) {
if $ ; [
replace 1 data
]
if $ 1 [
if (data/1) 1 [
if (data/{(data)}) 1 [ 
replace {(data)} data 11
]
if (data/{(data)}) 0 [
replace {(data)} data 01
]
]
]
if $ 0 [
if (data/1) 1 [
if (data/{(data)}) 0 [ 
replace {(data)} data 00
]
if (data/{(data)}) 1 [
replace {(data)} data 10
]
]
]
}
)
Data is inputed First, then program itself