4ARM
A Forth dialect for Apple Silicon — JIT-compiled to native ARM64, with rank-polymorphic arrays and LLM-assisted word authoring.
Forth has always attracted language designers for the same reason it attracts embedded programmers: it is as close as you can get to the machine while still having a language. 4ARM takes that seriously. It runs on Apple Silicon with a JIT that emits native ARM64 directly — no interpreter loop, no bytecode VM. The built-in assembler means you can drop into raw machine code from within a Forth word definition and come back out again.
The name is a double pun: it runs on ARM, and the traditional Forth pronounciation is "fourth" — so 4ARM is a Forth for ARM. The stack discipline, the dictionary model, the colon-word compilation — all classically Forth. The extensions are where it gets interesting.
Rank-polymorphic arrays
4ARM extends Forth's single-value stack model with first-class rank-polymorphic arrays, inspired by J and APL. A word that works on a scalar automatically lifts to work on a vector or matrix without a loop — the rank-extension machinery handles the iteration. This makes numerical code dense and expressive in a way that traditional Forth never quite manages without macros.
Agentic word authoring
The :: word
triggers LLM-assisted definition generation: describe what you want a word to do in plain
English, and the model emits a candidate definition in 4ARM Forth. You review, test and
accept or reject it. The tight feedback loop — define, test on the REPL, refine — turns
LLM-assisted authoring into something that actually fits the Forth workflow rather than
feeling like code generation pasted in from outside.
Spec & footprint
4ARM passes more than 1,075 tests covering core Forth semantics, arithmetic, string handling, array operations and the assembler interface. The runtime image is under 2 MiB RSS at startup — small enough to embed in resource-constrained contexts and to keep the JIT compilation fast.