/ Stream
build 2026.12.03 · --:--:-- UTC · RSS

BabbTools for the frontier.

mascot mascot

Making

SeriesHow Stream Was Created

14 · Only a log, views and caches

2026-11-23. Six questions in sequence, which together produced the architecture.

1. Can registers and price tables be logs too? Can we avoid having other files?

Yes. Almost everything can be an entry, and that strengthens the system, because each declaration, price and permission then has a time, an author and a history.

Today a separate fileAs entriesWhat you gain
RegisterCREATE, BIND, AMENDWhat a thing was called, and what it belonged to, at the time of any act
Price tables and tariffsPrice declarations with an effective-from time"What price applied at T?"; repricing without overwriting
GrantsGRANT, REVOKE, DELEGATEAuthority becomes replayable
Clocks and sessionsSession-open entriesClock provenance inside the record it qualifies
Budgets and commitmentsAllotment postings; schedule and agreement entriesPlan against actual from one history
Codebook extensionsDeclarations, versionedEvery entry is read by the rules of its time
View rulesA declaration naming the method version and code hashExact reproducibility

What can't move into the log: - a tiny fixed kernel, because something must say how to read the first entry; - large evidence, stored by hash and referenced from entries; - caches and indexes; - software itself, though its version and hash are logged.

Everything is an entry, except the kernel, content stored by hash, and disposable caches. Nothing outside the log is both changeable and authoritative.

2. So we are down to log, views and caches

PartRoleIf it's lost
LogWhat is trueEverything is lost. Protect and replicate it.
ViewsHow to read itRewrite them; the log records which version produced each result
CachesHow to read it fastRebuild them

The kernel sits under the log as its alphabet. Content stored by hash is part of the log by reference.

3. Kernel design

The smallest fixed set of rules that lets anyone read a log from its first entry: - the entry grammar and primitive types; - the canonical byte form, so hashes are stable; - the hash and seal rule; - two core rules: append-only, and validity traced to genesis authority; - the interpretation rule: an entry is read under the declarations in force at its position; - eight bootstrap verbs:

VerbCodeMeaning
CREATE0x0Cdeclare a thing
BIND0x0Dattach one thing to another (a pack to the log)
GRANT0x08give authority
REVOKE0x09withdraw it
AMEND0x16supersede an entry, which stays
OPEN0x10begin a segment or session
COMMIT0x15seal a segment, or close a period
ACK0x1Areceipt; a rejection is an ACK carrying a refusal

The other 56 verbs are themselves declared by CREATE entries.

The size test: it should fit on one page, and a competent programmer should be able to write a validating reader from it in an afternoon.

4. How is the kernel turned into something? A first log entry?

It isn't an entry: you need it to read entries. It becomes three things:

  1. A descriptor. A few-kilobyte file whose hash is the kernel's identity. It travels with the log.
  2. A preamble. The log's first line, STREAM/1 kernel=sha256:…, the only thing in the system that never changes form.
  3. Genesis. The first true entry, written under that kernel. It fixes the log's identity, its root authority and its first clock.

Also around it: reference readers (software), and conformance logs that every implementation must judge the same way.

Kernel changes happen by AMEND from root authority, taking effect at the next segment. Old segments stay under their own kernel.

The kernel is named by the first line and put to use in the first entry.

5. How is the system set up with a large opening set of definitions?

Packs. A pack is a bundle of declarations (units, accounts, pools, profiles, prices, views), stored by hash and adopted with one entry:

BIND  pack:<hash>  to log   name=farm-basics@1  author=<actor>  sig=<signature>

What one entry gives: - atomic: the whole setup is adopted, or none of it; - compact: one line for hundreds of declarations; - shareable: the same hash means the same thing in every log; - traceable: who adopted what, and when.

How packs relate: - They stack: standard verbs → domain packs → the organisation's own. - Overrides are explicit AMENDs. - Conflicting definitions are refused at adoption. - Upgrades adopt @2; history stays readable under @1.

Software composed from the log. When packs declare views, the application is declared data: - entry forms come from verb payload layouts; - menus come from the Register; - screens come from views; - what each person sees comes from grants.

A view declares its inputs. If they aren't declared in the log, it shows as unavailable and never shows a wrong number.

6. How would recording a view to the log work?

WhatHowWhen
A view's definitionCREATE (new version: AMEND) with inputs, parameters, method and runtime hashes, output shape, presentationwhen introduced, often in a pack
A view's resultNot recorded; computed or cachedevery read
A published resultESTIMATE (or COMMIT for a period figure), naming view, θ and upto address, with a result hashwhen someone relies on it
A decision that used itAn ordinary entry with basis pointing at the published resultwhen the decision is made

Purity is the condition: no clock, no randomness, no network. A result then has an exact identity, view(hash) with θ over the log up to address A, which is also its cache key. A small declarative view language was recommended for the common cases, with code as the exception.

Recording decisions with their basis closes the loop the system exists for. The log holds what happened, what was known when it was decided, how that was computed, and who acted.

Read on Telegraph