CDILOI
CDILOI (Concatenate, Delete, If, Label, Output, Input) is an esolang by User:ChuckEsoteric08 which was inspired by Gray Snail.
Specification
CDILOI uses unbounded variables to store data. The language is case-insensitive. Note that, because it uses whitespaces to split arguments, strings can't contain these separators.
@x
returns value of the variable x
. If a variable with that name doesn't exist, then create it and set its initial value to the empty string. It would not work if it is z
in CONC
, y
or z
in DEL
, x
in LBL
, z
in IF
or x
in INP
CONC x y z
Concatenate the strings x
and y
and store the result in the variable z
.
DEL x y z
Remove the first character in the string x
and store it in the variable y
, and store everything else in the variable z
.
IF x y z
If the strings x
and y
are equal goto label z
.
LBL x
Declare the label x
.
OUT x
Output the string x
.
INP x
Store the user input in the variable x
.
Examples
Hello, World!
OUT Hello,World!
Cat
INP x OUT @x
Reverse Cat
INP x LBL notempty DEL @x char x CONC @char @out out IF @y @x end IF a a notempty LBL end OUT @out
Unary counter
LBL count CONC @x * x OUT @x IF a a count
Truth-machine
OUT Please_input_0_or_1: INP choice IF @choice 0 input_of_zero IF @choice 1 input_of_one LBL input_of_one OUT @choice IF @choice @choice input_of_one LBL input_of_zero OUT @choice
Computational class
The language is Turing-complete, which is proven by implementation of Bitwise Cyclic Tag, binary brainfuck and Underload which are here: User:ChuckEsoteric08/Interpreters
Interpreter
- Common Lisp implementation of the CDILOI programming language.