# RaijinLang 17 — the account in the SlangLang specification

Extracted from ~/workspace/flowchi-school/workshop/slanglang/SPEC.md (§9 "The energy lineage" and §10 "From RaijinLang 17 to SlangLang — mechanism by mechanism"). SlangLang's spec is where RaijinLang 17 is documented mechanism by mechanism; the primary interpreter itself is raijin_lang_17.py in this folder.

---


## 9. The energy lineage — kept, and demoted to its honest job

RaijinLang 17's physics: a letter's value is its alphabet index × 5 for vowels ("energy"), × 2 for consonants ("mass"). **Verified against the dropped source: the law holds for all 26 letters, exactly.** SlangLang inherits `calc_energy`/`resonate` unchanged (`energy_of`/`resonance_of`).

What changes is the job. In 17, energy was *semantics*: `spark storm thunder` set the variable `storm` to the spelling-energy of the word "thunder" — a variable's value was its name's orthography. In SlangLang, meaning lives in typed fields, and energy is a **measure**: a message's **quanta** = the REUs of its canonical expansion, and its **resonance** = REUs per letter. Mira triages her Gate queue *by quanta* (her charter) — the physics prices the message for the queue; it never decides what the message means. A heavier receipt (the worked conversation's receipt runs 7492 REU against the route's 2896) is visibly heavier to triage, which is true, and decides nothing by itself, which is honest.

---

## 10. From RaijinLang 17 to SlangLang — mechanism by mechanism

Everything below was measured on the dropped file `raijin_lang_17_0p7b.py` before designing against it.

| # | RaijinLang 17 mechanism | Finding (measured) | SlangLang |
|---|---|---|---|
| 1 | Alphabet energy law (vowel ×5, consonant ×2, by index) | **Holds exactly, 26/26 letters** | **Kept verbatim** — as measure (quanta/resonance), §9 |
| 2 | Keyword chassis: 50 keywords with filed weights | **Only 4 of 50 weights agree with the file's own `calc_energy`** (fall 65, pulse 224, echo 122, storm 215); 46 disagree (e.g. rise filed 86, computed 144; minus filed 145, computed 242) | **Killed as authority.** No weight table survives that contradicts its own law. SlangLang's kinds and keys are closed registries whose expansions are templates, not weights |
| 3 | Keyword dispatch | **Only 8 of 50 keywords are implemented** (rise, fall, spark, form, bind, echo, charge, plus); the other 42 fall through the loop **silently** — a program can say `storm` and nothing happens, with no error | **Every kind dispatches; unknown tokens are ungrammatical.** Silence is reserved for refusal, where it means something |
| 4 | Envelope `rise`/`fall` | Runtime check: a token before `rise` prints an error and aborts | **Kept, promoted to grammar**: transcript well-formedness, §8-A7 |
| 5 | `spark name source` — variable = energy(source word) | Meaning by spelling: the value of `storm` after `spark storm thunder` is a fact about the word "thunder", not about any storm | **Killed.** Meaning is typed fields; energy never carries content (§9) |
| 6 | `form` + `bind key to source` | `bind` writes into "the last defined form" (insertion-order guess); the word `to` is skipped, never validated; if the last registry entry isn't a form, the bind **silently does nothing** | **Replaced** by keyed, kind-shaped fields: every field is addressed by its key and validated against its kind's shape; nothing is addressed by "the last one" |
| 7 | `plus`/`charge` registry arithmetic | Type-unsafe: `charge` on a form raises `TypeError` (measured); missing names are silent no-ops; a `plus` source that happens to share a variable's name is read as the variable (literal/variable ambiguity, resolved by lookup order) | **Killed.** Agent messages don't mutate a shared registry; they carry provenance and references. The literal/variable ambiguity class does not exist here |
| 8 | `echo` of a missing name prints `void` | Absence doubles as a null *value* | **Killed.** In SlangLang absence has exactly one meaning — refusal (§6) — and it is never a value. Unknown references fail validation |
| 9 | Error model | Truncated input (`rise spark storm`) raises a raw `IndexError` (measured); other faults print and continue | **Two typed errors, raised never printed**: `UngrammaticalError` (not the language) vs `ValidationError` (the language, wrong shape) |
| 10 | Docstring: execution is "stochastic" | The code is deterministic; the claim is decoration | **Determinism is law** (§1.1), tested twice-expanded equality. A spec that claims what the code doesn't do is how #2 happened |
| 11 | `pressure` field, defined, never used | Dead state in the chassis | No dead state: every field of `Message` is load-bearing in parse, expansion, or validation |
| 12 | One interpreter, print-side-effects | Output is `print` — untestable, unfileable | Pure codec: parse / expand / validate return values; Witness can file them |

The pattern across the table is the deep improvement in one sentence: **RaijinLang 17 let silence, spelling, and insertion order carry meaning; SlangLang carries meaning only in typed, provenanced, expandable form — and reserves silence for the one thing it should mean.**

---
