◆ Flux

Glossary

Every term this documentation uses with a sharp meaning, defined once and in one place. Trading and programming both overload words — stream, tag, lag, plane — so where a term carries a casual sense elsewhere and a precise one here, the precise one is what is meant on every other page.

The entries are grouped by the part of the system they belong to — the model, time and causality, the planes, the scene, the application plane, compilation and runtime, distribution — and close with two lookup tables: the error codes and the global constants. Every definition here is the compressed form of a rule some other page states in full; where the compression risks ambiguity, the entry links straight to its owner. Read the page top to bottom for the shape of the vocabulary, or land on a single term from a cross-reference and take just that.

New here? Start with Guide §4 — Streams, delay and running state →

The model

Stream. A value over steps. Every value in Flux is one; a constant is a degenerate stream. There are no indices and no loops over time — arithmetic is element-wise and incremental underneath.

Kind. Flux’s word for a type. It carries the value’s dimension, not only its shape: price, level, osc(0,100), signal, clock. Kinds are what make meaningless arithmetic fail to compile, and what let presentation be inferred rather than configured.

Sort. A stratum of the kind lattice: scalar, categorical (color, clock, string, ui), structural (vec, record, variant). Across two sorts, the join is ⊤ and the meet is ⊥.

Lattice. The partial order over kinds, with its join (⊔, unification) and meet (⊓, constraint). Finite by family, which is what lets its laws be checked by enumeration.

Join (⊔) / meet (⊓). Unification (the branches of an if, two co-plotted series) and constraint (what a parameter demands). Note that price − price = level is not a join — it is an operator rule.

⊤ (top) / ⊥ (bottom). The single error channel, and the kind of na. ⊤ is a hard error only in a demanding position; elsewhere it is a warning.

Demanding position. An operand, a plot target, an argument — a place where a value is actually consumed. A ⊤ there is [ErrDim]; a ⊤ in an unconsumed binding is [WarnTop].

Antichain. The dimensioned kinds (price, volume, time, …), which are pairwise incomparable and rise to quantity rather than to num — deliberately, so that a mixed plot cannot be silently well-typed.

lit. A const-folded literal, polymorphic in dimension: it coerces safely into every scalar. It is why close + 10 needs no cast.

quantity. The erased dimension — the top of the scalar sort. Plottable, but a smell, and it warns.

Tag. An annotation carried orthogonally to a kind’s dimension: the numeric representation (f64 / decimal), the time representation (machine / calendar), the asset identity (B, Q [, @v]), the currency pair on ratio, the unit meas[u] on num.

Time and causality

Clock. The step axis of a series, as a first-class kind: tf("1h"), renko(box), pnf(box, rev), range(r). Time-coarse and price-driven axes are the same concept.

@ (resample). The eliminator of a clock. e @ c reads e on the clock c, taking the last closed unit — never the one still forming.

Causality. output[t] depends only on inputs[0..t]. Enforced by past-only delays, closed-unit resampling, and the rule that every feedback cycle crosses a unit delay.

No-repaint. The consequence: a value, once produced for a step, can never change. Live and historical evaluation produce the same bytes. Repaint is not discouraged — it is inexpressible.

Warm-up. The initial steps where a kernel has not yet seen enough data and yields na. A Flux indicator inherits exactly its kernel’s warm-up, which is what makes byte-identity hold from the first step.

Lag (confirmation lag). A value that is na for L steps and then final forever — a confirmed pivot, for instance. Not a repaint: nothing that was emitted changes.

live(e). The reader of the forming step — the forming bar, in charting. Per-frame, display-only: it may flow to plot, mark, fill, color bars and scenes, and nowhere else. Anything else is [ErrFirewall], and a script that uses it is flagged non-replayable.

As-of alignment. Aligning a foreign series onto the chart’s axis by taking the most recent foreign step at or before the current time — a floor-containing lookup, never a nearest match (which would read the future).

na. An absent value. It propagates through arithmetic (the kind is preserved), makes every comparison yield na (test with is_na / is_some), and has one canonical bit pattern at every storage boundary — which is what keeps two engines agreeing about the bytes of a value that is not there.

The planes

Plane. One of the four execution contexts, each with its own clock and its own rules: ANALYSIS (the step — the bar, in charting; total, causal, deterministic), CANVAS (the frame; presentation), TRANSITION (the frame; interpolation between computed states), APP (events; state and effects). You never declare a plane — it is inferred from what you write.

Firewall. The one-way rule: presentation may read analysis; analysis may never read presentation. Violating it is [ErrFirewall].

Stratum (a) / stratum (b). Within a scene: the retained geometry (a pure function of the model — deterministic, inside the replay oracle) and the per-frame cosmetics (glow, pulse — routed to the host compositor, outside the oracle, and firewalled from the model).

Settle vs trajectory. A transition’s settle (where it lands) is in the oracle; its trajectory (how it gets there) is not. That is why reduced motion changes nothing that matters.

The scene

The entries below name the presentation model — a sealed design, additive to the frozen analysis core. The chart surface is real today; the typed style vocabulary lands incrementally, and each entry describes the design in the present tense.

Island. The unit of embedding: a <div> the Flux engine paints inside an ordinary static HTML shell — a chart, a dashboard, a data-visualization, a 3-D view, a small application. The page around it stays plain HTML; the island is where the WebGPU renderer lives — graphics and text alike, the text as SDF glyphs. Everything visual enters through style props, never a raw string — the one injection surface is structurally absent, which is what lets a stranger’s island render beside yours untrusted.

Scene. A pure function of the Model, and a value of kind ui: a tree of vetted primitives you bind, return from a function, and hand to a view. Its retained geometry — stratum (a) — is deterministic and inside the replay oracle; its per-frame cosmetics — stratum (b) — are not.

View. The window that mounts a ui value into a render target — chartView, paneView, sceneView. It is where a scene meets its island.

Primitive. A member of the closed, vetted draw set (dot, line, rect, text, path, …). A script cannot invent one, which is what keeps markup, a URL or a raw byte buffer out of the renderer.

Style prop. A visual property carried as a closed, typed value — a token, a colour, a signal, an enum, a bounded record — never a raw CSS string: stroke: token.grid, glow: throb(0.4). The typed surface is why richness cannot smuggle an expression, a URL or markup past the host.

Signal. In presentation, a property whose value may vary over the frame: a constant, a data value and an animation are the same kind of thing, so there is no animation API. (Distinct from the signal kind — the sealed boolean logic behind and / or / not.)

Spring. A CANVAS signal generator: spring(target) — optional stiffness spring(target, k) — relaxes a property toward a target. Its settle value is in the oracle; its trajectory is cosmetic.

Viz. The viz.* grammar: pure functions that consume a Table and return a ui value — scales, axes, legends, facets, statistical transforms — the sibling of kind-driven auto-presentation for arbitrary tabular data.

The application plane

Model. An application’s bounded, typed state. Only bounded kinds may appear in it; anything else is [ErrState].

Message (msg). The only way anything ambient enters an application — time, input, randomness, the network, analysis values. Everything is journaled.

Journal. The ordered list of messages. It is the single source of truth: re-folding it reconstructs the model bit for bit. Undo truncates to a bound, not to the previous message.

Command (Cmd). An outgoing effect, as inert data — a name, a key, a score. Never a socket, a token or a handle. The host executes it, under a capability.

Subscription (Sub). A declarative input, recomputed from each model, carrying the constructor the host will wrap its payload in (OnTick(1000, Tick)).

Slotmap. The official pattern for a bounded collection with stable removal: a bounded vector, a tombstone (na) instead of a compaction, a live mask, a count, and a dual identity — a domain id for messages and persistence, a slot/generation handle for execution.

Capability. A named permission (net:fetch, storage:own, chart:read). Default-deny; a script emits a request, never holds the resource; an ungranted request is a compile error ([ErrCapDenied]).

Compilation and runtime

Graph (DAG). What a program is, after names are resolved and functions inlined: a typed, acyclic dataflow graph. The unit of optimization, scheduling, memory planning and verification.

I6. A leaf node mapped to a native kernel is byte-identical to that kernel, warm-up included.

I7. The interpreter and the compiled module produce the same bytes — checked at every compilation, on hostile data, in batch and live. A divergence blocks the ship.

The gate. The blocking check that enforces I7 (and, in doing so, the optimizer’s correctness). Its oracle is the interpreter; its candidate is the very instance that will serve.

Pinned routine. An operation where two implementations could disagree — a transcendental, a decimal division, a Unicode fold, a calendar addition, a random draw, a sort over absent values — implemented once and shared by the interpreter, the module and the server. Not the same algorithm: the same code.

Translation validation. Checking the optimized graph against the unoptimized one, bit for bit, at every compilation. It is what lets the optimizer be aggressive without being trusted.

Liveness plan (peak, not sum). The memory pass: every buffer’s lifetime is statically exact, so disjoint lifetimes share a slot and the reported footprint is the peak of what is simultaneously live. The plan itself is a deterministic function of the graph — because the value oracle is blind to layout.

Canonical order. The single topological linearization, obtained by breaking every tie with the pinned lexical node identity. It anchors the memory plan, the random draw index, and the optimizer’s tie-breaks.

1 ≡ N. One worker and many workers produce identical bytes. Proven from the purity of the graph and the frozen reduction order — and stress-tested with adversarial assignment.

Distribution

fluxpack. The distributed artifact: the compiled module, the sealed manifest, the provenance (content hash, compiler version, dependency closure), and the licence.

Sealed manifest. The capability list, derived by the compiler from the source’s requests — never self-declared. It travels with the binary and is inspectable before install.

Content addressing. A dependency reference is an exact content hash, not a version range. Two versions of a library are two coexisting units, so the dependency diamond does not arise.

Rebuild gate. Recompiling the same source and lock, on different machines with different thread counts, must produce a byte-identical module.

Error codes

Half a line per code, for recognition. The normative catalogue — positions, examples, the fix for each — is Inference — the error policy.

Code Fires when
[ErrDim] the dimensional algebra has no rule, or tags disagree
[ErrRepr] same dimension, different representation tags, no explicit conversion
[ErrCausal] a cycle with no unit delay, or a non-causal read
[ErrTotal] a bound that is not a constant, or exceeds the cap
[ErrTotalRec] / [ErrTotalType] a cycle in the call graph / in the type-reference graph
[ErrTotalMatch] a match that does not cover every case
[ErrFirewall] analysis reads a non-deterministic presentation value
[ErrLen] two declared vector lengths are incompatible — capacities that cannot widen
[ErrField] a missing or unknown field
[ErrArg] an argument’s kind is not admissible
[ErrPlot] the value is not presentable
[ErrUnbound] an unbound identifier or a syntax hole
[ErrState] an unbounded Model field (APP plane)
[ErrCapDenied] a request for a capability the manifest does not grant — designed (APP plane); not yet emitted
[ErrCapRevoked] a command under a capability revoked mid-session — designed (APP plane); not yet emitted
[ErrSceneBudget] a scene exceeds its draw-list, instance or GPU budget
[WarnTop] an unconsumed binding lands on ⊤ or quantity
[WarnBranchDim] branches or co-plotted series of different dimensions
[WarnLossy] a coercion that erases a dimension or narrows a representation
[WarnFloatKey] a computed floating-point value used as a collection key
[WarnNaUpdate] a collection update whose function is statically na on an absent key
[WarnScale], [WarnAffine], [WarnLit] see Inference

Designed, not yet emitted. [WarnBoundsØ] and the two capability codes above are specified but have no emit-site in the v1 engine yet — the capability codes land as the APP plane ships.

Constants

Every ceiling is a compile-time counter, never a stopwatch. The normative table — what each one costs, and why — is Compiler & runtime — budgets.

Name Value What it bounds
N_max 10 000 (browser) / 100 000 (server) the maximum window, period or delay of a kernel
maxNodes 3 072 the size of the graph, judged after optimization
N_active 16 co-active scripts merged into one graph
maxBricksPerBar 1 000 boxes one time bar may cross in a price-driven representation

See also