Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 23 Forth Open-Source Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
lbForth
Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
cc64
cc64 is a small-C compiler written in Forth, hosted on the Commodore C64, Plus4 and C16 with 64k, and on the Commander X16. It is targeting the 6502 CPU.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
While not quite a Forth, Kitten is a stack language:
https://kittenlang.org/
Project mention: Show HN: TinyWasm – A tiny WebAssembly Runtime written in Rust | news.ycombinator.com | 2024-03-07Super nice project! I also spent the last month writing a WASM interpreter ( https://github.com/rrampage/wart ) using Java 21. I started it as an excuse to try out the pattern matching in switch / sealed classes in Java. It kind of snowballed in scope and can now run Doom and Waforth ( https://github.com/remko/waforth )! Have not yet tried compiling it to WASM and running it as a meta-circular interpreter.
Project mention: I'm wondering why so few forth microcontoller tutorials are out there? | /r/Forth | 2023-05-10Thanks, GitHub URL: https://github.com/TG9541/stm8ef
Project mention: Uiua: A minimal stack-based, array-based language | news.ycombinator.com | 2023-09-27Reminds me a bit of Cognate(https://github.com/cognate-lang/cognate/blob/master/INTRODUC...)
Think I would like Uiua more if it require a space between terms. It wouldn’t be quite as tacit but it would be easier to read and more flexible — you could multi-symbol operators.
Project mention: Berry is a ultra-lightweight dynamically typed embedded scripting language | news.ycombinator.com | 2023-10-07microcontroller options are interesting, also Forths (https://github.com/tabemann/zeptoforth)
Not that I've ever seen personally. They mostly exist as extensions in various places. Gforth has one, for example.
> I would love a Forth with a type system. I don't know if that is heretical [...].
Mitch Bradley (of Open Firmware fame) thinks it’s old hat[1], so guess not. (He also thinks it won’t work though.) In general, people have tried a lot of times; there’s a number of postfix Lisps with type systems—Kitten mentioned elsethread, ActorForth[2], etc.; a low-level Forth, as in untyped cells on stack and no automatic memory management, I don’t think has been done to completeness (IIRC either Forth, Inc. or MPE have a standing offer for any that’s able to process their legacy code), but then C wouldn’t be complete by that standard either (and Rust far too limiting).
Honestly I’m not sure how well it would work—in C, you get a great deal of utility out of compound types, and classic cell-oriented Forth kind of sucks at even mildly complex datastructures—they are certainly possible, but being unable to manipulate them as values on the stack makes things quite unnatural. (And that’s where I draw the line of “postfix Lisps” like PostScript rather than Forths, as such manipulation doesn’t seem feasible without some sort of automatic memory management.)
[1] https://github.com/ForthHub/discussion/issues/79
[2] https://github.com/ActorForth/ActorForth
Project mention: The ancient world before computers had stacks or heaps | news.ycombinator.com | 2024-04-03I wrote a Forth interpreter for a SUBLEQ machine (https://github.com/howerj/subleq), and for a bit-serial machine (https://github.com/howerj/bit-serial), both of which do not have a function call stack which is a requirement of Forth. SUBLEQ also does not allow indirect loading and stores as well and requires self-modifying code to do anything non-trivial. The approach I took for both machines was to build a virtual machine that could do those things, along with cooperative multithreading. The heap, if required, is written in Forth, along with a floating point word-set (various MCUs not having instructions for floating point numbers is still fairly common, and can be implemented as calls to software functions that implement them instead).
I would imagine that other compilers took a similar approach which wasn't mentioned.
Forth related posts
-
Celebrating Star Wars Day with some Forth code May the Forth be with you
-
The ancient world before computers had stacks or heaps
-
Zenv: Forth for the ZX Spectrum
-
Show HN: TinyWasm – A tiny WebAssembly Runtime written in Rust
-
Konilo: A personal computing system in Forth
-
Show HN: Writing a simple FORTH-like system, in simple steps
-
The Enchippening
-
A note from our sponsor - InfluxDB
www.influxdata.com | 10 May 2024
Index
What are some of the best open-source Forth projects? This list will help you:
Project | Stars | |
---|---|---|
1 | PumpkinDB | 1,366 |
2 | kitten | 1,074 |
3 | b1fipl | 985 |
4 | pforth | 563 |
5 | Mako | 555 |
6 | waforth | 456 |
7 | lbForth | 408 |
8 | zForth | 336 |
9 | forth-cpu | 315 |
10 | stm8ef | 308 |
11 | swapforth | 271 |
12 | zkeme80 | 224 |
13 | durexforth | 222 |
14 | cognate | 204 |
15 | libforth | 175 |
16 | zeptoforth | 156 |
17 | gforth | 141 |
18 | starflight-reverse | 123 |
19 | r4 | 123 |
20 | miniforth | 116 |
21 | discussion | 115 |
22 | bit-serial | 110 |
23 | cc64 | 93 |
Sponsored