An esoteric language inspired by Seriously.
Instructions are single words, either space or newline separated.
There are 4 data types in Obviously, numbers, strings, arrays and blocks.
N
represents any value. This usually means numbers, but can represent any value of a type not specified in an alternate command definition.
S
represents a string.
A
represents an array.
i
represents a complex value. Complex values are a proper subset of numbers.
B
represents a block.
-
input
: read value from stdin and push -
print
: pop N: write N to stdout -
0
: push 0 -
drop
: pop N: discard -
increment
: pop N: push N+1 -
decrement
: pop N: push N-1 -
plus
: pop N,N2: push N+N2 -
subtract
: pop N,N2: push N-N2 -
times
: pop N,N2: push N*N2 -
divide
: pop N,N2: push N/N2 (float division) -
dup
: pop N: push N,N -
swap
: pop N,N2: push N,N2 (rotate top 2 elements) -
roll
: rotates stack right by 1 -
save
: pop N,N2: push N2 to register N -
savezro
: pop N: save N in register 0 -
saveone
: pop N: save N in register 1 -
load
: pop N: push the value in register N -
loadzro
: push the value in register 0 -
loadone
: push the value in register 1 -
if
: pop N,N2,N3: push N2 if N is truthy, else push N3 -
while
: start loop: peek top of stack, repeat code in loop while a evaluates to true -
wend
: end loop