Forge: A New Stack-Based Language Bringing Concatenative Logic to the Web

Table of Contents
A Departure from Modern Web Frameworks
In an era dominated by heavy JavaScript frameworks and complex build pipelines, software engineer and musician Evan Hahn is experimenting with a fundamentally different approach to the web. Hahn has introduced Forge, a new programming language inspired by Forth—a stack-based, concatenative language developed in the 1970s—specifically designed for building websites.
While most modern web development relies on a tree-like DOM structure and imperative or declarative logic, Forge utilizes a stack. In a concatenative language, functions (referred to in Forth as ‘words’) manipulate a data stack, pushing and popping values to achieve results. For the uninitiated, this looks alien compared to HTML or React, but for developers seeking extreme minimalism and control, it offers a streamlined way to handle layout and logic.
The Architecture of a .forge Site
Forge is not merely a templating engine; it is a full-fledged environment. A typical project is organized simply, consisting of a library of word definitions (lib.forge), a CSS stylesheet, and individual page files. This structure eliminates the need for the sprawling node_modules directories common in contemporary web projects.
The real technical heavy lifting happens within a single binary. Forge employs a WebAssembly (WASM) compiler that transforms .forge files into HTML. The system implements a hybrid rendering strategy to balance SEO and user experience. When a crawler or a first-time visitor hits a page, the compiler runs on the backend, delivering raw HTML to the browser. However, subsequent navigation is handled by a service worker that intercepts requests, fetches the original .forge source, and executes the compilation directly in the browser. The result is a site that behaves like a Single Page Application (SPA) without the overhead of a massive JavaScript bundle.
Handling State and Persistence
One of the more intriguing aspects of Forge is its approach to state management. Rather than relying on complex API endpoints or heavy database integrations for simple interactions, Forge introduces a streamlined append-only log on the server.
Hahn demonstrates this through a simple ‘like’ button implementation. When a user interacts with the element, the language executes a sequence that appends a value to a specific topic in a JSONL (JSON Lines) log on the server. This architecture treats the backend as a series of append-only streams, simplifying the bridge between the client’s stack and the server’s storage.
The Appeal of Constraints
For many, the appeal of Forge lies in its strict limitations. By restricting the developer to a stack-based paradigm, the language forces a level of intentionality and modularity that is often lost in the flexibility of TypeScript or Python. Word definitions in Forge are highly reusable; a developer can define a specific microformat or a complex UI component as a ‘word’ and then call it across any page with a single identifier.
While it remains unclear if Forge is intended for wide-scale commercial adoption, it serves as a provocative experiment in digital minimalism. By combining the antiquity of Forth with the modern power of WebAssembly, Hahn has created a tool that challenges the current trajectory of web development, prioritizing elegance and architectural curiosity over the industry’s prevailing ‘feature-creep’ mentality.