Skip to content

coeval

A document gets its meaning from a question, not from a definition. Each picture on this site is a document, drawn by the same rules. Select Play at the right.
Open in the playground

Nothing started yet. Select Next or Play.

seq
  1. 1
    adda
    number
    1
    number
    2
  2. 2
    multiplyb
    ref
    a
    number
    10
  3. 3
    ▸log
    ref
    b
The world: the effects, in orderNo effect yet.
The result shows at the end of the evaluation.

coeval is a base for declarative languages. Each language stores its programs as JSON documents. coeval gives the parts that all of these languages share. These parts are the documents, the ladder that finds an evaluator, the context of a term, and the split between pure work and effects.

The project is in the design stage. Each idea has a page with a live diagram. The diagrams use the model package of the repository, thus each answer comes from real code.

A store holds documents. The derive side computes the view from the store, without an effect. An event starts a run, and a run causes effects in a written order. The effects change the store, and the loop starts again.

The run side ran 0 times. The derive side ran 0 times.
derive: pure, in any orderrun: effects, in written ordercountsharelabel1. find the card2. toggle it3. save itStoredone: 1total: 3View1 of 3 doneevent
Click a card starts the full loop. The event starts a run, the run writes the store, and the derive side computes again. Write from another tab changes the store directly. The derive side computes again, and the run does not start, because a change of data does not repeat an effect.
  • Documents: a value in an envelope. The tab of the card is the type.
  • Kinds: a kind is a document that names an evaluator for each verb.
  • The ladder: a question goes to the own entry, then to the kind, then to the default.
  • Evaluation: results come up through ports, and parts are sealed.
  • Names, Choices and Effects: scope, laziness and capabilities, with the same cards.
  • Context: a term reaches outside itself through five parts only.
  • Paths: each reference syntax is a list of moves.
  • Direction: back in a sequence, by moves in a structure, down and up in a tree.
  • Derive and run: order has a meaning only for effects.
  • Schedules: when to compute is a separate layer.