The notation
APLflow does not invent a language. It uses a small, standard subset of APL (Dyalog semantics), because the whole point is an oracle with decades of settled meaning. Twenty-odd glyphs cover a remarkable amount of ground.
Three rules
APL has almost no grammar to memorize. Expressions evaluate right to left,
with no operator precedence: 2×3+4 is 14, not 10. Every function is
monadic or dyadic by context: with an argument only on its right,
÷4 is the reciprocal; with arguments on both sides, 12÷4 is division.
And functions apply to whole arrays at once: 1 2 3 × 10 is
10 20 30, no loop written, no loop needed.
The working subset
| Glyph | Alone (monadic) | With both sides (dyadic) | Example |
|---|---|---|---|
| ← | assign | avg ← +⌿÷≢ | |
| ⍳ | integers 1..n | index of | ⍳5 → 1 2 3 4 5 |
| ⍴ | shape | reshape | 2 3⍴⍳6 → 2×3 matrix |
| ≢ | tally (count) | ≢3 1 4 → 3 | |
| + - × ÷ | identity, negate, sign, reciprocal | arithmetic, whole arrays at once | 1 2 3 × 10 → 10 20 30 |
| ⌈ ⌊ | ceiling, floor | max, min | 3⌈5 → 5 |
| * ⍟ | eˣ, natural log | power, log base | 2*10 → 1024 |
| | | magnitude | residue (mod) | 10|17 → 7 |
| ⌽ | reverse | rotate | ⌽⍳5 → 5 4 3 2 1 |
| ⍉ | transpose | ⍉M | |
| / | reduce: fold a function along a vector; n f/ is the windowed version | +/⍳5 → 15 · 3+/⍳5 → 6 9 12 | |
| ⌿ | reduce down the first axis (columns of a matrix) | +⌿M → column sums | |
| { } | an inline function; ⍺ is the left argument, ⍵ the right | {(⍺+/⍵)÷⍺} | |
| ( ) | a train: (f g h) x means (f x) g (h x) | avg ← +⌿÷≢ | |
| ⍝ | comment (the "lamp": it illuminates) | ⍝ like this | |
That last table row but one deserves a second look, because it explains the one-liner on the
front page. avg ← +⌿÷≢ is a train of three functions: applied to x it
means (+⌿x) ÷ (≢x), the sum divided by the count. The mean, defined without ever
naming its argument. Two worked examples:
mavg ← {(⍺+/⍵)÷⍺} ⍝ moving average: windowed sums over the width
3 mavg 100 102 101 105 107
101 102.6667 104.3333
sm ← {e←*⍵-⌈/⍵ ⋄ e÷+/e} ⍝ numerically stable softmax
sm 1 2 3
0.09003057 0.2447285 0.665241
The agent kit
Language models write APL badly from memory (sparse training data, glyphs that tokenize
poorly, chronic confusion with J) and markedly better with the rules in front of them. The kit
is a single reference document you drop into your agent's context: a
CLAUDE.md section, Cursor rules file, or system prompt. It contains the subset
above with expected outputs the agent can self-check against, plus translation rules
(⌿ becomes axis=0, windowed reduce becomes
sliding_window_view, and so on).
Artifacts
For humans rather than agents. The keyboard overlays are printable sticker sheets (A4, print at 100 percent) for putting the glyph layout on any five-dollar keyboard: corner overlays · full key covers. The glyphs on this site are set in APL385, Adrian Smith's typeface, the de facto standard for APL. And for provenance: an early draft card from the first exploration of this idea, which sketched invented glyphs for AI operations. The project has since taken the opposite path (standard APL only, no invented symbols), but the card is where it started.