r/Forth • • Jun 20 '25

Found it!

Post image
123 Upvotes

Just had to go digging in the storage boxes!


r/Forth • • Nov 25 '25

M5CardForth!

Post image
110 Upvotes

Thanks to u/amca for pointing me at this for the M5stack Cardputer v.1.1 - I'm new to microcontroller everything (and to Forth) but it's running! Time for more Brodie. :)


r/Forth • • Feb 18 '26

Inspiration running on a Linux laptop.

Post image
94 Upvotes

I had a vision of a Forth environment that is both a Graphical desktop with Forth built in for making applications.

Not a line of AI went into this.

The desktop is written in C++, but it provides Forth words to create Screens and Windows, render text and graphics, etc. The repository is about 50% each C++/Forth.

The Forth kernel is written in C++ for portability. It implements much of the 2012 standard, plus several vocabularies for graphics, networking, strings, vectors, maps, etc.

The Forth is mulithreaded as well. You can see 4 Windows in the photo, each a separate pthread. The dictionary is shared.

The desktop uses SDL2.

What you are seeing is Inspiration running on an x64 laptop under CachyOS.

The Phred editor is a lightweight VIM clone written in Forth. The File Manager is written in Forth and demonstrats mixing text with graphics (the white lines are rendered on top of the text console.

The Forth Thread window is running the traditional Forth prmpt (you can have as many Windows/prompts as you want).

The Rects as fast as possible window is a tight Forth begin/again loop rendering random sized and colored rectangles.

https://gitlab.com/mschwartz/inspiration


r/Forth • • Sep 05 '25

I did a presentation on a FORTH I've build during a local 48 hour hackathon last week

Thumbnail
gallery
94 Upvotes

This was my first time building a real Forth. I’ve named it lightforth, because the theme of the event was "light". The implementation is largely complete, though some features, such as a string library, block storage, etc. was not implemented due to time constraints.

The kernel is written in C, and the rest (as is typical) was implemented in lightforth itself. It is based on the ANSI Forth ’79 standard.


r/Forth • • Feb 05 '26

I wrote a Forth OS and a game for it for a hackathon last week

Thumbnail
gallery
80 Upvotes

A subroutine threaded code Forth for the x86 that boots from usb/hdd.

The dictionary has most of the core words. A crude preliminary assembler. Block subsystem for loading in code at runtime. And a graphics subsystem for drawing tiles to the screen.

The game is a not yet functional virtual pet bird simulator.

Design wise I desire to go back and refactor everything... but I guess good enough is good enough within the constrains of 36 hrs we had.

This is my 2nd ever "real" forth I've wrote, and I'm still learning a lot. I think I'm starting to "get it" though. Forth never really made much sense to me coming from a higher level language. But when you gotta bootstrap everything from the ground up, it's so small yet powerful and awesome :)

You totally can be productive in Forth! Debugging is immediate and interactive. When you can test every word as you write them, things can come together very quickly!

What I gathered from this experience... seems like every major pro of Forth is also its con.

Pro: Forth lets you do anything.

Con: Forth lets you do anything.

Pro: You create your own solutions by producing your own libraries.

Con: You create your own solutions by producing your own libraries.

etc.

Honestly, I cannot imagine Forth being used outside of "power users". It relies heavily upon the discipline of programmers. It does not tolerate sloppiness at all. I think I fried my brain because I immediately got an insane flu after the event ended. 🤧


r/Forth • • Mar 29 '25

AI scam Forth book.

Thumbnail
gallery
78 Upvotes

Robert Johnson and this “publisher,” HiTex Press, is an AI-generated scam. It was recommended to me when buying real Forth books, and I didn’t think to look him up before buying. Avoid.


r/Forth • • 18d ago

Gforth 1.0 released

Thumbnail gforth.org
76 Upvotes

r/Forth • • Nov 06 '25

I told the store owner they should be in two stacks not an array

Post image
76 Upvotes

r/Forth • • Apr 07 '21

Forth on GBA progress, initial lib support: sprite handling, key presses, game loop

Thumbnail
youtube.com
73 Upvotes

r/Forth • • Feb 26 '26

My baremetal computer v2

Thumbnail gallery
65 Upvotes

r/Forth • • Jul 28 '26

XKCD 3277: Forth

Thumbnail
xkcd.com
64 Upvotes

r/Forth • • Dec 30 '25

GUI development in Forth - visual node editor progress

62 Upvotes

This represents one week's work, doesn't really have a name yet, though the colorful circular nodes are called Micros and the work tree is called Sandbox. I'm working on this on the side while also working on my games. Building on my own custom OOP system called NIBS now that it's stable enough has greatly accelerated my work. The way it is architected might not be to everybody on here's taste - it is very liberal with memory use and doesn't try to be as terse as possible, but I like to use Forth mainly to bypass the excessive ceremony of other languages and do compile-time magic and lots of reflection. Also the compile times and performance remaining outstanding, despite all the magic happening behind the scenes.

Github: https://github.com/rogerlevy/vfxland5-sandbox


r/Forth • • 26d ago

My latest game written in Forth is coming out on Friday.

Thumbnail
gallery
60 Upvotes

Hi everybody,

I've been very busy working on my game engine SUPERSHOW and a spooky little flagship platformer called Untitled KVN Game.

The genre of it is a mixture of horror, roguelite, and action-puzzle-platformer and it takes influence from various beloved games of mine including Super Mario Bros 2, Prince of Persia, and even Dark Souls.

A Russian artist I teamed up with on Discord conceived it and did the art and music, and an audio-engineer-musician friend from Baltimore did the sound effects.

I thought that SUPERSHOW was going to be released by now, but this game, originally meant to be a simple "demo" game, turned into something more serious than expected and I decided to dive right into attempting to go into business for myself as an indie developer, delaying SUPERSHOW's release. All the better - 1.0 will be more polished when it does release, probably sometime around mid-December. I think it's going to be something special that people will have fun with.

SPUNK, the same room-based framework as the one used in its spiritual prequel, KVN, is reused (updated for the latest engine). UKG also shows off a few technical advancements, including a brand spanking new physics-modelled CRT filter and advanced platformer physics. In addition, all of the maps were created with a proprietary level editor.

Here is a link to the pre-announce on itch.io:

https://inkajoo.itch.io/untitled-kvn-game/devlog/1717552/my-spooky-indie-game-releases-on-friday

Gameplay videos:

https://www.youtube.com/@cardboard-tv-games


r/Forth • • Mar 31 '26

Inspiration Forth Update

Thumbnail
gallery
58 Upvotes

It's been a while since I posted about my progress.

To begin with, I started this last October and have been working on it most days. It contains ZERO lines of AI generated code, ZERO vibe coding. I don't think any of that is any fun at all.

The Forth is written in C++ and is a combo of ITC and STC. The DOCOLON word iterates an array of C++ functions and just calls them. One of those functions might be DOCOLON to call another word written in Forth. The C++ functions look a lot like JonesForth style:

CODEWORD(ADD) { TOS += dpop(); }

TOS is a C++ variable, but it's a thread local one - it looks like a global variable but is unique per thread. Most of the USER type variables (BASE, etc.) are thread local. Each thread has its own thread local return, data, and floating point stacks. The CPU return stack is only used for calling C++ functions and nothing more.

All this allows Inspiration to be multithreaded using pthreads. As you can see in the screenshots, there are multiple windows, each running a pthread running Forth. The threads share the one and only dictionary.

C++ has try/catch/throw exceptions and these allow me to fix up the CPU stack without resorting to assembly language. In fact, I can install *nix signal() handlers and throw exceptions from those and catch them - see the 3rd screenshot. Ideally, there is no way to crash Inspiration unless the dictionary is overwritten with garbage.

Inspiration Forth supports word lists and vocabularies. As well, there's a C++ vocabulary that provides Forth with words to manage std::string, std::vector, std::map, regexes, and more. Conversions between strings:

s" my string" CString.new ( caddr , address of a std::string)

cstring CString.string ( caddr u , gets address, length of string forth style)

The desktop, you see is rendered with C++ code. Display, Screen, Windows, Icons, Gadgets. But for the most part, the code is pure Forth (more than half the repo at this point). The apps being displayed are pure Forth (with maybe CStrings and the rest).

The editor is a significant clone of vim, written in Forth. I've been adding keybindings so it can act like MicroEmacs as well.

Why a desktop environment?

  1. To experiment with pthread multithreading

  2. To enable graphics programming in Forth

  3. A Forth running in an OS window needs to differentiate itself from (BETTER!) Forth implementations like gForth and VFX Forth (sorry if I didn't mention any other worthy ones)

The repo is at https://gitlab.com/mschwartz/inspiration

If you want to see how nice local variables work, see the ls.4th file in the repo (a standalone ls "clone" written in forth).


r/Forth • • Mar 14 '25

Debugging Forth Code in My Spacecraft Simulator

Post image
57 Upvotes

r/Forth • • Oct 21 '22

C Compiler Written in Forth

Thumbnail git.sr.ht
57 Upvotes

r/Forth • • Nov 19 '24

We Just Open Sourced the original FORTH Source Code for ChipWits (Mac + C64) in celebration of its 40th Anniversary! What should we do now? (Seriously, we'd love your help, FORTH experts)

Thumbnail
chipwits.com
55 Upvotes

r/Forth • • Jun 11 '21

Fitting a FORTH in 512 bytes

Thumbnail
niedzejkob.p4.team
54 Upvotes

r/Forth • • May 03 '21

My FORTH manual just arrived!

Post image
54 Upvotes

r/Forth • • Dec 06 '18

I'm 17 and I created a Forth interpreter and compiler for the TI-84+ calculator

Thumbnail
github.com
54 Upvotes

r/Forth • • Jul 29 '26

Loving it

Post image
53 Upvotes

r/Forth • • Jun 24 '26

Zeptoforth Rocks!

Post image
52 Upvotes

I accidentally bought a Pico 2 W instead of a Zero, so I tried Zeptoforth and it worked great. I was able to quickly get it running and even displaying on my tiny screen.


r/Forth • • Sep 07 '25

A Forth for the SNES's 65816

52 Upvotes

For the SNESDEV 2025 Game Jam I wrote a Forth for the Super Nintendo's 65816 and made a simple Sokoban-style game with it! I posted a write-up on the development process over on itch.io and wanted to share it here in case anyone finds it interesting :) The code for the Forth cross-compiler and the game are both available here, as well.

(Mods: please let me know if this kind of post isn't allowed here! I couldn't find any rule against it, but apologies if I've missed it.)

Edit: Ah, accidentally posted this via my Google-auth'd account. This is actually u/acedio :)


r/Forth • • Oct 19 '21

FORTH microcomputer I built in the '80s, based on the Rockwell R65F11 (modified 6502)

Post image
52 Upvotes