program.possum
Ctrl+Enter to run
Output
Field Guide — the Possum vocabulary
Programs are words separated by whitespace. Numbers are pushed onto a stack; words pull values off it and push results back. # starts a comment.
Stack
climb— duplicate the top valuescram— drop the top valuewaddle— swap the top twopeek— copy the 2nd value to the toptumble— rotate the top three
Maths & logic
+ - * / %— arithmetic on the top two< > = <= >= !=— compare, push 1 (true) or 0 (false)and or not— logic (nonzero is true)
Pouches (variables)
pouch name— pop the top, stash it in namegrab name— push the value stashed in name
Noises (output)
hiss— pop and print as a numberscreech— pop and print as an ASCII charactersay "text"— print a literal string
Control flow
if … end/if … else … end— pops a conditiontimes … end— pop N, repeat the body N times;countis the 0-based indexwhile … do … end— repeat while the condition block leaves a nonzero value