Live data from Hacker News

What the hell is Forth? (2019)

blog.information-superhighway.net

131–138 of 138 posts

Re: What the hell is Forth? (2019)

#132

Earlier quoted context omitted.

Haskell, Julia, Rust, Lisp, and Forth are 'esoteric' enough to create an in-crowd, who are quite often deluded by imagined miraculous solutions to people's problems. Please repeat after Fred Brooks: there ain't no silver bullet. To a certain extent this goes on outside programming languages per se: OOP, Gang of Four, Agile match the pattern as well.

Feel APL similar in-crowd member too, though perhaps even more niche

Yup. Also HolyC (literally a religious undertaking), but the crowd had only one person, and he is no longer with us.

Re: What the hell is Forth? (2019)

#133
For a more modern language that scratches the same minimalist syntax itch as Forth, try Red [1]. It's list-based rather than stack-based and includes the "killer app" of a really nice DSL for GUI layout. Even including the excellent PySimpleGUI, it's the fastest way to build up a custom GUI without a GUI builder tool.

[1] http://redprogramming.com/Getting%20Started.html

Re: What the hell is Forth? (2019)

#134
post #121

Earlier quoted context omitted.

I know it's a lot of fun writing Forths and that's how most people tend to experience Forth, but I like to urge people to actually build applications on Forth. Understanding Forth by writing applications is probably the best way to get a feel for Forth.

Is there any "battery-included" ANS Forth (more or less like Python/Go) which provides access to concurrency, networking, database, GUI, etc? Not an embedded device programmer, but mostly deals with frontend apps, and occasionally backend, so those are very relevant to me. Or perhaps use "non-traditional" Forths like 8th ( https://8th-dev.com ) or Factor ( https://factorcode.org )?

gForth is probably the closest you'll get to a batteries-included ANS Forth. It has a lot of libraries and does have some GUI libraries. It definitely has networking and some amount of db words, I'm not sure what it's concurrency situation is like.

8th is a great not-Forth. Highly recommended because of how practical is.

Re: What the hell is Forth? (2019)

#136

Earlier quoted context omitted.

Feel APL similar in-crowd member too, though perhaps even more niche

Yup. Also HolyC (literally a religious undertaking), but the crowd had only one person, and he is no longer with us.

Went to a better place, one hopes. Maybe one where he is appreciated, and not considered mad.

Re: What the hell is Forth? (2019)

#137
Indirect threaded code is quite a universal program representation.

We used to have our Forth-like system back in 1994, with a virtualized NEXT point, so we had execute, interpret, compile and two link stages behaviors for each word. This allowed produce making an optimizing linker, which produced very tiny .COM-files. I still have source code for it.

I think this idea can quite easily be taken to the extreme, and allow adding things like - type checking - debugging - SSA IR generation (say, for LLVM optimizer) - lots run-time checks (for tests)

So I believe a Forth system can be made quite safe.

Re: What the hell is Forth? (2019)

#138

The author complains about not having local variables, but most decent Forth environments have them. It is not difficult to have local variables in Forth, just use a library or compiler that provides them.

Author here. I didn't have a decent Forth environment, I had a weird mess that I built myself from scratch. I ended up implementing a lot of "sophisticated" features - coroutines, cooperative multitasking, an interactive debugger - but I was never annoyed enough by the lack of locals to seriously contemplate spending the effort to build them, so I just didn't.
Post reply on HN