What the hell is Forth? (2019)
21–30 of 138 posts
Re: What the hell is Forth? (2019)
#22I believe that any programmer should at least know a little about Forth. It's like Lisp. Just knowing about them is extremely enlightening, even if you don't use them in your daily life. Obligatory link: https://github.com/nornagon/jonesforth/blob/master/jonesfort... This well-written tutorial will have you implement a Forth in 500 lines of assembly and another 500 lines of Forth. You will feel like a different perso…
Agree with the parent, it's a language worth knowing like LISP is worth knowing, but (unlike LISP) it is not a good language choice for almost all use cases in 2023 (almost all use cases are not that memory constrained any more, even embedded systems), for the same reason you shouldn't use Perl (it is very hard to read code). I was going to say "its main disadvantage is that the only way to find out what a piece of c…
(The extremely easy bootstrapping from any point down to an ISA manual and a ROM programmer—or a monitor that accepts peek/poke/goto from a UART—I also don’t think has really been replicated anywhere else.)
Re: What the hell is Forth? (2019)
#23I believe that any programmer should at least know a little about Forth. It's like Lisp. Just knowing about them is extremely enlightening, even if you don't use them in your daily life. Obligatory link: https://github.com/nornagon/jonesforth/blob/master/jonesfort... This well-written tutorial will have you implement a Forth in 500 lines of assembly and another 500 lines of Forth. You will feel like a different perso…
Agree with the parent, it's a language worth knowing like LISP is worth knowing, but (unlike LISP) it is not a good language choice for almost all use cases in 2023 (almost all use cases are not that memory constrained any more, even embedded systems), for the same reason you shouldn't use Perl (it is very hard to read code). I was going to say "its main disadvantage is that the only way to find out what a piece of c…
Re: What the hell is Forth? (2019)
#24Earlier quoted context omitted.
Agree with the parent, it's a language worth knowing like LISP is worth knowing, but (unlike LISP) it is not a good language choice for almost all use cases in 2023 (almost all use cases are not that memory constrained any more, even embedded systems), for the same reason you shouldn't use Perl (it is very hard to read code). I was going to say "its main disadvantage is that the only way to find out what a piece of c…
The original use for FORTH was to control radio telescopes.
Re: What the hell is Forth? (2019)
#25> A single person should be able to understand a computing system in its entirety, so that they can change it to fit their needs This idea combined with the notion that software written by someone else necessarily serves their purposes rather than yours has me gradually working in that direction. Really all I need to do is write (or run) a forth on some bare metal. It's fun to build your own hardware as well which is…
Re: What the hell is Forth? (2019)
#26I believe that any programmer should at least know a little about Forth. It's like Lisp. Just knowing about them is extremely enlightening, even if you don't use them in your daily life. Obligatory link: https://github.com/nornagon/jonesforth/blob/master/jonesfort... This well-written tutorial will have you implement a Forth in 500 lines of assembly and another 500 lines of Forth. You will feel like a different perso…
I couldn't get jonesforth to compile correctly. Not sure why. I found a python and a javascript implementation, not sure if I like them. Any recommendations?
Re: What the hell is Forth? (2019)
#27If you want to build a Forth check out R. G. Loeliger's "Threaded Interpretive Languages Their Design And Implementation" https://archive.org/details/R.G.LoeligerThreadedInterpretive... (Jonesforth has already been mentioned.) Read "Starting Forth" and "Thinking Forth" too, even if you don't want to write a Forth or program in Forth. It'll still expand your mind in useful and fun ways.
Re: What the hell is Forth? (2019)
#28Earlier quoted context omitted.
Agree with the parent, it's a language worth knowing like LISP is worth knowing, but (unlike LISP) it is not a good language choice for almost all use cases in 2023 (almost all use cases are not that memory constrained any more, even embedded systems), for the same reason you shouldn't use Perl (it is very hard to read code). I was going to say "its main disadvantage is that the only way to find out what a piece of c…
I don't know, I think it can be a pretty solid language depending on what variant you use. There are few pieces of code in Forth that make me think "man, this seems repetitive, but I don't know how to actually generalize this" because abstraction is little more than structured copy+paste.
Which perhaps is logical, since Forth is a concatenative language. Roughly, one can split a program in half at any point and get two subprograms which can be called one after the other - in the same order - to get the same result.
Like, to calculate 2 + 3 * 4 one would write 2 3 4 * + in Forth, this sequence can be split in two 6 different ways, and we can even meaningfully interpret those two parts each time. E.g. part 4 * + is a two-argument function which multiplies first (closest to the top in the stack) by 4 and sums the result with the other argument - in JavaScript it would be function(x, y) { return 4*x+y; }.
Re: What the hell is Forth? (2019)
#29Re: What the hell is Forth? (2019)
#30I didn't even see a mention of the old bumper sticker: "Forth love if honk then"
"Factor" love? [ honk ] when
Not nearly as lyrical, but perhaps easier to understand.