4 ms·
This kind of illustrates the biggest problem with the FORTH ecosystem, in my opinion. Approximately 80% of open source development effort seems to go toward bui
by tdeck 11mo ago
This kind of illustrates the biggest problem with the FORTH ecosystem, in my opinion. Approximately 80% of open source development effort seems to go toward building new, slightly incompatible FORTH interpreters to suit the author's own tastes.
Sure, gForth still doesn't have a decent way to make HTTP requests or match a regular expression, but writing libraries like that doesn't seem to be fun for the average FORTH developer, who would rather reimplement a very barebones language environment to address the gap left by the other 1200 FORTHs.
It's not that these projects aren't cool, but if you actually want the language to become popular why not look at things every other popular language has?
- binary132 11mo agoYou seem to be presuming here that wanting FORTH to be popular even crossed the minds of the 1201 FORTH developers in question. :')
- tdeck 11mo agoAt least this author wrote the following: > So, the question is, how to encourage today's world of C programmers to take a look at Forth. How do we convince them that Forth can be 10 times more productive? So they are clearly interested in getting people to view FORTH as a productive choice.
- binary132 11mo agoI’ll amend my first comment to say 1200, then.
- ErroneousBosh 11mo ago> but if you actually want the language to become popular why not look at things every other popular language has? Because that is completely missing the point of what Forth is. It's meant to be a simple high-level language that stays quite close to the underlying machine and can be implemented in a few dozen lines of assembler to solve a specific problem you have. It doesn't need to be some massive bloated ball of mud and straw like ultra-high level languages such as C, where every aspect of the underlying machine is abstracted away in library after library.
- tdeck 11mo agoThe whole context of this article is "how can we get C programmers to understand that they would be more productive in FORTH". My thesis is that maybe the attitude of "you should be writing everything from scratch, including (often) the FORTH environment itself" might just possibly have something to do with why people aren't jumping on the FORTH productivity bandwagon. The number of C programmers whose use case is "I need to bring up this CPU with a never-before-seen instruction set" is a rounding error. The number who need to fit their complex logic into 1K of memory is small and dwindling every year. I can buy an ESP32 for less than a dollar. Moreover, there's no technical reason why FORTH programmers can't write, share, and use libraries (except maybe the aforesaid plethora of incompatible language implementations). FORTH is great for creating neat little DSLs that solve a specific problem. Stacking these can be powerful, but if you personally don't want to use them, or it doesn't fit your use case, that's fine.
- andsoitis 11mo ago> "how can we get C programmers to understand that they would be more productive in FORTH" It could also be that they wouldn’t be more productive (given the kinds of software the typical C programmer writes). It could also be that that is the wrong question.
- saulpw 11mo agoThe reason C beats Forth is code-sharing. Forth is a better language and system on its own, but it's difficult to standardize for reasons both technical and cultural. So if you write some really wonderful code in Forth to, say, decompress a bytestream, another Forth programmer is unlikely to be able to use that code without substantial modification. So Forth becomes either a single-person or a small-team system at best. Larger teams can't grow (in part because onboarding to your particular Forth system is a non-standard process), and especially cross-pollination between teams and companies is not possible.
- ErroneousBosh 11mo ago> The whole context of this article is "how can we get C programmers to understand that they would be more productive in FORTH". They absolutely would not be more productive in Forth. If they're writing in an ultra-high-level language like C, they're unlikely to be targetting something where Forth would make sense. You need ridiculously powerful processors to run a C compiler, and your code is likely targeting some massive processor with possibly hundreds of kilobytes of code space. Forth and C inhabit entirely different conceptual spaces. > Moreover, there's no technical reason why FORTH programmers can't write, share, and use libraries None of the libraries you write will be of any use to me, and vice-versa.
- tov_objorkin 11mo agoForth is pretty lowlevel, i don't think it can compete with the highlevel languages. Postfix notation and stack juggling is just boring.
- vdupras 11mo agoThat's what I would call the "Forth challenge", that is to grow out of stack juggling. When you look at the Forth code of a beginner, yes it's full of stack juggling, of "@" and of "!". When you look at code from more experienced Forth programmers, there's much less of it. The challenge is to build your way out. There's no fixed way to do this, because the best path to do so is generally dependent on the task at hand. Needless to say, most programmers fail this challenge.
- jrochkind1 11mo agoYou are definitely not making it sound attractive for real projects where the outcome matters. Sounds like a fun game maybe.
- vdupras 11mo agoThis challenge comes with rewards. Forth has superpowers that can't be found elsewhere. But its definitely not for everyone. I'd say that the status quo of Forth being an obscur niche is fine, just fine. If you need convincing, if you aren't spontaneously curious about Forth, then it's likely not for you.
- jrochkind1 11mo agoI'm in favor of everyone having fun however they want, and you have piqued my interest a bit that it might be fun. But if even the proponents of the language say that ("needless to say"!) most programmers will be incapable of the challenge of writing good code in it... definitely doesn't sound like anything I'd want in anything I wanted to be maintainable or long-lasting. If this is the outcome you desire, then your, uh, anti-evangelism is working!
- deleted 11mo ago[deleted]
- Mmrnmhrm 11mo agoThe power of FORTH is that creating a variation tailored to your specific problem is almost effortless. In most languages, building a compiler or interpreter is a major project. With FORTH, if you’re the only user, you can have something working in minutes. I’ve lost count of how many times I’ve thrown together a simple stack-based interpreter. Whenever I need to encode non-trivial behavior in an app, I know I can spin up a quick FORTH and get it done.
- tdeck 11mo agoLet's imagine for the sake of argument that I don't need to write a compiler or interpreter. What else is FORTH well suited for?
- cmrdporcupine 11mo agoIt's often used in bootloader/firmware type stuff (or was) because it can be a bit higher level than assembly and not subject to the same types of vulnerabilities and crashes... but written in a few KB and even easily hand written in assembly. And often run pretty fast, depending on the architecture.