-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspec.txt
100 lines (96 loc) · 2.85 KB
/
spec.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
stack based lang
format:
(format)
(details)
(destroys used values? ⌫ does/✓ does not/⌦ other)
end format
🔢(num)🔢
add <num> as an integer to the stack
🔤(string)🔤
add <string> as a string to the stack (❕ is escape char):
❕❕: literal ❕
❕🔤: literal 🔤
❕↩: newline
❕➡: tab
❕[newline]: escapes newline
🗹
🗷
🚫
add True/False/None to the stack
🧮(op)
maths (top first, eg. 🔢2🔢🔢1🔢🧮➖ is 1):
➕: addition (2 items)
➖: subtraction (2 items)
✖: multiplication (2 items)
➗: division (2 items)
⤴: exponent (2 items)
🟰 or =: equal (2 items)
⏪: less than (2 items)
⏩: greater than (2 items)
⏮️: less than or equal (2 items)
⏭️: greater than or equal (2 items)
🔄: negative (1 item)
‼: not (1 item)
🔢: make integer from string (1 item)
🔤: make string from anything (1 item)
❓: make bool from anything (1 item)
📝: make list from string/dict(results in keys) (1 item)
(⌫)
📝
take top of stack (N) if int and make a list with the top N elements (top last)
(⌫)
📙
if the top two items on the stack are lists, make a dictionary where
the top list is keys and second top is values (⌫)
🔍
take top of stack (N) and get item/index N in list/dict/string on stack next
(⌦: destroys index but not list/dict/string)
🖨
print whatever is on top of the stack (w/o newline) (✓)
📠
print whatever is on top of the stack (w/ newline) (✓)
🗑
trash top item of stack
whitespace
No-op
💬(text)💬
Comment
🏷(label)🏷
Label <label>
🎠(label)🎠
Goto <label>
🚀(label)🚀
Goto <label> if top of stack is truthy (not 0/""/[]/{})
(⌫)
📋
Copy top of stack
(✓)
⌨
Push a line of input from the user onto the stack, minus the newline
📏
Push the length of the list/string on top of the stack
(✓)
🎉
Pop the first value off the list/string on the top of the stack to the stack
📚
Put the stack on the stack
📝
take top of stack (N) and put top of stack into list/dict below top at index N
(⌦: destroys index and item but not list/dict)
🔀
take top of stack (N) and take the Nth from the top of the stack
and swap it with the top of the stack
🐎(label)🐎
Call a function at <label>
example:
🐎asd🐎
🛑
Return from a function call, or if not in a function, halt the program
🖍
take top of stack (N) and erase top of stack's list/dict at index N
(⌦: destroys index but not list/dict)
🌎
push linked instance of the global dictionary (essentially variables)
🧱
append top of stack to list below top
(⌦: destroys item but not list)