/
todo.txt
115 lines (97 loc) · 1.96 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Misc Operators:
m
j - memoized recursion
"Array" 2-char Operators:
e! - unique permutations
e# - line comment (not really an operator)
e& - logical and
e* - repeat each item in an array
e< - min of 2 values
e= - count occurrences
e> - max of 2 values
e[ - pad array to the left
e\ - swap 2 array items
e] - pad array to the right
e_ - flatten array
e` - RLE encode
ea - command-line args
ed - debug (show stack contents)
ee - enumerate array
es - timestamp (milliseconds from the epoch)
et - local time
ew - overlapping slices
e| - logical or
e~ - RLE decode
"Math" 2-char Operators:
m followed by numeric literal - subtract/remove (same as "-" but avoids the need for a space after it)
m! - factorial, permutations with duplicates
m* - cartesian product, cartesian power
m< - bit shift, rotate left
m> - bit shift, rotate right
mC - arccos
mF - factorization with exponents
mL - log with base
mO - round with precision
mQ - integer square root
mR - random choice
mS - arcsin
mT - arctan
m[ - floor
m] - ceil
ma - atan2
mc - cos
md - divmod
me - exp
mf - factorization
mh - hypot
ml - ln (natural logarithm)
mo - round
mp - prime
mq - sqrt
mr - random number, shuffle
ms - sin
mt - tan
Regex Operators:
® - start regex literal (ended by ")
þ - convert string to regex type
ø - first match
ð - amount of matches
ô - array of matches
õ - indexes of matches
ò - replace all occurances
ó - replace first occurance
ö - split
Quaternion/Imaginary Number Operators:
¤ - convert string/list to quaternion
n - norm of quaternion
String Compression Operators:
Ö - compress string
Ü - decompress string
Variables:
A=10
B=11
C=12
D=13
E=14
F=15
G=16
H=17
I=18
J=19
K=20
L="" (same as [])
M=""
N="\n" (newline string)
O=""
P=pi (3.141592653589793)
Q=""
R=0
S=" " (space)
T="abcdefghijklmnopqrstuvwxyz" (lowercase letters)
U="ABCDEFGHIJKLMNOPQRSTUVWXYZ" (uppercase letters)
V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" (uppercase and lowercase letters)
W=-1
X=1
Y=2
Z=3
¢=phi (1.618033988749895)