STREAM · Working prototype · Follows Bitpack Header Draft v0.1
Caps Header Lab
Draft v0.1 packs a log fact into a 5-character short header (30 bits) over a 64-symbol alphabet, plus a 5-character extension to 60 bits. This lab asks a different question: what happens if we take more of ASCII as usable — and what could capitalisation itself mean, if case were a designed bit instead of an accident of the alphabet? A new paired-alphabet mode (section 04) rebuilds the alphabet so case is one bit, on purpose.
Prototype — not the Rust kernelNot LoomDraft v0.1 layout unchanged by this labNew: paired-alphabet modeFully client-side · no saved state
01 — Bit budgetBackground · applies to both alphabets
More alphabet, more bits per character
Three alphabets, four header lengths. The 64-symbol alphabet is clean — exactly 6 bits per character, tidy boundaries. Base-95 uses every printable character and gains about half a bit per character, at the cost of arithmetic instead of bit-slicing. Full 128 ASCII gives a clean 7 bits — on paper.
Header length
64 symbols 6.00 bits / char
95 printable ASCII ≈ 6.57 bits / char
128 ASCII 7.00 bits / char
4 characters
24 bits
26.3 bits
28 bits
5 characters
30 bits
32.8 bits
35 bits
8 characters
48 bits
52.6 bits
56 bits
10 characters
60 bits
65.7 bits
70 bits
Base-95 figures are log2(95) ≈ 6.5699 bits per character, multiplied out. A 5-character base-95 string can actually hold a full 32-bit value, because 955 = 7,737,809,375 > 232 — the fractional bits add up across the block.
Visualised — bits at 10 characters
64 symbols
60 bits
95 printable
65.7 bits
128 ASCII
70 bits
Full fact needs
70 bits
A full fact header — what it costs
Position7 bits
Phase2 bits
Modality1 bit
Direction1 bit
Role presence (4 roles)4 bits
Absence kinds (4 × 3 bits)12 bits
Time delta16 bits
Object / kind index12 bits
Version3 bits
Check bits7 bits
Change flags5 bits
Total70 bits
✓ At 7 bits per character: fits, exactly
10 characters × 7 bits = 70 bits. The full fact header above fits in 10 characters with nothing to spare — every field, including absence kinds, version and check bits.
✗ At 6 bits per character: does not fit
10 characters × 6 bits = 60 bits — 10 bits short. Something has to be left out, split off, or moved to the payload. That shortfall is exactly why Draft v0.1 uses a short header plus an extension, and why absence kind lives only in the extended half.
Base-95 gets close, not all the way
10 characters × ≈6.57 bits = ≈65.7 bits — about 4 bits short of 70. Better than 60, still not the whole fact in 10 characters.
The 128 figure is theoretical. Control characters 0–31, DEL (127) and space cannot go in a text log line — space is the field separator, and controls break terminals, editors and parsers. Quotes (") and backslash (\) need escaping in JSON, which would break the plain-text, fixed-width idea. So the practical alphabet is the printable subset: 95 characters at most, and fewer if you also drop characters that break shells or URLs.
02 — The centrepiecev0.1 exploration · caps as an idea only — not real in v0.1
Caps as… what?
Eight entries from a fabrication workshop — meter samples and steel transfers, the same actors and objects across most lines, only time and measure changing. Each entry has a 5-character short header. Pick a meaning for capitalisation and watch the same eight headers re-render. Then tap any line to read what its caps are saying.
Header character positions, for the diff reading: 1 position/verb · 2 phase · 3 role set · 4 time delta · 5 object/kind. Capital letters are shown in orange.
Reading the selected line
Important: in the Draft v0.1 64-symbol alphabet, case is alphabet position, not a free bit — A and a are simply different symbols at different positions, the way B and 7 are different. So none of these four meanings exist in v0.1 today. Each one needs either a letter-based alphabet (where case really is one bit per character, bit 5 in ASCII) or a separate home for the caps channel. This lab is exploring the idea — it is not claiming v0.1 already does it.
03 — Base-95 encoderLab exploration · base-95 — neither v0.1 nor the paired alphabet
The same fields, in printable ASCII
A live encoder/decoder using the 95 printable ASCII characters as a base-95 number, most significant character first, computed with BigInt. A counting note the lab had to learn the hard way: codes 33–126 (! to ~) are only 94 characters — the 95 printable characters are codes 32–126, space included. So space is a digit here too, assigned the highest digit value (94) so headers seldom begin with it; where a space digit appears inside a header it is displayed as ␣. The short fields are exactly Draft v0.1's: position 7, phase 2, modality 1, direction 1, role presence 4, estimate 1, change 1, time delta 12, extended-follows 1 — 30 bits of field, carried in a 32-bit value space and shown as 5 base-95 characters. With the extension, the absence kinds (3 bits per role), object/kind index (12 bits) and check bits (6-bit XOR fold) bring the total to 60 bits, shown as 10 characters.
Short-header fields
Role presence · 4 bits
Extended fields (used when extended follows = 1)
Computed automatically as an XOR fold of the other 54 bits. Not set by hand.
Base-95 header · live
—
Decode it back
Type or paste any 5- or 10-character base-95 header (printable ASCII, !–~, plus space as digit 94 — shown as ␣ in displays). The fields below are recovered from the string alone.
Draft v0.1 presets, re-encoded
The three presets from the adopted draft, with their original v0.1 headers beside the base-95 form produced by the encoder above. Load any preset into the controls to inspect its fields.
A second mode for the lab, built so capitalisation can actually carry meaning. Everything in this section is the paired alphabet; sections 01–03 stay as they were and are labelled v0.1 or base-95 where they belong.
Why v0.1 cannot do this — and what changed
In Draft v0.1, case is already spent
The v0.1 alphabet is A–Z a–z 0–9 -_, in that order: A is value 0 and a is value 26. They are not the same character in two cases — they are two unrelated symbols that happen to look like a pair. Flipping the case of a character does not flip one bit; it adds or subtracts 26 and scrambles whatever field the character was carrying. So in v0.1 a capital cannot mean “this field changed”, or “this role is present”, or anything else separate — there is no separate bit left for it to be. Case there is alphabet position, not a free bit.
In the paired alphabet, case is one bit — on purpose
The alphabet is rebuilt as pairs that differ only by ASCII bit 5 (0x20) — the case bit itself. Each character is now 5 bits of pair identity plus 1 bit of case: the pair says which symbol it is, the case bit is a separate, assignable flag riding on that symbol. Still 6 bits per character, still 30 bits in a 5-character header — no capacity is lost versus v0.1. What changed is the bookkeeping: case stopped being part of the value and became a designed bit with a named meaning per character, assigned in the layout table below.
The 31 usable pairs (first form = case bit 0, second form = case bit 1; pair number = the 5-bit identity):
0 @ / ` · 1–26 A/a B/b C/c D/d E/e F/f G/g H/h I/i J/j K/k L/l M/m N/n O/o P/p Q/q R/r S/s T/t U/u V/v W/w X/x Y/y Z/z · 27 [ / { · 28 \ / | · 29 ] / } · 30 ^ / ~
Pair 31 would be _ / DEL — excluded, because DEL is not printable, so pair 31 is reserved and never appears in a valid header. The digits 0–9 are excluded too: a digit has no uppercase form, so it cannot carry a case bit.
The pairing is not a trick of the table — it is ASCII itself: a pair's two forms are exactly 0x20 apart, the pair identity is the character code with bit 5 removed, and the case bit is bit 5. Any tool that can read an ASCII code can split a paired character into its 5 + 1 without a lookup table.
Re-aligned header layout — paired alphabet
The v0.1 layout packs one continuous 30-bit stream and slices it into 6-bit characters, so fields spill across character boundaries (the 7-bit position field leaks one bit into character 2, and so on). That cannot survive here: if a field straddled characters arbitrarily, a character's case bit would belong to no one field. So the paired layout is re-aligned into per-character 5-bit slots. Every field either occupies whole characters or a named bit range inside exactly one character, and each character's case bit is assigned to exactly one named flag — the five one-bit fields of v0.1 (extended-follows, estimate, change, modality, direction) no longer sit in the data stream at all; they are the case bits of characters 1–5.
Character
5-bit value field
Case-bit meaning
1
Position bits 0–4 (low 5 of 7)
Extended-follows — second form = a 5-character extension follows
2
Time delta bits 0–4 (low 5 of 12)
Estimate — second form = the entry's value is an estimate
3
Time delta bits 5–9 (middle 5 of 12)
Change — second form = context changed on this line
4
Role presence bits 0–3 (actor, counterparty, object, measure), with time-delta bit 10 in the top bit
Modality — first form = asserted, second form = other modality
5
Phase bits 0–1, position bits 5–6 (bits 2–3), time-delta bit 11 in the top bit
Direction — first form = inbound / to, second form = outbound / from
Absence kind, object, bit 2 (bit 0) + absence kind, measure (bits 1–3) + check bit 5 (top bit)
Check bit 4
Where the layout had to change to fit the 5+1 alignment — said plainly
No continuous bit stream. v0.1 slices one 30-bit stream into 6-bit characters; the paired layout packs each character separately as 5 + 1. Same field sizes throughout — position 7, phase 2, role presence 4, time delta 12, object index 12, absence kinds 12, check 6 — but gathered differently.
Position and time delta are no longer contiguous. Their high bits would not fit beside the other fields, so they ride in the spare top bits of characters 4 and 5 (time bits 10–11, position bits 5–6 sit with phase in character 5). A decoder gathers those fields from more than one character. That scattering is the price of the alignment, and it is documented in the table rather than hidden.
The five one-bit fields moved house. Extended-follows, estimate, change, modality and direction are carried entirely by case. Set a flag and the character's letter stays the same — only its form flips.
The check bits are split. The extension offers only five case slots, so check bits 0–4 live in the case of characters 6–10 and check bit 5 lives in character 10's top data bit. The check itself is unchanged in spirit: a 6-bit XOR fold of the other 54 bits — which now include the short header's case flags, so flipping any character's case breaks the fold and the header is rejected (the self-test in section 05 proves this).
Pair 31 is a hole. A 5-bit chunk can name 32 values but only 31 pairs exist, so a chunk value of 31 has no paired encoding. The encoder below flags that combination instead of emitting the excluded _, and the decoder rejects any header containing it.
Live paired-alphabet encoder / decoder
Every v0.1 short-header field has a control, and every case-bit flag has its own control — changing a flag flips only the form of its character; the letter (the pair identity) does not move. The extension fields and the computed check bits work as in the layout table above.
Value fields · 5 bits per character
Split: low 5 in char 1, high 2 in char 5.
Chars 2–3, plus bits 10–11 in chars 4–5.
Role presence · 4 bits (char 4)
Case-bit flags · 1 bit each, carried by case
Extended fields (used when char 1 case = extended)
Expressed in 5-bit pair values across chars 6–8 — this alphabet has no digits.
Computed as an XOR fold of the other 54 bits. Bits 0–4 ride in the case of chars 6–10; bit 5 in char 10's top data bit. Not set by hand.
Paired-alphabet header · live
—
Decode it back
Type or paste any 5- or 10-character paired header. Only the 62 paired symbols are valid — digits, space and _ are rejected, and an extended header whose case was flipped will fail its check bits.
The three Draft v0.1 presets, in the paired alphabet
The same field values as the adopted presets, encoded both ways, side by side. Same fields, same bit totals — different alphabet, and in the paired column the case of every character is a flag you can read off the layout table. Load any preset into the paired controls to inspect it.
The four caps meanings — now actually working
The same eight workshop entries as section 02, with the same letter skeletons — but here the skeletons are pair identities, so flipping a character's case changes only its case bit and leaves its 5-bit value untouched. That is what section 02 could only pretend at. In this demo the case channel is assigned to the meaning you pick below (a different assignment from the encoder layout's flags — the paired alphabet makes either possible, because the bits are real and independent; a draft picks one assignment and sticks to it). Tap any line to read its caps.
Reading the selected line · paired alphabet
Diff close-up — what changes the pattern, and what doesn't
Line 1 → line 2 is the same sample, same phase, same roles, same object — only the time delta moved. In the paired alphabet the line-2 header is smpLq: four characters stay in their first form because their fields stayed the same, and exactly one — character 4, the time delta — flips to its second form. Compare line 4, where a new kind of entry starts and every field changes: ACTTR, all five in second form. And a line where nothing in the header changed would be all first-form — a pure continuation you can spot without decoding anything. In v0.1 none of this could be shown honestly, because flipping a character's case there would have changed its value, not just its form.
A note on forms: for letter pairs the two forms are upper and lower case. For the five symbol pairs (@/`, [/{, \/|, ]/}, ^/~) “case” means the second ASCII form — same bit, less familiar shape. Headers built mostly from letters read as caps; headers that land on symbol pairs read as form flips.
Run on load, and again whenever you press the button. Random headers are encoded and decoded and every field is compared. The corruption test takes one extended header, changes a single character, and checks that the check bits reject it. The paired-alphabet tests below do the same for the new mode, plus the test v0.1 could never run: flip one character's case — same letter, other form — and the check bits must reject the header. Results are shown as they come out — a failure would be shown as a failure.
—
Short headers (5 chars) round-tripped
—
Extended headers (10 chars) round-tripped
—
One-character corruption
Running…
Paired alphabet — self-test
Random paired headers, generated field by field and round-tripped through the paired encoder and decoder in section 04. A generated combination whose 5-bit chunk would be 31 — the reserved _/DEL pair — has no paired encoding; those draws are skipped and counted openly below, never silently counted as passes.
—
Paired short headers (5 chars) round-tripped
—
Paired extended headers (10 chars) round-tripped
—
Case-flip corruption (one character, case only)
Running…
06 — Caveats, in plain words
What could bite
Case is fragile. Some systems fold case without asking — filesystems, email headers, some databases and search indexes treat A and a as the same. And a human retyping a header from a screen will get the letters right and the case wrong, because case is the hardest part to copy by eye.
So a case-carrying log must be case-sensitive end to end. Every tool that touches the line — storage, transport, search, display — has to preserve case exactly, and the check bits must be able to catch a case flip, or a flipped capital silently becomes a different meaning.
The full-128 figure is theoretical. Control characters, DEL and space cannot live in a text log line, and quotes and backslash need escaping in JSON. The printable 95 are the practical ceiling, not 128.
This lab is a prototype. It is not the Rust kernel and it is not Loom. Nothing here is wired into STREAM itself; it exists so the caps and base-95 ideas can be tried, broken and argued with.
Draft v0.1 is unchanged. The adopted 5+5 layout, its 64-symbol alphabet and its bit tables stay exactly as adopted. Anything this lab suggests would be a future draft, decided separately — not a quiet edit to v0.1.
The paired alphabet has no digits. Digits have no uppercase form, so they are excluded — which means object/kind indexes and time deltas cannot be written as decimal-looking characters and must be expressed in the 5-bit pair values, exactly as the paired layout table in section 04 does. A paired header never looks like a number, and tools must not expect one.
Case remains fragile — the paired alphabet does not fix that. Making case a designed bit makes it meaningful, not sturdy: systems that fold case (filesystems, email headers, some databases and search indexes) will silently destroy a paired header's flags and half its check bits, and a human retyping one will still get the letters right and the forms wrong. A paired-alphabet log has to be case-sensitive end to end, and its check bits — which the self-test shows do catch a single case flip — are the safety net, not a cure.
Pair 31 is a permanent hole in the paired alphabet. The _/DEL pair is unusable, so one of the 32 five-bit values can never appear. Field combinations that would need it have no encoding in this mode; the encoder flags them rather than inventing a symbol.