Derive and run
A program that is a list of steps looks like a sequence. For pure steps, it is not. It is a graph that someone wrote down in one order.
The glyphs so far: 15, 3 new on this page
- 42Data: a value without a type
- numberA document: the tab is its type42
- numberA dashed tab: the container declares the type42
- addParts: a card inside a cardnumber1number2
- kindA kind: a document of type kind
- OKDA rung: own, kind or default
- 3A port: the result of a document
- 0A sealed part: an evaluator cannot read it
- #NAME?An error value, in a red port
- numberaA name tag: a binding for later steps3
- refA reference: a path from a root of the contextnamesa
- ifNot evaluated: a part that its parent did not need“yes”testbooltruetruethentext“yes”“yes”elsetext“no”not evaluated
- ▸logThe run side: a magenta edge, and an effectnew“hi”text“hi”“hi”
- 1log“hi”An effect: a numbered ticket in the worldnew
- logA capability: an effect that a term can causenew
As written
- 1a: Load the prices
- 2b: Load the rates
- 3c: Convert a with b
- 4d: Write a log line
- 5e: Save c
As a graph
- a step reads a result
- effects keep their order
Order has a meaning only for effects
Section titled “Order has a meaning only for effects”A pure step reads values and gives a value. Two orders that obey the arrows give the same result. A step with an effect is different. A log line before a save and a log line after a save are two different histories. Thus each effect keeps its place among the other effects.
Two sides
Section titled “Two sides”coeval puts each kind on one of two sides.
| Derive | Run | |
|---|---|---|
| Effects | None | Yes, with capabilities |
| Order | Any order that obeys the data | The written order |
| When | When something reads the value, or when its data changes | When a trigger starts it |
| Again after a change of data | Yes | No |
| Examples | Formulas, trees of components, layout rules, queries | Sequences of calls, event handlers |
An event handler holds a run as data. The derive side can compute the handler, and the run starts only when its event comes. A change of data does not repeat an effect. The loop on the home page shows both sides.