r/Forth • u/tuxxwavve • 1h ago
Analytics
I’m using this thread to share analytics about the sub with all of you.
The data suggests what kind of topics are popular, and what kind of views you can expect if you start a thread.
The goal for a moderator should be to grow the community, which means getting more people into Forth!
Why Forth? What is it?
In order to help get people interested in Forth and how it works, I would like to ask you what you define as Forth, how you got into it, and why Forth instead of some other language?
Ideally we share links to our projects and to others that are interesting. Also to sites, sources, and documents about Forth.
I am encouraging links to your projects so people can see how you are using Forth.
8th 26.06 released
Lots of goodies, including html improvements and high-level "data science" words.
Full details on the forum
r/Forth • u/tabemann • 2d ago
zeptoforth 1.17.0 has been released
You can get this release from https://github.com/tabemann/zeptoforth/releases/tag/v1.17.0.
This release:
- adds support for a USB Mass Storage Device class for
full_usband the newfull_msc_onlybuilds for the RP2040 and RP2350. - adds new
full_msc_onlybuilds for the RP2040 and RP2350 which incorporate USB Mass Storage Device class support but which do not incorporate a USB CDC console. - adds support for new
rp2040_big_16mibandrp2040_1core_big_16mibplatforms which combine RP2040 support with 16 MiB flash support; note that these are not compiled, aside from the kernel, in the release tarballs, so it is up to the user to build them as desired. - configures the SD card on the PicoCalc to be exposed as a USB Mass Storage Device class.
- speeds up communication with SD cards.
Note that, aside from on the PicoCalc, the USB Mass Storage Device class must be manually configured in order to be used, per the directions in README.md.
r/Forth • u/Imaginary-Deer4185 • 4d ago
CREATE DOES> (again ...)
Can anyone provide some interesting examples of what to do with these, beyond the default "constant" and "array" examples?
The current version of my (bytecode) Forth compiler has CREATE but not DOES>, and I haven't missed it either.
r/Forth • u/rayden_devv • 4d ago
Rdn programming language
I made a small and simple post fix interpreted programming language called rdn, it's familiar to forth developers and developers who use Lua as a scripting language for their systems, rdn merge both of them, you can use it for writing scripts or for configurations or even query language
It's written in C and it provides a simple and friendly API for the developers
I would be happy to have you participate in this project
This is the GitHub repo: https://github.com/abdorayden/rdn
Thank you
r/Forth • u/tabemann • 7d ago
USB Mass Storage Device support has been merged into zeptoforth
I do not have time tonight to make a new release, but USB Mass Storage Device support has been merged into zeptoforth master.
I suggest you try this out, and let me know if you have any issues.
One thing to remember is that one should not change anything that the PC side sees from the zeptoforth side while the USB Mass Storage Device is mounted on one's PC, and likewise one should not delete any files or directories open in zeptoforth from one's PC. Also, zeptoforth is likely to not see changes made on one's PC without executing sync or equivalent first.
If one must modify or delete files or directories that may be open in zeptoforth from one's PC, I highly suggest executing fat32-tools::ensure-safe-fs ( -- ) first; this will block until all files and directories other than the current directory on the current filesystem are closed in zeptoforth, and it will reset the current directory of the current filesystem to its root directory as that cannot be deleted.
A new set of builds have been created, full_msc_only, which incorporate USB Mass Storage Device support but where the USB CDC console is disabled. These are now the basis of building zeptoforth for the PicoCalc.
In full_usb builds both the USB CDC console and USB Mass Storage Device support are now enabled.
Note that when one uses a build in which USB Mass Storage Device support is enabled one needs to call usb::set-usb-blocks ( device -- ) on the underlying block device (not filesystem) that one wants to expose via the USB Mass Storage Device. After one calls this changing it without rebooting is not recommended.
If one intends on, say, permanently selecting a FAT32 filesystem in on-board flash for the USB Mass Storage Device, I suggest, after loading extra/common/setup_blocks_fat32.fs, executing:
compile-to-flash
setup-blocks-fat32 import
simple-blocks-fat32::simple-blocks-fat32-internal import
: init-usb-blocks
my-fs simple-blocks-fat32-dev usb::set-usb-blocks
;
initializer init-usb-blocks
reboot
On the PicoCalc, though, support is now built-in to expose the SD card in the PicoCalc via the USB Mass Storage Device without any work on the part of the user.
It should be noted, however, that SD cards are relatively slow when used by zeptoforth even with the important optimization that has been made to them since last release. When connecting one's PicoCalc to one's PC expect there to be a delay before one can mount the USB Mass Storage Device, and another delay the first time one tries to list a directory on it.
TinyRobot,éviteur d'obstacle , dans un cercle
Enable HLS to view with audio, or disable this notification
r/Forth • u/Lanstrider • 8d ago
Aiki - forth inspired language is alpha 3
Alpha 3 of Aiki is out, an experimental programming language.
After spending time exploring Forth over the past year, I started working on a grammar-driven language that draws inspiration from Forth’s small kernel and compact surface.
Aiki keeps that surface intentionally small: 14 keywords, 7 basic types, 11 operators, 3 primitives, and a 36-name prelude. Expressions evaluate strictly left-to-right, lists are fundamental, and most additional capability, including files, strings, math, regex, hashing, bytes, time, canvas, testing, and so on, lives in Aiki libraries rather than being absorbed into the language core.
The runtime is also deliberately observable. Semantic work can be profiled separately from its realization: exact numeric representations, calls, argument frames, environment reuse, FFI boundaries, and other execution machinery remain visible rather than disappearing behind the implementation.
I’ve been using Aiki for increasingly low-level experiments as well, including a monitorable PDP-11/40 reconstruction, so the design has had to survive real state-machine and systems work rather than just language demos.
The language is quite different from forth, but it came about because of my contact with forth.
Alpha 3 announcement:
https://decuser.github.io/posts/aiki-alpha-3-release/
Repository:
https://github.com/decuser/aiki
r/Forth • u/SaileRCapnap • 11d ago
YouTube?
So, we’re to grow the community right? Forth is great, and I’m probably not too much of a minority here to say I think it’s the best language programming wise! I have a few questions though: are there any current Forth YouTubers I can follow and recommend (I haven’t found any yet), and why types of things would you want to see out of a Forth based CS channel?
r/Forth • u/Disastrous_Farmer793 • 11d ago
I made an Forth Compiler + wayland terminal with forth
I was planning to make a wayland compositor with forth too but i dont have time to do that anyways
COLON and WindowForth is released:
https://gitlab.com/generatrix-linux/forthress-ecosystem
COLON is a terminal fully written on Forth (even kbd and other thingies)
WindowForth is a special Forth compiler written on C
WindowForth uses a hybird syntax (its mixed between OLD and new syntax)
it uses .fth as file extension instead of .fs
also some photos from colon:




--edit--
added config file's photo
Thanks for reviewing and looking at my project have a good day also sorry for bad english if i made a grammar mistake!
r/Forth • u/Comprehensive_Chip49 • 11d ago
VIDEO coding in r3forth - monofutbol 2
youtu.ber/Forth • u/tabemann • 13d ago
Recent zeptoforth improvements recommended for trying out USB Mass Storage Device support
These changes are not yet in a release, as I am waiting until USB Mass Storage Device support is in zeptoforth before making another release, but there are a number of recommended updates already in the master and devel branches that you will probably want, especially if you are trying out the USB Mass Storage Device support.
These changes are:
- a performance boost for SD cards
- automatic fixing of VBR's for FAT32 filesystems in on-board flash (needed so Linux and Windows can properly recognize them when mounted over USB)
- increased data integrity for FAT32 filesystems accessed via USB Mass Storage Devices (don't delete files or directories open on one side from the other side, bad things will still happen, but the free cluster count and most recent allocated cluster won't be corrupted if you allocate or free clusters on both sides without rebooting zeptoforth)
- while long file names are still not supported by zeptoforth, directories containing dangling long file names can be deleted now, and if you delete a file or directory with a long file name in zeptoforth the long file name will be deleted as well
As for the USB Mass Storage Device support, the code is at https://github.com/y-salnikov/Zeptoforth-Mass-Storage-Device . If you have tried this out before, you should try it out again, as significant changes have been made, e.g. fixing ejecting the USB Mass Storage Device (mind you, now it may show up again as soon as you eject it).
r/Forth • u/sophiaxus • 13d ago
My WIP Forth in C
Hi all! I'd really like to finish a little forth system of my own (in C) to have use as both a learning tool and for some personal tooling. Since I still consider myself both a Forth and a C novice, I've tinkering around with this implementation on and off for some time, and have learned quite a lot from it. On a flight recently I decided to clean it up in a way that's a little easier for me to digest and think my way around, and at the moment have this. It's neither finished nor perfect, but I was hoping to maybe start posting here for feedback and possible motivation to finally finish something I feel good enough about.
Is this a place I can post incremental progress to get feedback and such? If so, while I have plenty of questions right off the bat, I'd first like to make sure my code is readable for anyone willing to take the time to check it out. Any thoughts in that regard are ofc welcome, as well as any tips on how to post progress or for advice in the future..
What I did to the original simpleforth was separate it out into little modules. Those modules are currently:
- Dictionary - for dictionary stuff
- IO - for io stuff
- Interpreter - anything relevant to interpreting, eg is_number etc.. though I haven't been able to successfully separate the core interpreter from the VM
- VM - anything data or return stack related.. NEXT() uses goto and some subroutine stuff.. pretty sure it's considered a directly-threaded vm? I am not currently able to separate out the inner interpret function from the VM, so the module separation is still sort of messy. I'm also a little distracted with the semantics between whether to call things opcodes or bytecodes etc and whether to call things XT or CFA.. not really a big deal though.
Anyway, not everything is implemented and it certainly needs more cleaning up. Just wanted to make a post here for initial impressions before I got too distracted with life again. Would really like to get this thing going!
Thank you all!
r/Forth • u/sohang-3112 • 14d ago
VIDEO Interactive, literate Forth in the browser: IForth (Jupyter Notebook support for Forth)
youtu.beInstead of the usual cycle of editing Forth code files, reloading the whole source, and testing words by hand, IForth brings a literate notebook workflow to your Forth environment.
Think of it as a living document where you interleave runnable Forth definitions, markdown explanations, and test cases block-by-block. You can modify single words and re-run only the relevant cells without blowing away or manually reconstructing your current session state. It makes exploratory prototyping, testing dictionary words, and writing interactive tutorials much smoother.
Andrew McKewan demoed this workflow at the recent SV-FIG meetup (video attached), showing how he uses it to build and explore Forth code interactively.
Details & Constraints:
* Interpreter: Wraps Gforth interpreter internally.
* Platform: Linux only (Windows users will need WSL).
* Setup: Instructions are in the repo: https://github.com/sohang3112/iforth
Check out the demo video attached. Feedback, issues, and PRs are very welcome!
PS: I usually work with Python. I am a novice at Forth, started working on IForth while learning Forth.
r/Forth • u/Comprehensive_Chip49 • 15d ago
VIDEO How the heck do you code in r3forth?
youtube.comWiki
reddit.comWe have a wiki for r/forth. It was started 9 years ago, not sure if that’s the latest edit.
If anyone reviews the wiki and has edits, I’m happy to make them if you can’t.
Robot à direction aléatoire utilisant un capteur ultrason avec ZeptoForth.
Enable HLS to view with audio, or disable this notification
r/Forth • u/Individual_Mind2998 • 17d ago
Built a small Forth-inspired language in Rust (not ANS-compliant, feedback welcome)
Not trying to claim this is "real" Forth — no return stack yet, no IMMEDIATE/POSTPONE, no ANS compliance. It's a personal project called gnaw, concatenative in the Forth tradition, built from scratch in Rust as a learning exercise.
What's there: a data stack, byte-addressable memory (@ ! alloc here), : name ... ; definitions, if/else/then and begin/until compiling to jumps in a small bytecode VM with a program counter. The one non-traditional addition: built-in words for CTF-style byte transforms (hex to bytes, repeating-key XOR, ROT13, Base64).
Source: https://github.com/warlyjr-cloud/gnaw
Genuinely curious what this community would flag as missing from a "real Forth" perspective — return stack semantics, proper immediate words, anything. First time building something Forth-adjacent from scratch.
r/Forth • u/EvilxFish • 19d ago
Copying from 1 word list to another in Gforth
Hi all I was wondering if I could get some suggestions please on how to solve the following problem:
I am redefining certain standard words in gforth in a separate word list, lets call it "mynewdefs" for example +, -, rot, drop etc will all be redefined. Why I am doing this isn't relevant but would be happy to explain if anyone is curious. For each word in "mynewdefs" and only the words in "mynewdefs" I would like to create a wordlist called "ogdefs" which has the original definitions of the words from the Forth wordlist.
I have one or two ideas about how to approach it but the stuff I can think of is a tad... inelegant. I was wondering if anyone knew an easy way to accomplish this in gforth I may have overlooked. Thanks!
r/Forth • u/unohdin-nimeni • 20d ago
A proper word spotted in a natural language context: *, actually pronounced zaar
Case sensitivity
I haven't used a case sensitive Forth, but I think about the ramifications. My thoughts are:
- visually, IF stands out more than if
- Rect.area seems like a variable name while Rect.Area seems like a function call
- Rect seems like a structure name while rect seems like a variable name
- Everything with the CAPS LOCK key on?
Can make it opt in like icase on/icase off
Syntax highlighting could key on case
