Skip to content

render

Everything is a node. Each node holds an expression. The interface renders the expressions, thus the interface can edit itself.

A render store holds nodes. Each node has an expression and a value. The expression is the source of truth, and the value is the cache of its evaluation.

Move the slider. Each move writes a new value to a. The store then starts one epoch: it evaluates each reader of a in topological order, and it stops at each value that did not change.

One write, one epochMove the slider to write a new value to a.
a = 33b = 3abs(a)c = 6b * 2d = 9a + ce = "up"if(d > 0, "up", "down")
evaluated, value did not changeevaluated, value changednot evaluated

Select the button that flips the sign of a. The value of abs(a) stays the same, thus the epoch does not evaluate c. This is the pruning of the epoch.

Nodes

A node holds an expression and its value. A reference reads another node, or a field of its value. The engine keeps a seat for each read.

Expressions as data

The IR has three node types: lit, ref and app. The interpreter is total: a failure gives none with a cause, and it does not throw.

Classes as templates

A class gives cells and methods. An instance is an ID and a scope. A change of a class reaches each instance that still follows it.

An interface that renders itself

Render methods are expressions. The viewer shows them as trees that a person can edit, and an edit changes the class at once.

  • The tour builds a store, a class and a render, one step at a time.
  • The viewer is the live editor. Drag a class to the canvas and edit it.
  • The review lists each defect that the October review found, with the live status of its test.
  • The architecture shows the layers and the invariants of the engine.