All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Building Forge: A Forth-inspired stack-based language for generating HTML websites

By

speckx

9d ago· 2 min readenInsight

Summary

The article describes the creation of "Forge," a Forth-inspired stack-based programming language designed for writing HTML websites. The author explains the motivation behind building a concatenative, stack-oriented language that allows developers to define words (functions) that emit HTML tags, making website generation feel like programming in Forth. The article includes code examples showing how to define HTML elements and use microformats with this approach.

Key quotes

· 3 pulled
I don't remember where the idea came from, but I decided that it would be cool if I could write websites using a stack-based language.
So I wrote Forge.
I quickly built a library of word definitions that let me easily add microformats to the HTML
Snippet from the RSS feed
I don't remember where the idea came from, but I decided that it would be cool if I could write websites using a stack-based language. Something like this: : h1 ( s -- ) "

" emit . "

" em…

You might also wanna read