What is Forth?

Topics relating to various Forth models on the 6502, 65816, and related microprocessors and microcontrollers.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: What is Forth?

Post by BigDumbDinosaur »

GARTHWILSON wrote:
I have a long list of beefs with C...
I don't think you'll get too many arguments about C's warts and such. The language's syntax seems confusing to non-C programmers, just as Forth's syntax does to non-Forth programmers. In fact, every programming language has a similar set of deficiencies, which is a natural consequence of the evolution of programming languages in general and the prejudices and opinions of the language's inventors.

In a sense, C is no worse or better than most other 3GL procedural languages. However, a well-written C program with good name choices for constants, variables and functions can be self-documenting, even with sparse commentary. This is also the case with the other 3GL procedural language in which I have professionally developed: timesharing BASIC (aka Business BASIC, which is only vaguely related to the BASICs commonly found on microcomputers).

Forth, to me, is unintelligible gibberish, not so much a computer language as an incoherent discourse on what is supposed to be going on inside a computer. I can no more relate what a Forth program says to what it does than I can relate a food recipe written in Mandarin Chinese to what the end dish will be. :shock: :x :?: :roll: :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: What is Forth?

Post by barrym95838 »

It has been said that Forth has NO syntax of its own, so your source of confusion might be the result of searching for something that simply isn't there. I am determined to add Forth to my lexicon, but it won't be easy.

Mike B.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: What is Forth?

Post by BigDumbDinosaur »

barrym95838 wrote:
It has been said that Forth has NO syntax of its own, so your source of confusion might be the result of searching for something that simply isn't there.
...and that is probably a major reason why Forth has never had significant support in the computing universe.

Having professionally written software for many decades, I could never envision a language totally devoid of predictable syntax being a responsible choice for a business application that could be used for many years (I have clients running today on software I developed for them in the early 1990s). Just how does the next guy maintain your code when you move on to new pastures? Just exactly what is it that strange Forth word does? Good luck on that!

I know plenty of programmers who know C, FORTRAN, BASIC, etc., backwards and forwards. I know no one who knows anything about Forth, other than, in the words of my good friend and long-time programmer Dave, that it is a language that was "...cobbled together by a hippie while smoking a joint." (I don't actually know if Chuck Moore is/was a toker.)
Quote:
I am determined to add Forth to my lexicon, but it won't be easy.
For me, the question would be "Why?" :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
commodorejohn
Posts: 299
Joined: 21 Jan 2016
Location: Placerville, CA
Contact:

Re: What is Forth?

Post by commodorejohn »

Forth reminds me very much of the Grateful Dead: to those who love it, it's a profound transformative experience catalogued and distributed by a community of passionate advocates which must be shared with the entire world, while to those who hate it it's a meandering tangle of aimless noodling maintained and pushed by a bunch of insistent hairy freaks.

But then I don't have enough direct experience with it to say for sure which camp I'd fall into ;)
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: What is Forth?

Post by barrym95838 »

That's a very good analogy IMO, john. I can't believe that BDD pulled the "why" card on me, though, especially in a setting such as this ... if I wasn't such a profound nerd, I'd probably be insulted! :lol:

Mike B.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: What is Forth?

Post by GARTHWILSON »

I doubt that any of the people I've heard criticize Forth have been through Leo Brodie's book, "Starting Forth," let alone his follow-up book, "Thinking Forth."
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
commodorejohn
Posts: 299
Joined: 21 Jan 2016
Location: Placerville, CA
Contact:

Re: What is Forth?

Post by commodorejohn »

I started Starting Forth at one point, I should really pick it up again.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: What is Forth?

Post by BigDumbDinosaur »

commodorejohn wrote:
Forth reminds me very much of the Grateful Dead: to those who love it, it's a profound transformative experience catalogued and distributed by a community of passionate advocates which must be shared with the entire world, while to those who hate it it's a meandering tangle of aimless noodling maintained and pushed by a bunch of insistent hairy freaks.

But then I don't have enough direct experience with it to say for sure which camp I'd fall into ;)
Depends...is your hair real long? :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: What is Forth?

Post by BigDumbDinosaur »

GARTHWILSON wrote:
I doubt that any of the people I've heard criticize Forth have been through Leo Brodie's book, "Starting Forth," let alone his follow-up book, "Thinking Forth."
I did read a good part of the Brodie's book. The further I got into "Starting Forth" the further I got into questioning my sanity. In fact, I think Brodie's book is what convinced me to return to reality and keep writing assembly language, where things make sense. :shock: :lol:
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: What is Forth?

Post by GARTHWILSON »

Charles H. Moore, inventor of Forth, in the hippie years:
41n94TXOZdL._SY346_.jpg
41n94TXOZdL._SY346_.jpg (13.59 KiB) Viewed 9402 times

Leo Brodie, author of "Starting Forth" and "Thinking Forth," said Charles Moore was a very gentle and sweet man.  His "joint" back then was the United States National Radio Astronomy Observatory (NRAO) which he developed Forth for, to control radio telescopes.  As I recall, they were only allowed one compile per day per programmer with the existing systems, and he wanted something where he could get immediate turnaround and interactiveness.  I really need to make a video to demonstrate that.  A co-worker who went to another company and spent $8000 on a C development system admitted it did not have nearly the interactiveness my partially homebrew '02 Forth had.

Charles Moore has designed many chips, including stack processors that were used in NASA missions, and gained several microprocessor-related patents. He wrote his own VLSI CAD, in Forth.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
commodorejohn
Posts: 299
Joined: 21 Jan 2016
Location: Placerville, CA
Contact:

Re: What is Forth?

Post by commodorejohn »

BigDumbDinosaur wrote:
Depends...is your hair real long? :D
Not anymore :D These days it cycles between "normal" and "Bee Gees..."
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: What is Forth?

Post by barrym95838 »

GARTHWILSON wrote:
... he wanted something where he could get immediate turnaround and interactiveness. I really need to make a video to demonstrate that. A co-worker who went to another company and spent $8000 on a C development system admitted it did not have nearly the interactiveness my partially homebrew '02 Forth had ...
Have I posted a link to Sam's video here yet? He's very very good, and I hope that he makes more of them.

https://www.youtube.com/watch?v=mvrE2ZGe-rs

Mike B.
rwiker
Posts: 294
Joined: 03 Mar 2011

Re: What is Forth?

Post by rwiker »

barrym95838 wrote:
GARTHWILSON wrote:
... he wanted something where he could get immediate turnaround and interactiveness. I really need to make a video to demonstrate that. A co-worker who went to another company and spent $8000 on a C development system admitted it did not have nearly the interactiveness my partially homebrew '02 Forth had ...
Have I posted a link to Sam's video here yet? He's very very good, and I hope that he makes more of them.

https://www.youtube.com/watch?v=mvrE2ZGe-rs

Mike B.
That was very, very good - thanks!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: What is Forth?

Post by GARTHWILSON »

GARTHWILSON wrote:
As I recall, they were only allowed one compile per day per programmer with the existing systems, and he wanted something where he could get immediate turnaround and interactiveness.
The story is in the first section of https://www.forth.com/resources/forth-p ... -language/

Further down, it talks about Elizabeth Rather with whom Chuck Moore later went on to form Forth, Inc.:

  • Rather was appalled to find this critical system written in a unique language, undocumented and known to only one human.  Her instinctive reaction was to re-write the whole thing in FORTRAN to get it under control.  Alas, however, there was neither time nor budget for this, so she set out to learn and document the system as best she could.

    After about two months, Rather began to realize that something extraordinary was happening: despite the incredibly primitive nature of the on-line computers, despite the weirdness of the language, despite the lack of any local experts or resources, she could accomplish more in the few hours she spent on the Forth computers once a week than the entire rest of the week when she had virtually unlimited access to several large mainframes.


and further down, referring to after they had formed Forth, Inc.,

  • The system was so advanced that astronomers from all over the world began asking for copies of the software.  Versions were installed at Steward Observatory, MIT, Imperial College (London), the Cerro Tololo (Chile) Inter-American Observatory, and the University of Utrecht (Netherlands). Its use spread rapidly, and in 1976 Forth was adopted as a standard language by the International Astronomical Union.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

Re: What is Forth?

Post by MichaelM »

Thanks for the link. As always, a very good read. I would like to say that I'm working toward FORTH competency, but there's just not enough time available to me currently.

I have incorporated support for a FORTH-style VM in my latest implementation of my 65C02-compatible core, but I've not gone any further than testing that the instructions execute correctly. I had every intention of re-writing figFORTH (archived elsewhere on the forum) using the M65C02A core's VM instructions, but time just flies by and since I don't actively use FORTH, the motivation just isn't there for me at the moment.
Michael A.
Post Reply