Start here: the twin in a page

this page as plaintext

The twin is the reference simulation, the same rules the console’s worlds run, built as one WebAssembly module of 434,093 bytes (162,549 brotli’d). A world is a grid of integer words, one a cell, and a step is a pure function of the last: the same world, the same ops at the same frames, the same digest, on any machine. That is the contract every example on these pages stands on, and the one the replay below tests.

This is the twin, running in this page. It opened a 64-cell cube with a sea, an island and a spring, and steps it twenty times a second on a worker; the line under it is its frame, the first eight hex digits of its digest, and what it holds.

The cube, live: its spring runs over the island into the seashows sl_step

Three ways in

// from a page at the site's root; the worker fetches, so it is given whole addresses
const at = (p) => new URL(p, document.baseURI).href;
const worker = new Worker(at("media/toys/lab-worker.js"), { type: "module" });
worker.onmessage = (e) => {
  const m = e.data;
  if (m.type === "state" && m.opened) {
    worker.postMessage({ type: "op", op: { op: "sphere", x: 32, y: 8, z: 32, r: 4, mat: 2 } });   // the demo's op, at frame 0
    worker.postMessage({ type: "run", on: true });
  }
  if (m.type === "state") console.log(m.frame, m.digest, m.census);
};
worker.postMessage({
  type: "open",
  wasm: at("media/world-rt/starlab_wasm.wasm"),
  files: { "meta.lua": at("media/house/worlds/cube/meta.lua"), "grid.png": at("media/house/worlds/cube/grid.png") },
  lay: at("media/house/worlds/cube/lay.json"),
});

That script is this demo: a sphere of water, radius 4, dropped over the island at frame 0.

a sphere of water (mat 2, r 4) dropped over the island at frame 0shows sl_op_sphere

Tell it from a card

A StarScript card reaches the page it is on: set tell.world "meteor" is a value kept like any other, and told to the page as it is set. Here the live view answers it: a meteor drops a ball of lava, a comet one of ice, a flash flashes the view. Press Play on the card, with the view below it in sight.

Skip the board

tell.world · press Play

say s2ar "Tell the world: a meteor, a comet, a flash."
set tell.world "meteor"
say s2ar "The view beside this board took the strike."
set tell.world "flash"
end
The view the card tellsshows tell.world

Replay it

A tape is the world as it opened and every op at its frame. Laid on a fresh world and stepped to its last frame, it gives the digest it was taken with, or it is not the same world: a reader refuses an op it does not know, by name, rather than skip it (the tape’s format). This one is two ops, lava at frame 30 and ice at frame 90, laid and stepped to frame 200.

a tape of two ops (lava at frame 30, ice at 90) laid on a fresh cubeshows load

Where next

The tree on the left is the whole reference, folded: the engine’s exports, the worker’s messages, the view’s look, the board’s runtime, StarScript’s verbs, the formats and the apps’ verbs. Every page has a plaintext twin, the link under its title, for a reader that wants the words without the page.

The work on this page: the commits of the last 30 days on its sources, the work open against them, its checks

  • starlens 74b1736 reference: a hand page's code fences written from their sources, and the one that had drifted (2026-11-09)

  • starlens 7bdd356 site: the start guide's way on names the board's runtime (2026-11-06)

  • starlens 6f99688 site: the reference, her layout: the API reference on the left (collapsed), the documentation on the right with the twin live in it; the first guide; the parser in the page documented beside a card you rewrite (D3, D4, D6 of the reference lane; X1's docs, 2026-11-05)

The work record as of , from the fold on tower.

Nothing open against these sources.

  • FAILlint/web-reference 12 Nov on tower

Generated by tools/reference_pages.py from reference-prose/guides/start.md (by hand; its fences from their sources); the twin bfaad079a7ce (434093 bytes). The words are a draft.