Seal a world.
Type WRL Core world source on
the left. It is desugared, parsed, validated, canonicalized and hashed as you
type — by a JavaScript port of the same spine that runs inside TRVM Forge. The
sem- ids below are real: the pinned
conformance fixture seals here to the exact id every Forge battery folds
against. Nothing is sent anywhere.
self-check: running…
What this page is doing
The reference implementation's canonical bytes are
json.dumps(artifact, sort_keys=True, separators=(",",":")).
Every value in a sealed artifact is an ASCII string, an integer, a boolean, or
a container of those — so a recursive key-sorted serializer reproduces those
bytes exactly, and WebCrypto SHA-256 reproduces the id. That is why this
playground can be honest rather than illustrative.
The serializer is hand-rolled rather than
JSON.stringify for one reason: rotor lanes are
BigInt. At w=64 a
lane may legally reach 264−1, and a JS number cannot hold it —
an authored 9223372036854775807 would serialize as
9223372036854776000 and quietly mint a
different id from the arbitrary-precision reference. Lanes are exact
here at any width. Every other artifact scalar is bounded to ±(253−1)
and refused — never rounded — outside it.
What it deliberately does not do: lower to a backend, compile to interaction-calculus terms, or reduce to a Film. Those live in TRVM and are not a browser's job. This page covers the semantic half of the pipeline — everything up to and including identity.
Where this is stricter than the current Forge parser
Two mouths, one identity function. Every difference below is a rejection, so for every world both accept the canonical bytes are identical — no id can move across the gap. This is the intended Core 0.1.3 tightening, implemented in the browser first because this is the surface an author actually touches.
- The
profileline is required, singular, and first. The Python parser starts with the only profile pre-installed, so an empty document sealed successfully. - Unknown config keys and bare flags are refused
(
WRL_UNKNOWN_CONFIG_KEY), not dropped. - A key set twice is refused
(
WRL_DUPLICATE_CONFIG_KEY), not last-one-wins. - An edge's optional role prefix is a checked assertion
(
WRL_ROLE_PREFIX_MISMATCH), not decoration. - A repeated port name is a typo, not a set operation.
- Integers must be complete literals.
period=2xis a rejection here; a first cut of this port usedparseIntand read it as2, which was looser than Python'sint(). That one is a fidelity fix, not a tightening.
Things worth trying
- Load the starter world, then the pinned fixture. Different ids — they are different worlds, and neither may be shown wearing the other's.
- Load the pinned fixture, then load its explicit twin. Same id. Sugar has no identity of its own.
- Load the shuffled world. Same id. Declaration order is inert.
- Add a comment, or spaces, or a blank line. Same id.
- Change
rotor=quarter_turn_ztorotor=identity. Different id — the meaning moved. - Change the spinner's
n=8ton=4while keepingquarter_turn_z. Different id — an irrational rotor's integer projection depends on the geometry it lands in. - Wire a second pulser into
r0. A typedWRL_CONTROLLER_CONFLICT, with the line. - Delete the
profileline.WRL_MISSING_PROFILE— a world without a stated dialect is not a world. - Load a fault inside an expansion. The duplicate is reported at line 8, the line you typed, not at the generated line the collision actually landed on.