Ministack
Jump to navigation
Jump to search
Ministack is a minimal stack-based language by User:Hammy
Commands
| Command | Meaning |
|---|---|
| 1 | Pushes 1. |
| - | Negates the top value of the stack. |
| . | Outputs the top value of the stack as a EUCS character. |
| ? | Pops the entire stack (in this example, 6 items called a,b,c,d,e,f) and pushes f-e, e-d, d-c, c-b and b-a. |
| / | Reverses the stack. |
| ^ | Moves the stack upwards. |
| i | Takes input from the user and pushes it as a number. |
| ! | Same as i, but with EUCS characters |
// does nothing btw
Algorithms? Procedures? What are they called
/-/ negate the bottom value on the stack
1/-? add 1 to the top of the stack (warning: only works for 2-length stacks)
Examples
A+B problem, but it outputs as EUCS
ii/-?.
XKCD random number
11/-?1/-?1/-?1/-?1/-?1/-?1/-?.
Computational class
It could be Turing Complete. Here's one of the author's notes. The �s are unknown, the author didn't even really know what they were.
i wish that someone would prove this tc. the easiest way might to push a bunch of zeroes for the tape and use
1/-?or the appropiate procedure for + and maybe u�e ��� for - and...(Terrible handwriting from there...)