Version 2.0.0, 2026-07-25. 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.( … )= and ,.sin 2π → sin( 2 × π ), but sin(2) π → sin( 2 ) × π.Operands evaluate left to right, and && || ¿ short-circuit: the right side is untouched when the left side decides the result.
| Form | Context | Effect |
|---|---|---|
{ … } | New child context | Sequential; returns list of results |
« … » | Same context | Sequential (not parallel threads); bindings persist |
∥ '[ … ] | Own child context per branch | Concurrent; results in source order |
∥∥ '[ s₁ s₂ … ] evaluates the elements concurrently, each isolated in its own child context, and collects the results in source order:
( ∥ '[ ( 1 + 1 ) ( 2 + 2 ) ( 3 + 3 ) ] ) → [ 2 4 6 ] ( 'z = 1 ) ( ∥ '[ ( 'z = 99 ) ( z ) ] ) → [ 99 1 ] second branch still sees 1 ( z ) → 1 caller untouched ( 5 : '( ∥ '[ ( @ + 1 ) ( @ × 2 ) ] ) ) → [ 6 10 ] @ is seeded per branch
Branches cannot observe each other, so the value equals sequential evaluation; when several branches fail, the earliest in source order reports. Use « » when the sentences must share bindings.
On this page ∥ runs sequentially. Browser threads need SharedArrayBuffer, which needs COOP/COEP headers the static host cannot send. The native CLI build uses real threads. The value is the same either way — only elapsed time differs.
| 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 |
∥ | Evaluate a list's elements concurrently, isolated, in source order |
| Pri | Operators |
|---|---|
| 0 | = assign (right-assoc) |
| 10 | ? ¿ if (¿ short-circuits) |
| 20 | && || ^^ (&& || short-circuit) |
| 30 | ∈ ∋ == <> < > <= >= |
| 50 | § , (, right-assoc) |
| 60 | + - |
| 70 | · × ÷ / % |
| 80 | & | ^ |
| 90 | : apply |
| 100 | ± . matrix cols / index |
Comparisons bind tighter than && || ^^, so x > 0 && y > 0 reads as ( x > 0 ) && ( y > 0 ).
: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.