-
Notifications
You must be signed in to change notification settings - Fork 1
Command glossary
43615 edited this page Dec 19, 2023
·
26 revisions
Slashes separate number / string variants of overloaded commands. Register usage is annotated like FR
(important for syntax). "Inverted" special modes are indented.
-
a
char <-> code point -
A
string <-> integer from UTF-8 byte seq -
bR
pop reg to buffer-
!bR
pop top array to stack
-
-
BR
push buffer to reg-
!BR
append stack to top array
-
-
c
clear stack-
!c
reallocate memory (shrink to fit)
-
-
C
clear top A objects from stack -
d
duplicate top-of-stack -
D
duplicate top A objects of stack -
f
print stack -
FR
print reg -
g
natural log / string length -
G
Bth log of A -
i
set input base -
I
get input base -
k
set output precision -
K
get output precision -
lR
load top-of-reg-
!lR
copy reg to stack
-
-
LR
pop from reg-
!LR
append reg to stack
-
-
mR
reserve reg, run A on child thread-
!mR
don't copy parent state
-
-
MR
join thread (timeout A ms), save thread's stack to reg -
n
pop and print -
N
random natural number below A -
o
set output base -
O
get output base -
p
println -
P
pop and println -
q
quit -
Q
break A macro layers -
r
swap top 2 objects -
R
rotate top |A| objects (+: up, -: down)-
!R
flip top |A| objects
-
-
sR
overwrite top-of-reg-
!sR
overwrite reg with stack
-
-
SR
push to reg-
!SR
append stack to reg
-
-
t
trig functions, numbered like in APL -
T
wait A ms -
v
sqrt -
V
Bth root of A -
w
set working precision -
W
get working precision -
x
execute string -
X
execute string A B times -
yR
execute reg if A is a string -
z
stack depth -
ZR
reg depth-
!ZR
reg array length
-
Other chars, →↓ on QWERTY:
-
~
divide with remainder / split string A at index B -
!
invert conditional (<=>) or special mode -
@
scientific notation input (instead of e/E) -
#
comment (until end of line in scripts) -
$
get environment variable A -
%
mod / isolate Bth char -
^
exponent / find B in A-
!^
(str only) find by regex
-
-
&
execute script with filename A-
!&
push file contents
-
-
*
multiply / repeat string (invert if neg) -
()
any-base number input -
-
subtract / remove chars from string (from the front if neg) -
_
negative sign -
=R
execute reg if B==A -
+
add / concat -
[]
string input -
{}
create/destroy parameter context with defaults k,i,o = -1,10,10 -
;R
load from reg array at idx A-
!;R
truncate to len A and reallocate
-
-
:R
save A to reg array at idx B-
!:R
extend to len B using A
-
-
'
force number input (use letters) -
"
print number to string / get constant by name -
\
execute OS command -
|
A^B mod C / search A for B, replace all with C-
!|
(str only) replace by regex
-
-
,
set reg pointer -
<R
execute reg if B<A -
.
fractional separator -
>R
execute reg if B>A -
/
divide / shorten to B chars (remove from front if neg) -
?
prompt for one line of input and execute-
!?
push string instead
-