r/Forth • u/katybassist • Jun 20 '25
Found it!
Just had to go digging in the storage boxes!
r/Forth • u/katybassist • Jun 20 '25
Just had to go digging in the storage boxes!
r/Forth • u/[deleted] • Nov 25 '25
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 • u/mykesx • Feb 18 '26
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.
r/Forth • u/anditwould • Sep 05 '25
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 • u/anditwould • Feb 05 '26
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 • u/ripter • Mar 29 '25
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 • u/rpiguy9907 • Nov 06 '25
r/Forth • u/tieze • Apr 07 '21
r/Forth • u/mcsleepy • Dec 30 '25
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.
r/Forth • u/mcsleepy • 26d ago
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:
r/Forth • u/mykesx • Mar 31 '26
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?
To experiment with pthread multithreading
To enable graphics programming in Forth
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 • u/markroth8 • Nov 19 '24
r/Forth • u/DooFomDum • Dec 06 '18
r/Forth • u/ripter • Jun 24 '26
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 • u/rickcarlino • Oct 19 '21