Gforth 1.0
Posted by joshcsimmons 2 days ago
Comments
Comment by Hendrikto 2 days ago
> [Gforth is] a free, fast, featureful and portable implementation of the Forth 2012 language.
> Gforth runs under GNU, BSD, and similar systems, MS Windows and MacOS X and should not be hard to port to other systems supported by GCC.
Comment by daitangio 2 days ago
Comment by jacquesm 1 day ago
Comment by MaxBarraclough 1 day ago
In Forth's defence, other languages also have tricky subtleties, e.g. C++. Neither language prioritises theoretical purity, of course. They would be very different languages, with different drawbacks and advantages, if they did.
Both papers touch on whether the behaviours of certain unusual Forth constructs are well-defined according to the ANS Forth language standard. This sort of discussion should be quite familiar to C++ programmers.
[0] State-smartness - Why it is Evil and How to Exorcise it (Ertl, 1998) http://www.euroforth.org/ef98/ertl98.pdf
[1] State-smartness: Applications, Pitfalls, Alternatives (Ertl, 2001) https://www.complang.tuwien.ac.at/papers/ertl01state.pdf
Comment by jacquesm 1 day ago
Comment by mitxela 1 day ago
Comment by jnpnj 1 day ago
Comment by sramsay 1 day ago
Comment by jacquesm 1 day ago
Comment by fallat 1 day ago
Comment by vanderZwan 1 day ago
https://benbridle.com/projects/bedrock
In particular the reasoning for what he changed compared to Uxn might be insightful:
Comment by MaxBarraclough 1 day ago
We will also compile them, and reference their execution tokens from the dictionary.
Comment by fallat 1 day ago
Comment by isr 1 day ago
Comment by MaxBarraclough 1 day ago
fallat said they were interested in teaching a 'grassroots' language. By that I think they mean something with a minimal core language and compact interpreter, so Forth seems like the better fit.
Comment by fallat 1 day ago
Comment by jacquesm 1 day ago
I did consider using Gforth and another one that Don Hopkins pointed me to but I the end the familiarity with my own code won out over first reading myself into a large project. It all worked pretty well, the device I built with it is performing way beyond my expectations and I'm really happy I chose Forth even though it is a choice that I think only very few people would have made because it feels so old-fashioned. What especially pleased me is the lack of superstructure and the ease with which the whole thing could be moved between machines of varying word-size and underlying CPU architecture.
Forth still has a place. Now I need to get my grubby hands on some GA 144s.
Comment by stephen_cagle 1 day ago
Comment by jacquesm 1 day ago
And what I meant was I want the actual hardware. I may have to make it myself.
Comment by anta40 2 days ago
BTW, on the other side, looks like gforth still lacks the ability to create native OS executable, something like:
gcc myprog.c -o myprog
?
Comment by nickcw 2 days ago
https://github.com/ncw/ccforth
I wrote it as an experiment in having both a forth interpreter and compiler running at the same time.
Comment by lebuffon 1 day ago
Comment by jan_m_savage 2 days ago
As you prolly know, Forth blurs compile time and run time in general, and there’s no so-called clean compile, then link boundary like in C.
SwiftForth, VFX Forth, and iForth do emit real executables, and there are smaller native-code Forths for Linux too, but then the opportunity cost is losing Gforth’s portability and its standards-heavy library ecosystem.
Comment by MaxBarraclough 1 day ago
That's not correct. Gforth features a JIT compiler, although they don't call it that, they call it dynamic superinstructions. It will be enabled if you run gforth-fast. If I understand correctly, the native code sequences are always generated at runtime, and cannot be baked into an image file.
• Dynamic Superinstructions https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Dyn...
• [PDF] Code-Copying Compilation in Production An Experience Report (2025) http://www.euroforth.org/ef25/papers/ertl.pdf
Comment by jan_m_savage 13 hours ago
Comment by jan_m_savage 2 days ago
Comment by iberator 1 day ago
Forth can have comments and doesn't need to be all at one line:)
also labels works as functions etc.
Its way more tradable language in real life than people think