Draft 2026-07-04. SliP is a programmable symbolic calculator. Implementation in C++/ is authoritative. See also Tutorial.
| Mode | Checkbox | Input |
|---|---|---|
| Calculator | Programming mode off | One expression per line (§2) |
| Programming | Programming mode on | Full SliP; // comments stripped |
Both modes use a fresh context on each CALCULATE by default. Bindings from earlier lines in the source are visible to later lines in the same run. Check Keep session between runs in the settings panel to retain bindings across runs.
Each non-empty line expr (trimmed, comment stripped) is evaluated as:
( expr )
2 3 4 → 24 2πr → 2 × π × r cosπ → cos(π)
sin(0) sin applied to 0 atan2[ 1 1 ] two-argument form max[ 3 2 1 ] list argument
'r = 2
becomes ( 'r = 2 ) and binds r for the rest of that CALCULATE run.
π 𝑒 ∞, operators like + - × ÷ == : …abπcd → ab, π, cd.pi, euler, inf.e is a name. Napier's number is 𝑒 (keypad) or euler.⊤ ⊥ ⊂ ⊃ ∩ ∪ are reserved solo names without builtin behaviour in the current interpreter.( … )| Form | Context | Effect |
|---|---|---|
{ … } | New child context | Sequential; returns list of results |
« … » | Same context | Sequential (not parallel threads); bindings persist |
| Value | Meaning | Printed |
|---|---|---|
[] | Nil / false | [] |
| non-empty | Truthy | own REPR |
from == etc. | true | T |
'name = value — assign in current context¶ — snapshot bindings as Dictionary¤ — random float in [0, 1), not context snapshot| Sym | Meaning |
|---|---|
@ | Stack top (for : apply) |
£ | Stack as list |
¶ | Context → Dict |
∅ | Empty list |
¤ | Random [0, 1) |
| Sym | Meaning |
|---|---|
' | Quote |
! | Eval |
# * $ | Length / CDR / last |
; ¦ | Stdout / stderr print |
~ ¬ | Bit / logical NOT |
¡ | Throw |
| Pri | Operators |
|---|---|
| 0 | = assign |
| 10 | ? ¿ if |
| 30 | ∈ ∋ == <> < > <= >= |
| 40 | && || ^^ |
| 50 | § , |
| 60 | + - |
| 70 | · × ÷ / % |
| 80 | & | ^ |
| 90 | : apply |
| 100 | ± . matrix cols / index |
:arg : f pushes arg on the argument stack, evaluates f, then pops the stack. Use @ inside quoted functions to read the stack top.
sin cos tan log exp sqrt … — one arg.
atan2 pow random — two args via [ ].
hypot max min — list arg.
¤ → uniform [0, 1) random[ 1 2 ] → uniform [1, 2)
operand:toJSON · `` literal`:byJSON ``
WASM build adds Canvas/WebGL operators (canvas, fill, stroke, …). Not in CLI. Canvases are removed on each CALCULATE. The graphics surface is currently sample-driven rather than specified operator by operator.
∞ 𝑒 π γ φ log2e log10e ln2 ln10
| ASCII alias | Constant |
|---|---|
pi | π |
euler | 𝑒 |
inf | ∞ |
ASCII e remains an ordinary name.