Forge: The Experimental Stack-Based Language Bringing Forth Logic to the Modern Web

Table of Contents
A Departure from Traditional Web Frameworks
In an era dominated by massive JavaScript frameworks and complex build pipelines, a new experimental project called Forge is attempting to strip web development back to its most fundamental logic. Developed by a musician and software engineer with a background in climate science, Forge is a stack-based language inspired by Forth, designed specifically for the construction of websites.
Unlike traditional HTML or the template engines used by modern CMS platforms, Forge operates on a stack-oriented paradigm. In this system, data is pushed onto a stack and manipulated by “words”—predefined functions that execute specific actions. For example, instead of writing a standard HTML tag, a developer defines a word like h1 to handle the opening and closing tags, allowing the content to be passed and emitted through the stack. This approach transforms the act of page layout into a series of logical operations, offering a level of conciseness and regularity that is rare in modern frontend development.
The Architecture: Blending SSR and SPA
The technical implementation of Forge is where the project moves from a curiosity to a viable architectural experiment. The system utilizes a single binary that manages the website’s pages, library of words, and stylesheets. At its core is a WebAssembly (Wasm) compiler that generates HTML from .forge files.
Forge employs a hybrid rendering strategy to satisfy both search engines and users. When a crawler or a tool like WebMentions requests a page, the compiler runs on the backend, delivering static HTML in the source code. However, for a human visitor navigating the site, a service worker intercepts the network request. It fetches the original .forge source and executes the compiler directly within the browser.
This dual-layer approach effectively grants the site the SEO benefits of server-side rendering (SSR) while providing the instantaneous, fluid experience of a Single Page Application (SPA). By shifting the compilation process to the client via Wasm, Forge minimizes server load while maintaining a high degree of interactivity.
State Management and the Append-Only Log
Beyond layout, Forge introduces a distinct philosophy toward data persistence. Rather than relying on heavy relational databases for simple interactions, the language allows developers to persist data to local storage or a server-side append-only log.
The project demonstrates this through a simple “like” button implementation. When a user triggers a do-like command, the system appends a value to a specific topic in the backend log. This log is stored as JSONL (JSON Lines), where each interaction is a single JSON document per line. This lean approach to state management removes the overhead typical of REST APIs or GraphQL endpoints, treating user interactions as a stream of events rather than complex database queries.
The Appeal of Constraints
For the creator, the primary draw of Forge is its inherent limitation. By restricting the way developers can build pages, the language forces a level of discipline and regularity. This structural consistency makes the code surprisingly legible and, as noted by the developer, highly conducive to LLM-assisted generation. Because the language is so regular, AI models can more easily translate formats like Markdown into Forge syntax without the “hallucinations” or syntax errors common in more verbose languages.
While Forge is currently an exploration of ideas rather than a commercial product, it shares a spiritual connection with existing niche tools, such as the HTML library found in the Factor programming language. For developers weary of the “dependency hell” of the modern web, Forge offers a provocative glimpse into a more minimalist, logic-driven future for the internet.