I love the language, at least part of it, but the community and that 180⁰ shift always feels like any attempt to utilise forth is swimming upstream in monsoon season.
I love the language, at least part of it, but the community and that 180⁰ shift always feels like any attempt to utilise forth is swimming upstream in monsoon season.
The SVFIG meetings have been traditionally excellent in showcasing these somewhat unique in today's mainstream programming culture strengths.
However, your example that stack machines have some difficulty with parallelism, doesn't make much sense. I'd argue that on the contrary, parallelism is one of the areas where stack machines and Forth-y languages shine. arrayForth/colorForth is sort of the assembly language for GreenArrays chips, for example (GreenArrays chips are specifically built for parallelism in embedded systems). I'll also note that many VMs are stack machines, including Lua's and Python's, and these languages are the certain way and how that the computer industry works. Both these languages compile to a bytecode that looks suspiciously like a forth if you write it postfix (Lua moreso than Python, as Python makes use of environments which aren't Forth-y, while Lua only does that for globals).
I think the person you were responding to was pointing out that the Forth community departs from industry norms in cultural ways, not in technical ones. I don't think Forth is really that far outside industry norms, it's just more appropriate to compare it to assemblies and bytecodes than to compare it to high-level languages.
> it's just more appropriate to compare it to assemblies and bytecodes than to compare it to high-level languages.
But the FORTH community thinks of it as a high-level language, not just as a machine target. And there are additional difficulties wrt. thinking of FORTH in such terms, such as FORTH being an untyped language and providing only limited ways of structuring programs and data, or enforcing modularity. This means that it will probably be quite hard to develop larger programs using FORTH.
My guy, do you really think that no one at GreenArrays ever thought, "Gosh, it would be nice to have some way to coordinate all these parallel processes..." You really think you're the first one to think that? Geez.
Hint: it's coroutines. Like I said, not that different from the way and how the rest of the industry works, though it's notable that colorForth was ahead of the industry in this respect.
> But the FORTH community thinks of it as a high-level language, not just as a machine target.
Please refrain from telling me what I think. You might say that I don't speak for the entire Forth community, and that's true, but neither do you.
I don't think of it as either a high level language or a machine target.
The homogeneous nature of the instructions all operating on the stack lets you do some higher level stuff, similar to the homogeneous nature of Lisp operating on lists enabling higher-level stuff. The parallels between Forth and Lisp aren't surface-level, either: it's trivial to see the conversion between "(+ 1 2)" in Lisp and "1 2 +" in Forth, but it might be less obvious that these have the same effect on the stack in a simple implementation of both languages. Where they differ is that Lisp leans into the higher level features and focuses on maintaining purity while abstracting away stack operations, while Forth makes the stack explicit and focuses on maintaining direct access to processor instructions, and breaks functional purity with operations like dup. This is why I'd say forth is a lot closer to an assembly language than a high level language, even if it's capable of some high-level constructions.
"Whenever I hear people boasting of millions of lines of code, I know they have greviously misunderstood their problem." - Chuck Moore
Forth is a concatenative language, it transcends/spans categories like "high" or "low level". Typing is trivial to add to the language, but tends not to be common simply due to most Forths being used for embedded development. Structure is also quite free compared to most other languages.This process is far more interesting than any other topic!