If you love HP-RPN calculators, you may love Forth as well.
Forth is a very interesting language, I find it a bit too complex for my little brain but give it a spin if, you have 2 free hours
It's not complex, it is just that it requires a different mental model because of the lack of named parameters. Stack offsets are harder to remember than things with names, more so because they change all the time as you push and pull data.
That’s because Gforth is a threaded-code VM that saves dictionary images rather than compiling to native code.
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.
The standard library is lacking some really nice conveniences. I'm working on correcting this and teaching Forth as a "grassroots" language for people who want to go back to the joy of programming as an art. The 100rabbits folks have already done a lot of work around proliferating that idea but I want to work outside of the Uxn machine that they use. Mark my words, us programmers are not phased by AI stealing the joy of programming :) The day job business programming, sure. But that was only fun sometimes. Forth will continue to exercise our brains and work through logic and data flow problems - skills we can bring to guiding agents for the day job.
Have you considered factor? Its from the joy-inspired branch of the forth/concatenative family, but its a heavily underrated, batteries included language. Which has a bit of a smalltalk feel given its image-based deployment and the "live" nature of its tools (graphical repl, object inspectors, etc)
I just did a big project using Forth and it is every bit as useful as it was in the past. Yes, there no security model, and you're going to have to work to manage your project, no fancy IDE or editor. I took a piece of code I wrote in 1988 and built it out to pass the Forth standard core words test and some extensions as well, then added all of the Raspberry Pi io devices as primitives. This makes it a super useful little toolkit (6K loc, 0 dependencies) to build embedded systems with in the robotics space.
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.
Hendrikto | 21 hours 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.
daitangio | 19 hours ago
mitxela | 13 hours ago
jnpnj | 12 hours ago
jacquesm | 6 hours ago
jacquesm | 6 hours ago
jan_m_savage | 20 hours ago
anta40 | 18 hours 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
?
jan_m_savage | 18 hours 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.
nickcw | 17 hours 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.
lebuffon | 14 hours ago
iberator | 14 hours 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
fallat | 13 hours ago
isr | 13 hours ago
jacquesm | 6 hours 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.
stephen_cagle | 6 hours ago
jacquesm | 6 hours ago
And what I meant was I want the actual hardware. I may have to make it myself.