Expressive

Expressive is an esoteric programming language created by User:CreeperBomb in 2023. All programs are math expressions (hence the name "Expressive"), with some specific syntax/semantics that make it usable & Turing complete.
==Specification==
In every step, the expression is evaluated. Afterward, the result is stored and displayed to the user. This repeats until the user stops the program, with the final result of the program being what's printed. The initial value for the program is input. If a multivalued function is involved (e.g. square roots of complex numbers), the user chooses which branch to use at each step as additional input. For even more input options, the keyword input (or an equivalent word in another language) equals input for that step.
To access previous results, and to find which step you're on, you can use p_{n} and n. p_{n} is equal to the nth previous result, such that p_{1} is the previous result, p_{2} is the result before the previous result, etc. p_{x} if x isn't positive or an integer causes undefined behavior. n is equal to which step you're on. For example, on the initial step, n is equal to 1.
Expressions are made of computable mathematical functions, although notation may need to be explained or defined, especially if it is uncommon or ambiguous (such as x!! either being x factorial factorial or x double factorial). While Expressive does support comments, they are very freeform like the expressions themselves — as long as it's clear that it's a comment and not part of the expression, it's a valid program/comment.
==Turing completeness==
Expressive is trivally Turing complete as it any computable function that exists, provided that it is detailed by the programmer or famous enough to not need this, and is mathematical in nature. However, it is also possible to only use common mathematical functions and maintain Expressive being Turing complete, such as subtraction, multiplication, exponentiation, and absolute valuation.
==Examples==
(Infinite) cat program: \operatorname{input}
Integer input: \frac{\ln\left(1\right)}{2\pi i} — Uses the complex definition of "ln", which has infinite branches
Truth machine: \left\{p_{1}=0:0,\operatorname{join}\left(p_{1},1\right)\right\} — Uses a piecewise expression and "join(x, y)", which joins two lists, a list and a number, or two numbers together into one, single list
Deadfish interpreter: \operatorname{join}\left(\operatorname{drop}\left(\left\{n=1:\left[0\right],p_{1}\right\},\operatorname{length}\left(\left\{n=1:\left[0\right],p_{1}\right\}\right)\right),\left\{\operatorname{input}=0:\left\{\left\{n=1:\left[0\right],p_{1}\right\}\left[\operatorname{length}\left(\left\{n=1:\left[0\right],p_{1}\right\}\right)\right]=256:0,\left\{n=1:\left[0\right],p_{1}\operatorname{length}\left(p_{1}\right)\right\}^{2}\right\},\left\{\operatorname{input}=1:\left\{\left\{n=1:\left[0\right],p_{1}\operatorname{length}\left(p_{1}\right)\right\}+1=256:0,\left\{n=1:\left[0\right],p_{1}\operatorname{length}\left(p_{1}\right)\right\}+1\right\},\left\{\operatorname{input}=2:\left\{\left\{n=1:\left[0\right],p_{1}\operatorname{length}\left(p_{1}\right)\right\}-1=0:0,\left\{\left\{n=1:\left[0\right],p_{1}\operatorname{length}\left(p_{1}\right)\right\}-1=256:0,\left\{n=1:\left[0\right],p_{1}\operatorname{length}\left(p_{1}\right)\right\}-1\right\}\right\},\left\{\operatorname{input}=3:\left[p_{1}\operatorname{length}\left(p_{1}\right),p_{1}\operatorname{length}\left(p_{1}\right)\right]\right\}\right\}\right\}\right\}\right) — s->0, i->1, d->2, o->3. drop(x, y) removes the yth element of x. […] symbolises a list. length(x) is the length of a list x. The rest is specified in the truth machine
Collatz sequence of a number:\left\{\lfloor\frac{p_{1}}{2}\rfloor\in\mathbb{Z}:\frac{p_{1}}{2},3p_{1}+1\right\} — "Collatz sequence" refers to the sequence in the Collatz Conjecture, and the expression uses a piecewise expression
Category:Languages Category:Turing complete Category:High-level