-
Notifications
You must be signed in to change notification settings - Fork 48
/
info.txt
448 lines (436 loc) · 22 KB
/
info.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
ǝ = pop a,b,c replace the element in a at index c with b
ʒ = pop a filter a when the result of code == 1: usage ʒCODE}
α = pop a,b push absolute difference of a and b
β = pop a,b push a converted from base b (arbitrary)
γ = pop a push a split into chunks of consecutive equal elements
δ = pop a,b get the next command, push double vectorized command
ε = pop a apply each on a: usage εCODE}
ζ = pop a,(b) push zipped a with filler b (standardized to space)
η = pop a push prefixes(a)
θ = pop a push a[-1]
в = pop a,b push a converted to base b (arbitrary)
и = pop a,b push a n-repeat (list-multiply) b
м = pop a,b push a.remove(all elements of b)
н = pop a push a[0]
т = push 100
Γ =
Δ = pop a repeat CODE until a doesn't change: usage ΔCODE}
Θ = pop a push 05AB1E truthified a (a == 1)
ι = pop (a),b push [a[0::b], a[1::b], ..., a[(b - 1)::b]] (uninterleave)
Σ = pop a sort a by the result of code: usage ΣCODE}
Ω = pop a push random_pick(a)
≠ = pop a push 05AB1E falsified a (a != 1)
∊ = pop a push vertically mirrored a
∍ = pop a,b push a extended/shortened to length b
∞ = push infinite list ([1, 2, …, ∞])
₁ = push 256, or in recursive environment, push a(n - 1)
₂ = push 26, or in recursive environment, push a(n - 2)
₃ = push 95, or in recursive environment, push a(n - 3)
₄ = push 1000, or in recursive environment, push a(n - 4)
₅ = push 255, or in recursive environment, pop x and push a(x)
₆ = push 36, or in recursive environment, pop x and push a(n - x)
! = pop a, push factorial(a)
" = start/end string literal
# = pop a if true: break/end (used in infinite loops)
# = pop a if contains spaces, split on spaces
$ = push 1 and input (used for sequences)
% = pop a,b push (a % b)
& = pop a,b push a AND b
' = push char ( 'a pushes "a" )
( = pop a push -a
) = wrap total stack to an array
* = pop a,b push (a * b)
= pop a,b push (a b)
, = pop a print(a)
- = pop a,b push (a - b)
. = two char functions
/ = pop a,b push (a / b)
0 = numeric literal
1 = numeric literal
2 = numeric literal
3 = numeric literal
4 = numeric literal
5 = numeric literal
6 = numeric literal
7 = numeric literal
8 = numeric literal
9 = numeric literal
: = pop a,b,c a.replace(b, c) / infinite replacement
; = pop a push a / 2
< = pop a push a - 1
= = print last item
> = pop a push a 1
? = pop a print a no newline
@ = pop a,b push a >= b
A = push 'abcdefghijklmnopqrstuvwxyz'
B = pop a,b push base(a, b)
C = pop a push int(a, 2)
D = pop a push a, a
E = pop a for N in range(0, a 1). Usage E<func>}
F = pop a for N in range(0, a) { }: F(commands)} / N = variable
G = pop a for N in range(1, a) { }: F(commands)} / N = variable
H = pop a push int(a, 16)
I = push input()
J = pop a push ''.join(a) if a is list / if not, then push ''.join(stack)
K = pop a,b push a with no b's
L = pop a push [1 .. a]
M = push the largest number in the stack
N = reserved for variables
O = pop (a) push total sum of a if a is list, else total sum of stack
P = pop (a) push total product of a if a is list, else total product of stack
Q = pop a,b push a == b (bool)
R = pop a push reversed(a)
S = pop a push all chars a seperate
T = push 10
U = pop a assign X to a
V = pop a assign Y to a
W = push min(a) without popping
X = integer variable
Y = integer variable
Z = push max(a) without popping
[ = infinite loop start
\ = delete last item
] = close all loops and if statements
^ = pop a,b push a XOR b
_ = pop a push negative bool
` = pop a push all the items of a into the stack
a = pop a push is_alpha(a)
b = pop a push bin(a)
c = pop a,b push a nCr b
d = pop a push is_positive(a) (a >= 0), returns false for non-numbers
e = pop a,b push a nPr b
f = pop a push list of prime factors (no duplicates)
g = pop a push length of a
h = pop a push hex(a)
i = pop a if statement: iTHEN}: if true { then }
j = pop a Same as J, with each substring right justified w/ a length of b
k = pop a,b push 0-indexed index of b in a (-1 when not found)
l = pop a push lower_case(a)
m = pop a,b push a**b
n = pop a push a**2
o = pop a push 2**a
p = pop a push isPrime(a)
q = terminates the program
r = reverse stack
s = pop a,b push b,a
t = pop a push sqrt(a)
u = pop a push upper_case(a)
v = pop a range loop: for y in a (y = string, N = index)
w =
x = pop a push a, a * 2
y = push string variable (used in mapping loops)
z = pop a push 1 / a
{ = pop a push sorted a
| = push inputs as strings and places them in an array until an empty newline or eof is found
} = close a single if statement, loop, etc.
~ = pop a,b push a OR b
Ƶ = convert the next char from base 255 to base 10 and add 101
€ 0 = pop a apply next command for each in a
Λ = pop a,b,c store a canvas with {a: num, b: filler, c: pattern} (todo: docs)
‚ 1 = pop a,b push [a, b]
ƒ 2 = pop a push for N in range(0, a 1)
„ 3 = 2 char string / can also be used for 2 compressed strings
… 4 = 3 char string / can also be used for 3 compressed strings
† 5 = pop a,b push a with b filtered to the front
‡ 6 = pop a,b,c push a.transliterate(b -> c)
ˆ 7 = pop a add to global array
‰ 8 = pop a,b push a divmod b
Š 9 = pop a,b,c push c,a,b
‹ 10 = pop a,b push a < b
Œ 11 = pop a push substrings(a)
Ć = pop a push enclosed a: a a[0]
Ž 12 = two-char compressed number
ƶ = pop a push lifted a, each element is multiplied by its index (1-indexed)
Ā = pop a push truthified a
‘ - = for compressed strings (upper)
’ - = for compressed strings (no implicit space)
“ - = for compressed strings (normal)
” - = for compressed strings (title)
• 15 = start/end a 1-9 char compressed string
– 16 = pop a if 1, print N (used in loops)
— 17 = pop a if 1, print y (used in loops)
˜ = pop a push deep flattened a
™ 19 = pop a push title_cased(a)
š 20 = pop a,b push a as a list (if not already a list) with b prepended
› 21 = pop a,b push a > b
œ 22 = pop a push permutations(a)
ć = pop a push head_extracted a: a[1:], a[0]
ž 23 > ža push current hours
žb push current minutes
žc push current seconds
žd push current microseconds
že push current day
žf push current month
žg push current year
žh push [0-9]
ži push [a-zA-Z]
žj push [a-zA-Z0-9_]
žk push [z-aZ-A]
žl push [z-aZ-A9-0_]
žm push [9-0]
žn push [A-Za-z]
žo push [Z-Az-a]
žp push [Z-A]
žq push pi
žr push e
žs push digits of pi
žt pop digits of e
žu push ()<>[]{}
žv push 16
žw push 32
žx push 64
žy push 128
žz push 256
žA push 512
žB push 1024
žC push 2048
žD push 4096
žE push 8192
žF push 16384
žG push 32768
žH push 65536
žI push 2147483648
žJ push 4294967296
žK push [a-zA-Z0-9]
žL push [z-aZ-A9-0]
žM push aeiou
žN push bcdfghjklmnpqrstvwxyz
žO push aeiouy
žP push bcdfghjklmnpqrstvwxz
žQ push printable ASCII character set (32-128)
žR push ABC
žS push qwertyuiop
žT push asdfghjkl
žU push zxcvbnm
žV push ["qwertyuiop", "asdfghjkl", "zxcvbnm"]
žW push qwertyuiopasdfghjklzxcvbnm
žX push "http://"
žY push "https://"
žZ push "http://www."
žƵ push "https://www."
žÀ push aeiouAEIOU
žÁ push aeiouyAEIOUY
žĆ push the 05AB1E code page
Ÿ 24 = pop (a),b push [a, ..., b] if b not a list, otherwise push [b[0],...,b[1],...,b[n]]
ā = get a push range(1, len(a) 1)
¡ 25 = pop a,b push a.split(b)
¢ 26 = pop a,b push a.count(b)
£ 27 = pop a,b push a[0:b]
¤ 28 = get a push tail(a)
¥ 29 = pop a push delta's a
¦ 30 = pop a push a[1:]
§ 31 = pop a push str(a)
¨ 32 = pop a push a[0:-1]
© 33 = get a store a in register_c without popping
ª 34 = pop a,b push a as a list (if not already a list) with b appended
« 35 = pop a,b push merged(a,b) if both are lists, else push concatenated(a, b)
¬ 36 = get a push head(a)
λ = pop a recursive list generation with base case(s) a, usage: λ<flag?><func>} --> f(n) = <func>
® 37 = push the last item from register_c
¯ 38 = push global array
° 39 = pop a push 10 ** a
± 40 = pop a push bitwise not a
² 41 = push the second item from the input history
³ 42 = push the third item from the input history
´ 43 = clear global array
µ 44 = pop a while counter_variable != a, do...
¶ 45 = push newline character
· 46 = pop a push 2 * a
¸ 47 = pop a push [a]
¹ 48 = push the first item from the input history
º 49 = pop a push mirrored a
» 50 = pop (a) if list, join list by newlines, else join stack by newlines
¼ 51 = counter_variable = 1
½ 52 = pop a, if 1, then counter_variable = 1
¾ 53 = push counter_variable
¿ 54 = pop (a),b push gcd(b) if b is list, else push gcd([b, a])
À 55 = pop a push a rotated 1 left
Á 56 = pop a push a rotated 1 right
 57 = pop a push a, reversed(a)
à 58 = pop a,b push a.keep(b)
Ä 59 = pop a push abs(a)
Å 60 = list commands
Æ 61 = pop a push reduced_substraction(a) if a is list, else reduced_substraction(stack)
Ç 62 = pop a push ASCII value of a
È 63 = pop a push a % 2 == 0 (is even)
É 64 = pop a push a % 2 == 1 (is uneven)
Ê 65 = pop a,b push a != b
Ë 66 = pop a push 1 if all equal else 0
Ì 67 = pop a push a 2
Í 68 = pop a push a - 2
Î 69 = push 0 and input
Ï 70 = pop a,b push the elements from a at which the same index at b is 1
Ð 71 = pop a triplicate top of stack (push a, push a, push a)
Ñ 72 = pop a push divisors(a)
Ò 73 = pop a push list of prime factors (with duplicates)
Ó 74 = pop a push list of exponents of prime factors (2^a, 3^b, 5^c, 7^d, etc.)
Ô 75 = pop a push connected uniquified a
Õ 76 = pop a push euler_totient(a)
Ö 77 = pop a,b push a % b == 0
× 78 = pop a,b push a × b (strings)
Ø 79 = pop a push ath prime (zero-indexed)
Ù 80 = pop a push uniquified a
Ú 81 = pop a,b push a with leading and trailing b's trimmed off
Û 82 = pop a,b push a with leading b's trimmed off
Ü 83 = pop a,b push a with trailing b's trimmed off
Ý 84 = pop a push [0 .. a]
Þ 85 = pop a push cycled a (e.g. [1, 2, 3] → [1, 2, 3, 1, 2, ...)
ß 86 = get a extract smallest element of list
à 87 = get a extract greatest element of list
á 88 = pop a push only letters of a
â 89 = pop a,b push cartesian product
ã 90 = pop (a),b push cartesian product of b.repeat(2) if b is list, else cartesian product of a.repeat(b)
ä 91 = pop a,b push a sliced into b pieces
å 92 = pop a,b push b in a
æ 93 = pop a push powerset(a)
ç 94 = pop a push char a
è 95 = pop a,b push a[b]
é 96 = pop a push sorted a (key=length)
ê 97 = pop a push sorted_uniquified(a)
ë 98 = else statement
ì 99 = pop a,b push merged(b, a) if both are lists, else a.prepend(b)
í 13 = pop a push [reversed Q for Q in a] (short for €R)
î 14 = pop a push round_up(a)
ï 18 = pop a push int(a)
ð = push a space character
ñ =
ò = pop a push round to nearest integer(a) (bankers rounding)
ó =
ô = pop a,b push a split in pieces of b
õ = push empty string
ö = pop a,b push int(a, b)
÷ = pop a,b push a // b (integer division)
ø = pop (a),b push zipped b if b is list, else zipped a with b
ù = pop a,b push a with elements of length b
ú = pop a,b push a padded with b spaces in the front
û = pop a push palindromized(a), 12345 becomes 123454321 (a a[::-1][1:])
ü = pairwise command (vectorizes if the first element is a list)
ý = pop (a),b push b.join(a) if a is list, else b.join(stack)
þ = pop a push only digits of a
ÿ = used for string interpolation, pop a and replace ÿ with str(a)
.å = pop a,b push b in a (non-vectorizing results)
.b = pop a push letterified(a)
.B = pop a push squarified(a)
.c = pop a push centralized(a) focused to the left
.C = pop a push centralized(a) focused to the right
.D = pop a,b push b copies of a if b is int, else push len(b) copies of a
.E = pop a push(eval(a)) (does not work in safe mode)
.g = push length of stack
.i = pop a,b push b in a (for infinite lists that are guaranteed to be non-decreasing (allowance = 5))
.I = pop a,b push the bth permutation of a
.k = pop a,b push flat index of b in a
.K = pop a,b push index of b in a (non-vectorizing)
.l = pop a push is_lower(a)
.L = pop a,b push levenshtein(a, b)
.M = pop a push most frequent in a
.m = pop a push least frequent in a
.n = pop a,b push log_b(a)
.o = pop a,b push overlap(b)
.p = pop a push prefixes(a)
.Q = pop a,b push a == b (non-vectorizing)
.R = pop a push random_pick(a)
.r = pop a push random_shuffle(a)
.s = pop a push suffixes(a)
.S = pop a,b push 1 if a > b, -1 if a < b, 0 if a == b
.u = pop a push is_upper(a)
.U = pop a,b push a with
.v = pop a push a converted from roman number
.V = pop a run as 05AB1E code
.w = pop a push the data read from the url a
.W = pop a wait a milliseconds
.x = pop a,b push the element in a closest to b (abs_difference if possible else string distance)
.X = pop a push a converted to roman number
.Z = wait one second
.$ = pop a,b push a with b elements dropped (a[b:])
._ = pop a,b push a rotated b to the left
.: = pop a,b,c push a.replace(b, c)
.; = pop a,b,c push a.replace_first(b, c)
.¡ = pop a push a split by function, usage: .¡<func>}
.² = pop a push log_2(a)
.ª = pop a push sentence_cased(a)
.Ó = pop a push the number from prime exponents a
.ï = pop a push is int(a)
.Ï = pop a,b push a with the capitalization of b
.± = pop a push sign(a) (1 if a > 0, -1 if a < 0, 0 if a == 0)
.¿ = pop (a),b push lcm(b) if b is list, else push lcm(b, a)
.æ = pop a compute permutations by function, usage: .æ<func>}
.γ = pop a push a grouped by <func>, usage: .γ<func>}
.ø = pop a,b surround a with b
.« = pop a push reduce right with command, usage: .«<command>
.» = pop a push reduce left with command, usage: .»<command>
.Þ = pop a push continued a, a with the last element cycled, e.g. [1, 2, 3] .Þ --> [1, 2, 3, 3, 3, 3, ...]
.¢ = pop a,b push number of occurrences of b in a (non-vectorizing version)
.ι = pop a,b push interleaved(a, b)
.š = pop a push switch_cased(a)
.Δ = pop a find first in a such that <func> evaluates to 1, usage: .Δ<func>}
.Γ = pop a run func on the prev result until the result no longer changes returning all intermediate results
.ā = pop a push enumerated(a), e.g. [a, b, c] --> [[a, 1], [b, 2], [c, 3]]
.À = rotate stack 1 left
.Á = rotate stack 1 right
.Æ = pop a,b push combinations from a with b elements
.ý = pop a,b push a interspersed with b, e.g. [1, 2, 3] 0 .ý --> [1, 0, 2, 0, 3]
.• = decompress a base 255 alphabet based string
.º = pop a push intersected mirror a
.¥ = pop a push undelta a
.∊ = pop a push intersected vertical mirror a
.Λ = pop a,b,c store a canvas with {a: num, b: filler, c: pattern} and push the string to the stack
.Ø = pop a push 0-indexed number of the greatest prime ≤ a
.ò = pop a,b round a with b digits precision (bankers rounding)
.Œ = pop a,b push all possible ways to divide a into b pieces
.£ = pop a,b push a[:-b]
.œ = pop a push partitions(a)
.¬ = pop a split a on function f, where f = [(a, b) → bool], usage: .¬<func>}
.µ = reset the counter_variable to 0
.¼ = counter_variable -= 1
Å! = pop a push a list of all factorials <= a
Å0 = pop a push a list of zeros with length a
Å1 = pop a push a list of ones with length a
Å2 = pop a push a list of twos with length a
Å3 = pop a push a list of threes with length a
Å4 = pop a push a list of fours with length a
Å5 = pop a push a list of fives with length a
Å6 = pop a push a list of sixes with length a
Å7 = pop a push a list of sevens with length a
Å8 = pop a push a list of eights with length a
Å9 = pop a push a list of nines with length a
Å? = pop a,b push a starts with b
Å¿ = pop a,b push a ends with b
Å= = pop a push deck shuffled a, e.g. [1, 2, 3, 4, 5, 6, 7] --> [1, 5, 2, 6, 3, 7, 4]
Å≠ = pop a push deck unshuffled a, e.g. [1, 5, 2, 6, 3, 7, 4] --> [1, 2, 3, 4, 5, 6, 7]
Åγ = pop a push run length encoded a (push chars and lengths separate)
ÅΓ = pop a,b push run length decoded result from a and b
Å\ = pop a push left diagonal of the matrix a
Å/ = pop a push right diagonal of the matrix a
Å| = pop a push columns of a
ÅΔ = pop a find the index for the first element such that <func> evaluates to 1, usage: ÅΔ<func>}
ÅA = pop a push arithmetic mean of a
ÅF = pop a push a list of all Fibonacci numbers <= a
ÅG = pop a push a list of all Lucas numbers <= a
ÅL = pop a push a limited by b (a if a < b else b)
ÅM = pop a push nearest prime < a (prev prime)
ÅN = pop a push nearest prime > a (next prime)
Ån = pop a push nearest prime to a (higher prime in case of a tie)
ÅP = pop a push a list of primes <= a
ÅT = pop a push a list of triangle numbers <= a
ÅU = pop a,b push the ath polygonal number with b number of sides
Å€ = pop a,b push a with func applied on each b-th term, usage: Åe<func>}
Åf = pop a push the nth fibonacci term (0: 1, 1: 1)
Åg = pop a push the nth lucas term (0: 2, 1: 1)
Åm = pop a push median of a
Ås = pop a push middle of a
Åp = pop a push a list of the first a primes
Ål = pop a push lower triangular matrix from a
Åu = pop a push upper triangular matrix from a
Ŝ = pop a push integer partitions of a
Åβ = pop a,b push a converted from custom base b
Åв = pop a,b push a converted to custom base b
Ų = pop a push is square(a)
ÅÏ = pop a,b apply func to the elements in a where the index in b is truthy (1), usage ÅÏ<func>}
Å» = pop a cumulative reduce left with func on a, usage: Å»<func>}
Å« = pop a cumulative reduce right with func on a, usage: Å«<func>}
ÅÈ = pop a push a list of even numbers <= a
ÅÉ = pop a push a list of uneven numbers <= a
Å¡ = pop a,b split a on truthy indices in b, e.g. [1, 2, 3, 4], [0, 1, 0, 0] → [[1], [2, 3, 4]]
ż = pop a tan(a)
Ž = pop a sin(a)
ž = pop a cos(a)