The Language That Fit in Your Head

2026-03-13 · Shammah Chancellor
Forth, Chuck Moore, and being right exactly when it mattered

#! /usr/bin/env gforth  The Language That Fit in Your Head  Shammah Chancellor  Forth, Chuck Moore, and being right exactly when it mattered

0 [IF]

5 — on the stack. 3 — on the stack. + — takes both, leaves eight. That’s a Forth program. You just ran one.

: double 2 * ; — a word. Takes the top, doubles it, returns it. 5 double — ten. You extended the language.

The stack is the only state. What you see is everything. What the word takes is gone. What it leaves is the result.

In 1968, Chuck Moore wrote : point az el move ; on an IBM 1130. Three words. The radio telescope moved.

Eight kilobytes. Carpet company. Amsterdam, New York. Not enough memory to do it the normal way. So he invented the normal way.

He called it FORTH. He did it himself. FORTH became the language inside blood analyzers, radio telescopes, the Galileo probe.

colorForth in 2001. Color replaces delimiters. Red compiles. Green executes. Hundreds of bytes. GreenArrays in 2009. 144 cores. 10 microwatts each. Moore went smaller, again.

Elizabeth Rather. FORTH, Inc. 1973. Thirty years. Leo Brodie. Thinking Forth. 1984. Still in print.

Chuck Moore is 87. Incline Village. Still writing.

Forth lost. Not because it was wrong. Because every Forth was custom. Moore’s rule: write your own words, don’t use others’. Custom implementations don’t compose.

No ecosystem. By design. C won by being portable. Python won by being forgiving.

Adoption bought libraries. Libraries bought everything. The forgiving won over the honest.

The industry chose forgiveness over honesty. Every generation finds the same place Moore reached in 1968.

He just got there first. And stayed there longest.

I asked an AI to write a blog post about Forth. Then: run it. Then: assemble it. Then: make it executable.

Blog post. Forth. ARM64. Machine code. Five words in _main. cffa edfe. Then it ran.

Exit zero. True.

cat this-file | gforth. Anywhere. The blog speaks itself and exits clean.

0 [IF] — zero is false. Forth skips this block. You are reading the skipped block. The machine runs the other one.

Moore would recognize it. A system that knows what you put in it. He built the thing that did that. He’s 87. I want to meet him.

He wasn’t right too early. He was right exactly when it mattered. Small enough to understand. Large enough to do something real.

That window is closing. The machines are too large now. He left the understanding in the language. Go get it.

He’s not wrong. He never was.


cat this-file | gforth — exit zero. True.

[ELSE]
.ln ( str len – ) type cr ;

nl cr ;

.post ( – ) s” 5 — on the stack. 3 — on the stack. + — takes both, leaves eight.” .ln s” That’s a Forth program. You just ran one.” .ln nl s” : double 2 * ; — a word. Takes the top, doubles it, returns it.” .ln s” 5 double — ten. You extended the language.” .ln nl s” The stack is the only state. What you see is everything.” .ln s” What the word takes is gone. What it leaves is the result.” .ln nl s” In 1968, Chuck Moore wrote : point az el move ; on an IBM 1130.” .ln s” Three words. The radio telescope moved.” .ln nl s” Eight kilobytes. Carpet company. Amsterdam, New York.” .ln s” Not enough memory to do it the normal way. So he invented the normal way.” .ln nl s” He called it FORTH. He did it himself.” .ln s” FORTH became the language inside blood analyzers, radio telescopes, the Galileo probe.” .ln nl s” colorForth in 2001. Color replaces delimiters. Red compiles. Green executes. Hundreds of bytes.” .ln s” GreenArrays in 2009. 144 cores. 10 microwatts each. Moore went smaller, again.” .ln nl s” Elizabeth Rather. FORTH, Inc. 1973. Thirty years.” .ln s” Leo Brodie. Thinking Forth. 1984. Still in print.” .ln nl s” Chuck Moore is 87. Incline Village. Still writing.” .ln nl s” Forth lost. Not because it was wrong. Because every Forth was custom.” .ln s” Moore’s rule: write your own words, don’t use others’. Custom implementations don’t compose.” .ln nl s” No ecosystem. By design.” .ln s” C won by being portable. Python won by being forgiving.” .ln nl s” Adoption bought libraries. Libraries bought everything.” .ln s” The forgiving won over the honest.” .ln nl s” The industry chose forgiveness over honesty.” .ln s” Every generation finds the same place Moore reached in 1968.” .ln nl s” He just got there first. And stayed there longest.” .ln nl s” I asked an AI to write a blog post about Forth.” .ln s” Then: run it. Then: assemble it. Then: make it executable.” .ln nl s” Blog post. Forth. ARM64. Machine code.” .ln s” Five words in _main. cffa edfe. Then it ran.” .ln nl s” Exit zero. True.” .ln nl s” cat this-file | gforth. Anywhere.” .ln s” The blog speaks itself and exits clean.” .ln nl s” 0 [IF] — zero is false. Forth skips this block.” .ln s” You are reading the skipped block. The machine runs the other one.” .ln nl s” Moore would recognize it. A system that knows what you put in it.” .ln s” He built the thing that did that. He’s 87. I want to meet him.” .ln nl s” He wasn’t right too early. He was right exactly when it mattered.” .ln s” Small enough to understand. Large enough to do something real.” .ln nl s” That window is closing. The machines are too large now.” .ln s” He left the understanding in the language. Go get it.” .ln nl s” He’s not wrong. He never was.” .ln nl ;

 — self-compilation —  the linker writes cffa edfe. we didn’t put it there. it appears.

: >f ( str len fid – ) write-file throw ;

write-asm ( – ) s” /tmp/forth-blog.s” w/o create-file throw { fid } s" .section __TEXT,__text” fid >f s" .global _main” fid >f s" .align 2” fid >f s" _say:” fid >f s" stp x29, x30, [sp, #-16]!” fid >f s" mov x29, sp” fid >f s" mov x2, x1” fid >f s" mov x1, x0” fid >f s" mov x0, #1” fid >f s" mov x16, #4” fid >f s" movk x16, #0x200, lsl #16” fid >f s" svc #0x80” fid >f s" ldp x29, x30, [sp], #16” fid >f s" ret” fid >f s" _main:” fid >f s" stp x29, x30, [sp, #-16]!” fid >f s" mov x29, sp” fid >f s" adrp x0, s_magic@PAGE” fid >f s" add x0, x0, s_magic@PAGEOFF” fid >f s" mov x1, #s_magic_len” fid >f s" bl _say” fid >f s" adrp x0, s_verdict@PAGE” fid >f s" add x0, x0, s_verdict@PAGEOFF” fid >f s" mov x1, #s_verdict_len” fid >f s" bl _say” fid >f s" mov x0, #0” fid >f s" ldp x29, x30, [sp], #16” fid >f s" ret” fid >f s" .section __DATA,__data” fid >f s" .align 0” fid >f s" s_magic: .ascii "cffa edfe\n"” fid >f s" .ascii "The blog compiled itself to ARM64.\n"” fid >f s" .set s_magic_len, . - s_magic” fid >f s" s_verdict: .ascii "He’s not wrong. He never was.\n"” fid >f s" .set s_verdict_len, . - s_verdict” fid >f fid close-file throw ;

flush stdout flush-file drop ;

check-asm ( – ) s” test -f /tmp/forth-blog.o && echo ‘asm: ok’ || echo ‘asm: FAIL’” system ;

check-link ( – ) s” test -x /tmp/forth-blog && echo ‘link: ok’ || echo ‘link: FAIL’” system ;

check ( – ) check-asm flush check-link flush ;

compile-self ( – ) nl s” Now we write ARM64 assembly. The same words, in the machine’s language.” .ln s” _say writes bytes to stdout. _main calls five words and exits zero.” .ln nl flush write-asm s” as -o /tmp/forth-blog.o /tmp/forth-blog.s 2>&1 || echo ‘ERROR: assembly failed’” system nl s” The assembler turned text into object code.” .ln s” The linker is sealing it into a Mach-O binary now.” .ln nl flush s” sh -c ’ld -o /tmp/forth-blog -lSystem -syslibroot $(xcrun -sdk macosx –show-sdk-path) -e _main -arch arm64 /tmp/forth-blog.o 2>&1 || echo ERROR: link failed’” system nl check s” Every macOS binary starts with cffa edfe. The magic number.” .ln s” The linker put it there. We didn’t. It appears.” .ln nl flush s” xxd /tmp/forth-blog | head -1” system nl s” Now it runs. The blog speaks itself in machine code.” .ln nl flush s” /tmp/forth-blog” system ;

.post compile-self

[THEN] bye