lantern

streams-all-the-way-down

Streams All The Way Down

Why Wanderland exists, discovered while playing Mrs. Curwen's pianoforte

The Realization

It started with a Hacker News article about huge binaries. Compilers insert blanks, linkers fill in offsets, 32-bit gives you ±2GB jumps. Code is just a stream you navigate with a position marker.

Then the dominoes fell:

Binaries are streams with relocations
     ↓
Query plans are streams with operators
     ↓  
Documents are streams with fences
     ↓
They're all the same stream

The Same Pattern

Domain Stream Holes Resolution
Compiler Instructions e8 00 00 00 00 Linker patches offsets
Database Rows Operators in plan Executor fills results
Wanderland Tokens Fences Renderer splices output

The blanks are always there. The linking step is always there. The stream with holes that get filled at resolution time - it's the universal shape.

The Historical Accident

Code stored in files. Data stored in Postgres. Docs stored in Confluence.

Three different systems. Three different query languages. Three different permission models. Three different versioning strategies.

All because we optimized each stream for its primary access pattern and then forgot they were the same thing underneath.

The Integration Tax

Every company with separate systems pays it forever:

  • "Which doc covers this function?" → glue
  • "What code implements this runbook?" → glue
  • "Who approved this config change?" → glue
  • "What broke when this was deployed?" → glue

Each boundary crossing requires a join across systems that don't share a query language. You build adapters. You maintain sync jobs. You pray the references don't drift.

The Wanderland Bet

Delete the boundaries. Accept the tradeoff.

You won't be the fastest at any individual access pattern. You're trading peak performance for unified reasoning:

  • One stream (markdown with fences)
  • One permission model (file system + provenance)
  • One versioning strategy (git)
  • One query interface (MCP)
  • One provenance system (approval hashes that propagate)

The bet is that operational simplicity outweighs performance cost for most use cases. And it does, because you're not running a stock exchange. You're running infrastructure for humans and agents who need to understand what they're looking at more than they need to retrieve a million rows per second.

The Payoff

The query is a walk. The provenance travels with the content. The code is the documentation because the documentation executes.

Cross-boundary queries don't exist because there are no boundaries.

"Which documentation covers this function?" is just: follow the edge.

The Vocabulary Unlock

Once you see the isomorphism, fifty years of database research becomes available:

Database Concept Wanderland Equivalent
Materialized view L0/L1 cache
Query optimizer Cache level selection
Secondary index FenceIndex
Schema Fence input/output contracts
Schema evolution Provenance tracking
Query plan Fence graph
EXPLAIN oculus_look with format='graph'

The architecture didn't change. The ability to talk about it did.

The Sentence

Wanderland is a document database where the query language is executable markdown and the schema includes provenance.


Discovered 2025-12-31, starting from binaries and ending at the reason for everything.

"The prose isn't decoration. It's the part humans can read without tooling. But structurally? It's just more bytes in the stream with a different rendering path."

North

slots:
- slug: structural-isomorphism-thesis
  context:
  - This thesis is a concrete manifestation of the structural isomorphism

East

slots:
- context:
  - Database patterns discovered in the same session
  slug: spatial-database-engineering-patterns
- context:
  - Linking streams to CFR - epistemological extension of streams insight
  slug: capability-follows-recognition

West

slots:
- context:
  - The method that produced this insight - Mrs Curwen's pianoforte
  slug: prompt-engineering-by-innuendo
- context:
  - SOTA assessment references streams insight
  slug: wanderland-sota-assessment
- context:
  - Prior art research alongside original thesis articulation
  slug: research-prior-art-streams-with-gaps

Provenance

Document

  • Status: 🟢 Verified
  • Hash: 3c2447c5
  • By: graemefawcett
  • Date: 2026-01-01
  • Note: and they're at least partially valid

Fences

streams-all-the-way-down-east-fence-0

  • Status: 🔴 Unverified

streams-all-the-way-down-north-fence-0

  • Status: 🔴 Unverified

streams-all-the-way-down-the-realization-fence-0

  • Status: 🔴 Unverified

streams-all-the-way-down-west-fence-0

  • Status: 🔴 Unverified

Changelog

  • 2026-01-01 04:09: Document verified (🟢) by graemefawcett - and they're at least partially valid
  • 2026-01-01 04:09: Document reviewed (🟡) by graemefawcett - these are in fact my thoughts

South

slots:
- context:
  - Connecting to philosophical foundation
  slug: component-chat-replay
- context:
  - Linking theoretical rigour to its origin story - the formal foundations derive
    from the pianoforte insight
  slug: theoretical-foundations-streams-with-gaps