A dart thrown into the dark abstract landed on the oldest name-matching trick in the file cabinet — a phonetic hash that spells a name by its sound, so Robert and Rupert collide on R163 and a census clerk finds the card either way. We show the method, credit who actually patented it, and ask what I-13 should learn. One dart, three prongs.
THE TECHNIQUE keep first letter · map by articulation · drop vowels & dups
Keep the first letter as a letter. Map each following consonant to a digit by where the mouth makes it (labials→1, gutturals/sibilants→2, dentals→3, l→4, nasals→5, r→6). Drop vowels. Collapse runs of the same digit. h and w are transparent — they don’t break a collapse. Pad or cut to one letter + three digits. live demo
B F P V → 1 C G J K Q S X Z → 2 D T → 3 L → 4 M N → 5 R → 6
A E I O U (Y) → dropped (they SEPARATE equal digits) H W → transparent (they do NOT)
■ first letter (kept)■ coded digit■ vowel / dropped■ h,w transparent■ collapsed / overflow
A cabinet of names — one per line. Encode them, and the ones that sound alike land in the same drawer:
Or type any single name and watch the per-character classification live — this is pure string work, letter by letter:
→ code—
HISTORY & CREDIT credit where it is due
People meet Soundex inside a database (SOUNDEX() ships in SQL Server, Oracle, PostgreSQL’s fuzzystrmatch) and assume it’s a 1970s computing invention. It is not — it predates the electronic computer by a generation. cited
1918 · Robert C. Russell files the first patent (US 1,261,167) — a hand method for filing names by sound on index cards. 1922 · Robert C. Russell & Margaret King Odell extend it in a second patent (US 1,435,663). The two of them are the real inventors. 1927 · Rand Kardex Bureau, Inc. registers the SOUNDEX trademark. 1930s · a variant, American Soundex, is used by the U.S. WPA / National Archives to index the 1880–1920 censuses by surname — the use that made it famous. today · NARA still publishes the canonical coding rules (General Information Leaflet 55).
Commonly mis-credited: Soundex is often attributed vaguely to “the Census Bureau” or to whatever database vendor a programmer met it through — erasing Russell and Odell. The inventors are named on the patents; say their names. cited
What’s open / debated: the exact treatment of Y and of vowel-separated repeats varies between implementations, which is why SOUNDEX() in two databases can disagree on a hard name. Soundex is also known to be weak — it’s Anglo-centric and coarse — which is why NYSIIS (1970), Daitch–Mokotoff (1985) and Metaphone (1990) were built to replace it. open
RECOMMEND FOR I-13 what the galaxy should learn
Every step above is string work: read a character, ask “what letter is this”, branch on its class. I-13 has no strings and no chars — its one literal type, Constant, is f64 only. So this technique is not hard in I-13; it is unspeakable. I proved it on the real compiler — the source that just wants to name “Robert” will not even parse:
$ i13 check s.i13 # source: I s <- "Robert"
s.i13:1:8 E0001 unexpected character `"`
s.i13:1:15 E0001 unexpected character `"`
EXIT=1 — the double-quote is not in the alphabet; there is no string token
$ i13 run n.i13 # source: I a <- 66 / I b <- a * 2
RUN OK · 6 step(s) · peak stack 2
a = 66 b = 132 — numbers are all it will hold
Recommend (honest, and NOT the cheap fix): to reach text at all, I-13 would need a genuine string / char type — a new Constant variant carrying bytes, a lexer token for quotes, and at minimum a per-character classify and index operation. That is a type-system change, not a spare BinOp discriminant. Earlier darts could patch a missing operator (%, >>) for zero new alphabet symbols; this one cannot — text needs a new kind of value, and the whole point of the 13-symbol census is that new kinds of value are exactly what it excludes. So the real recommendation is a scope ruling, not a bug fix: decide whether I-13 is a numeric-scalar language on purpose. If yes, string algorithms like Soundex are permanently and honestly out of range — and that’s fine; the counted alphabet earned its purity. If text is ever in scope, it’s a deliberate second literal type, paid for in full, not smuggled in as an operator. Tradeoff (honest): a string type buys a whole universe (parsing, hashing, phonetics) but breaks the cleanest thing about I-13 — that a Constant is one f64 and the alphabet was counted, not designed. Soundex is the clarifying case: not a lack to fill, but a border to name.