|Computational class||Push-down automata|
|Dialects||Common1, Advanced1, Pure1, Dead1|
1 (a.k.a one) is an esolang by User:None1, it has a stack that contains nonnegative integers of any size.
||Pop a,b,c, if c mod 4 is 0, push |
||Pop a, if a mod 4 is 0, pop a number and output as character, if a mod 4 is 1, pop a number and output as decimal, if a mod 4 is 2, read a character from user input and push its ASCII, other wise read an integer from user input and push it|
||Push a random number between 0 and 255 onto the stack|
||Push 1 onto the stack|
||While top of stack isn't zero, do |
|Other characters||Push corresponding ASCII value onto the stack|
Note: EOF returns 0, if a subtraction will result in a negative value, push 0 instead, if an empty stack is popped, return a random number between 0 and 255
Random decimal number between 0 and 255
1 has many dialects, the one shown above is the most common dialect known as Common1. coding in Common1 is very painful, but other dialects of 1 make it more painful!
Advanced1 removes literals, when it encounters other characters, it simple raises a syntax error.
Pure1 is Advanced1, but it removes random, when an empty stack is popped, it raises a syntax error.
Dead1 is very different from the other dialects, it minimizes Pure1 down to 4 instructions, so it is equivalent to Pure1 but almost completely unusable for programming (because programming in it will be too painful). If you try programming in Dead1, you will feel like you are dead. None of the examples programs here works in Dead1.
There are 4 commands:
], the commands except
* work the same in Pure1.
* works like this: Pop a value x, if x mod 8 is less than 4, execute the command
* in Pure1, but do not pop c, use x mod 4 instead of c. Otherwise execute
, in Pure1, but do not pop a, use x mod 4 instead of a.