planckforth: Bootstrapping a Forth interpreter from hand-written tiny ELF binary
Source: Hacker News
PlanckForth: Bootstrapping an Interpreter from Handwritten 1KB Binary
How to build
Only xxd is needed to build PlanckForth.
git clone https://github.com/nineties/planckforth.git
cd planckforth
make
# The makefile runs:
# xxd -r -c 8 planck.xxd > planck
chmod +x planck
Implementations in other languages are in the others directory.
Hello World
Running the tiny binary directly:
./planck
kHtketkltkltkotk tkWtkotkrtkltkdtk!tk:k0-tk0k0-Q
After bootstrapping with bootstrap.fs:
./planck b)
Built‑in words
| Word | Meaning | Stack effect | Description |
|---|---|---|---|
| = | equal | ( a b — c ) | c = (a == b) |
| ( | shl | ( a b — c ) | c = a > b (logical) |
| % | sar | ( a b — c ) | c = a >> b (arithmetic) |
| v | argv | ( — a‑addr u ) | Argument vector and count |
| V | version | ( — c‑addr ) | Runtime information string |
Binary Layout

Implementations
| Implementation | Build command | Test status |
|---|---|---|
| Handwritten ELF binary for i386‑linux | make | |
| C | make c | |
| Python 3.x | make python |
Benchmarks
See the Benchmarks page on the wiki.