A compiler that adds zero bytes. Everything you see is earned through barcode scans.
The only hardcoded logic in the entire application:
function canAccept(prime, generated) {
// Direct: this number exists in the generated set
if (generated.has(prime)) return true;
// GCD: shares a factor with anything generated
for (const existing of generated) {
if (gcd(prime, existing) > 1) return true;
}
return false;
}
function gcd(a, b) {
a = Math.abs(a); b = Math.abs(b);
while (b) { [a, b] = [b, a % b]; }
return a;
}Everything else — CSS, content, fonts, database tables, the lexicon — arrives through barcodes and must pass this gate.
The heart of the system. A single table in localStorage:
| Column | Type | Description |
|---|---|---|
value | number | The number itself |
type | string | 'prime' | 'composite' |
origin | string | How it got here (e.g. "scanned", "2×3") |
cost | number | φ² ≈ 2.618 for primes, 0 for composites |
tick | number | Generation order (0-indexed) |
consumed | boolean | Has a barcode used this number yet? |
When you scan a raw prime:
cost = φ²cost = 0The potential is: SELECT * FROM mm_loop WHERE consumed = false
Format: type:prime:content
| Type | Gate Rule | What It Does |
|---|---|---|
| (raw number) | Always accepted | Adds prime to ledger |
css | Exact prime in generated | Injects <style> tag |
h1, h2, h3, p | canAccept(prime) | Content node |
math | canAccept(prime) | Math expression |
def | canAccept(prime) | Definition |
hr | canAccept(prime) | Separator |
meta | canAccept(prime) | Page title |
js | canAccept(prime) | Code (earned execution) |
tp, tpb, op, q | canAccept(prime) | Database operations |
compose, join, pipe | canAccept(prime) | Composition |
lex | canAccept(prime) | Lexicon |
canAccept + gcd)mm_loop)That's it. Everything else arrives through barcodes.
css: barcodes)h1:, p:, etc.)js: barcodes)lex: barcodes)The compiler adds zero bytes of content. Zero bytes of styling. Zero lines of business logic. It only knows how to accept or reject. Everything else is earned.