Story

On air. The free wire runs 15 minutes behind live. See pricing

World, crypto, finance and tech news, scored for impact.

TechHacker NewsFiled 25 min ago

Writing a primitive Forth in JavaScript

Open the sourceReported by Hacker News, onirom.fr, 1 December 2026

Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.

A JavaScript prototype of the Forth programming language has been released, implementing a minimalist interpreter with a graphical command-line interface built on the p5js framework. The prototype supports core words including `:` and `;` for defining new words, arithmetic operations `+` and `-`, `.` to display the stack top, and `words` to list definitions, while parsing unrecognized tokens as numbers pushed onto the data stack. The implementation is intentionally non-standard and omits practical primitives such as stack manipulation words, though the author notes these can be added trivially following the existing pattern. The project began as an experiment in programming language design and was later ported to ARM on a Raspberry Pi Zero, evolving into a more advanced compile-only Forth dialect with roughly 70 primitives, about 15 of them I/O-related. The work matters as a compact demonstration of Forth's reflective, bootstrapping nature, which the author illustrates by citing implementations like sectorforth and milliForth that build a full Forth from about 10 assembly primitives in under 512 bytes. What to watch next is whether the prototype gains the missing stack manipulation words and standard compliance, or remains a teaching vehicle for the author's personal bare-metal Forth environment.

Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.

Named in this story

Forth, JavaScript, ARM, p5js