x
( -- x ) Put the current x-coordinate on the stack.
y
( -- y ) Put the current y-coordinate on the stack.
t
( -- t ) Put the current time in seconds since midnight on the stack.
dt
( -- dt ) Put the change in time since the last frame in seconds on the stack.
mx
( -- x ) Put the current x-coordinate of the mouse on the stack.
my
( -- y ) Put the current y-coordinate of the mouse on the stack.
button
( n -- n ) Put the state of a given button on the stack.
buttons
( -- n ) Put the state of several buttons on the stack.
audio
( n -- ) Set the audio sample amplitude for the current time.
sample
( x y -- r g b ) Sample an input video.
bwsample
( x y -- bw ) Sample an input video.
@
( a -- n ) Read the value at a memory address.
!
( n a -- ) Store a value to a memory address.
(
( -- ) A comment until the next ")".
\
( -- ) A comment until the end of the line.
push >r
Move one value from the data stack to the return stack.
pop r>
Move one value from the return stack to the data stack.
r@
Copy the top value from the return stack to the data stack.
dup
( n -- n n ) Duplicate the element on top of the stack.
over
( a b -- a b a ) Duplicate the element under the top stack element.
2dup
( a b -- a b a b ) Duplicate the top two elements on the stack.
drop
( n -- ) Drop the top element from the stack.
swap
( a b -- b a ) Swap the top two elements on the stack.
rot
( a b c -- b c a ) Rotate the top three two elements on the stack.
-rot
( a b c -- c a b ) Reverse rotate the top three two elements on the stack.
=
( a b -- f ) 1 if the top two stack elements are equal, else 0.
<>
( a b -- f ) 1 if the top two stack elements are not equal, else 0.
<
( a b -- f ) 1 if a is less than b, else 0.
>
( a b -- f ) 1 if a is greater than b, else 0.
<=
( a b -- f ) 1 if a is less than or equal to b, else 0.
>=
( a b -- f ) 1 if a is greater than or equal to b, else 0.
and
( f f -- f ) Find the logical "and" of the top two elements on the stack.
or
( f f -- f ) Find the logical "or" of the top two elements on the stack.
not
( f -- f ) Find the logical "not" of the top two elements on the stack.
min
( n n -- n ) Select the smaller of the top two stack elements.
max
( n n -- n ) Select the larger of the top two stack elements.
+
( n n -- n ) Add the top two numbers on the stack.
-
( n n -- n ) Subtract the top element on the stack from the next element.
*
( n n -- n ) Multiple the top two elements on the stack.
/
( n n -- n ) Divide the second element on the stack by the top element.
mod
( n n -- n ) Find a mod b.
pow **
( n n -- n ) Find a to the bth power.
atan2
( a b -- n ) Find the arctangent of a/b.
negate
( n -- n ) Negate the element on top of the stack.
sin
( n -- n ) Compute the sine of the top element of the stack.
cos
( n -- n ) Compute the cosine of the top element of the stack.
tan
( n -- n ) Compute the tangent the top element of the stack.
log
( n -- n ) Compute the log base e of the top element of the stack.
exp
( n -- n ) Compute e raised to the power on top of the stack.
sqrt
( n -- n ) Compute the square root of the top element on the stack.
floor
( n -- n ) Round the number on top of the stack downward.
ceil
( n -- n ) Round the number on top of the stack upward.
abs
( n -- n ) Compute the absolute value of the number on top of the stack.
pi
( -- n ) Push pi onto the stack.
z+
( a b c d -- a+c b+d ) Complex addition.
z*
( a b c d -- a*c-b*d a*d+b*c ) Complex multiplication.
random
( -- n ) Return a pseudo-random number in the range [0, 1).
: ;
Define a new word.
if else then
Conditional statements.