Uack is an esolang made by User:PythonshellDebugwindow.
An arbitrary-length stack.
Datatypes are function (which always take an integer as their argument and return an integer) and arbitrary-size unsigned integer.
The program is made up of a series of function calls. Where F is a function and X is an integer, then the Python code F(X) would be written like:
But as a special case, the Python code F(G(X)) (where G is also a function) would have to be written like:
The only integer available at the start of the program is Z, representing 0; all other integers have to be constructed by the programmer.
|N||Nop; return 0|
|P||Return its argument plus one|
|H||Push its argument to the stack; return its argument|
|O||Pop stack, return the popped value|
|K||Peek stack, return the peeked value|
|T||Print its argument with a newline; return its argument|
|B||Break from the outermost function if its argument is zero; return 0 if it broke from the function or 1 otherwise (can change outermost return)|
Popping or peeking when the stack is empty returns -1; this is the only way to get a negative integer.
Push 3 to the stack: