3 ms·
Hi Kragen! Wow, what an answer! It's longer and more well-nuanced than some of my posts on HN -- and some of my posts are long and well-nuanced! Hey, if you
by peter_d_sherman 4y ago
Hi Kragen!
Wow, what an answer! It's longer and more well-nuanced than some of my posts on HN -- and some of my posts are long and well-nuanced!
Hey, if you would like to take this conversation to an email discussion, I would certainly welcome you there! My email address is:
peter.d.sherman@gmail.com
>"My thinking on Forth, which is something I'm an amateur at, has changed a little bit since I wrote tokthr and SKF. I think that if you evaluate Forth as a programming language, it's generally going to look pretty deficient. It's more bug-prone and harder to read than alternatives like C, Lisp, BASIC, or assembly language, although it does support compile-time metaprogramming and powerful abstraction facilities."
[...]
>"But in Forth you're always worrying about whether you're doing something in the cleanest and the best way. Should I define a -! word? Maybe that if statement should be a word of its own that takes A and/or MOD_ADLER as parameters? Maybe I should do the subtraction and just conditionally store the result into A if it's still positive?"
All of what you say about Forth is true -- but if and only if -- we evaluate it compared to the many other, frequently better, programming languages that exist today...
I don't evaluate Forth in this way.
"Beauty is in the eye of the beholder" -- as they say!
You see, why Forth is so beautiful to me (at least as the smallest possible version of Forth that can still be extended) -- is because it exists somewhere in the "problem continuum" (for lack of a better term!) -- of all of the problems that computer scientists in history, exploring new technology for the first time (in history -- what's old to us was new to them) would have had to face down, and solve.
I am interested in that "problem continuum" -- of problems -- now well-solved -- but historically, that would have not been the case!
In other words, let's suppose you are one of the early computer scientists, and your computer only has a row of switches to specify an address, and another row of switches to specify a value for that address, and another switch which when toggled, writes the value of the row of switches into the address specified by the other row.
OK, so that's a very primitive computer!
No display, no keyboard, no nothing!
So now from that computer -- what's the next thing that needs to be built to advance that state of computer science one step forward? Like, maybe that's you connect that computer to a typewriter with typewriter capabilities, like the Teletype 33 ASR: https://en.wikipedia.org/wiki/Teletype_Model_33 https://en.wikipedia.org/wiki/Teletype_Model_33
But, you first need a serial port (of sorts!) to do that!
Also if you want to type data to/from the computer -- then you need a program to do that (of which, the first one of those COULD NOT have been entered via the teletype -- it would have had to been entered by switches, by hand!)
You see computer history -- would have been, had we lived there, had we experienced it -- a "continuum of problems".
With specific incremental solutions at those points in time -- each of which would incrementally, incrementally (a little bit here, a little bit there!) -- get us a bit closer to the computer programs, programming languages and systems of today -- that we all know and love!
You see, I want to know how the early historical computer pioneers -- basically had to "MacGuyver" things (again, for lack of a better term!) -- Forth is an important step in all of that, because at the point in time that you have the smallest working Forth -- then you can pretty much start creating the infrastructure for all of the OS'es/Compilers/Debuggers, etc. -- that are to follow!
But if and only if you know what you're doing!
For example, using an existing compiler (as is done in many college-level compiler writing classes) to compile a new compiler -- is "cheating" (how did that original compiler come into existence in the first place? You see, it wouldn't have started its life as a fully functional compiler! It could have started its life as an assembler, and then features added (high level constructs) and eventually assembly language conversion removed -- until finally it became one of the first generation of true compilers, etc.
Now, Forth is not a first generation true compiler -- but it is a very important stepping stone (again, in the "problem continuum", for lack of a better term!) -- for getting there one day -- being able to write assemblers and debuggers in Forth, and eventually extend them enough such that one day they're a true compiler -- like perhaps Algol/C/Pascal (was Algol ever a true one-pass compiler that didn't require a linker?).
But anyway, you see what I'm looking for!
Anyway, thanks for your awesome response, and if you'd like to continue this discussion, just shoot me an email, peter.d.sherman@gmail.com !
-Peter