Newsgroups: comp.robotics,comp.realtime
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornell!travelers.mail.cornell.edu!news.kei.com!news.mathworks.com!news.duke.edu!agate!darkstar.UCSC.EDU!nic.scruz.net!earth.armory.com!rstevew
From: rstevew@armory.com (Richard Steven Walz)
Subject: Re: Forth (was Re: Real-time systems: Windows-NT or QNX)
Organization: The Armory
Date: Fri, 10 Feb 1995 13:51:05 GMT
Message-ID: <D3sEHI.BtJ@armory.com>
References: <38cbbk$739@ixnews1.ix.netcom.com> <3hcevr$2h2@hopper.acm.org>
Sender: news@armory.com (Usenet News)
Nntp-Posting-Host: deepthought.armory.com
Lines: 115
Xref: glinda.oz.cs.cmu.edu comp.robotics:17841 comp.realtime:8626

In article <3hcevr$2h2@hopper.acm.org>,  <Angelus@pascal.acm.org> wrote:
>
>In article <38cbbk$739@ixnews1.ix.netcom.com>, <rant@ix.netcom.com> writes:
>> Path: 
>hopper.acm.org!swrinde!elroy.jpl.nasa.gov!decwrl!amd!netcomsv!netcomsv!ix.netco
>m.com!netnews
>> From: rant@ix.netcom.com (Ran Talbott)
>> Newsgroups: comp.realtime,comp.robotics
>> Subject: Re: Forth (was Re: Real-time systems:  Windows-NT or QNX)
>> Date: 23 Oct 1994 00:39:16 GMT
>> Organization: Netcom
>> Lines: 39
>> Distribution: world
>> Message-ID: <38cbbk$739@ixnews1.ix.netcom.com>
>> NNTP-Posting-Host: ix-sj11-28.ix.netcom.com
>> Xref: hopper.acm.org comp.realtime:2191 comp.robotics:6398
>> 
>> In <38b4u5$isa@ixnews1.ix.netcom.com> kmgibbs@ix.netcom.com (Kent Gibbs) 
>writes: 
>> 
>> >	Forgive me for my ignorance as I'm not that familiar with
>> >Forth, but it does seem to solve some problems in that you are able
>> >to build the dictionary to suit the application.  Is this correct?
>> 
>> Yes.  It's also correct that Forth *causes* problems sometimes 
>> because you are able to build the dictionary to suit the personal
>> quirks of the programmer.  Which may or may not happen to match
>> the personal quirks of the guy who comes along a few years later to
>> maintain it.
>> 
>> >I don't know if it will handle critical interrupts or not
>> 
>> Well,  if you throw enough horsepower at the problem,  you can
>> handle "critical interrupts" in interpreted LISP...
>> 
>> >but it does seem to be fast and robust. 
>> 
>> Compared to what?  BASIC?  Sure.  C?  No.  The very structure of
>> most Forth systems means that they're *always* going to have a 
>> significant run-time overhead.  Which is acceptable in some cases,
>> and intolerable in others.
>> 
>> >I guess I don't understand the bad reputation.
>> 
>> It's very simple:  Forth is the software equivalent of a wirewrap gun.
>> There are certain problems for which it's,  not just an acceptable tool,
>> but the best one.  But that's a fairly limited class,  and the insistence
>> of a vocal minority of "Forth nuts" that it's the be-all and end-all of
>> HLLs,  coupled with other unrealistic claims,  has convinced a lot of 
>> people that there's something about Forth programming that warps 
>> the mind of the programmer ;-)
>> 
>> (Ada was greeted with much the same sort of skepticism,  but we
>> *expect* gummint people to come up with wacky,  unworkable
>> ideas,  and make grandiose claims for them...)
>> 
>Forth is FAST during execution.  I does not use interpretation during 
>execution. It is about as fast as C. It is re-entrant. Multitasking! It is 
>much more efficient than C ( uses less memory).
-----------------------------
In other words, it's the fastest thing that's at all like a HLL that runs
like a bat out of hell & damned close to assembly if it's optimized. It
SHOULD have become the first standardized language, as it constituted a
language kernel that could be used to build a simple operating system with,
but the early users of it and its author simply would not/could not stand
the concept of fixed and optimized libraries for it rather than a totally
user configurable language! It could have "EATEN" BASIC *AND* C and become a
universal language, and it still could, if someone simply wanted to hijack
it into a public domain standard language, like the gnu project and gcc and
emacs and such. And they could do it without tampering with the kernels
that exist for it. They'd just need the interest and momentum. The
interesting thing about it, is that it is the only language that really
exists as an engine prior to the operating system, like C is to UNIX. And
that it is compiled as it is written, unlike C, and much more like the
recent (5 to 9 years) proliferation of interactive compilers for C and
QuickBASIC and TurboPASCAL and such, which compile in RAM. But Forth did it
INHERENTLY, making it neither a compiler or an interpreter!! It is closest
to TurboPASCAL in it's speed and optimization, which compares favorably to
any C *I* have seen recently. Why the concept was avoided is partly because
of its "screen" oriented storage of code rather than a "file" oriented
storage. But that should and could have been worked around by today's
available RAM loading the whole thing as compiled and swapping in other
parts when routine names are referenced. Here I have gone and touted Forth
and I haven't even used it for years, and I HATE non-algebraic math, and I
detest non-file oriented storage, but the idea of on the fly compile and
nesting routines to create program is very like unto the best beginnings
toward parallel processing, and I'd love to see that get a boost. The
structure of Forth is elegant in the extreme, and it is a very well-behaved
language, if standardized. It is inherently structured. You'd never HAVE to
teach or emphasize structured programming with it to students, because
there is literally NO OTHER WAY TO WRITE code with it except structured!
DAMN!!! I'd love to program only in Forth! I'd love a Forth based OS!!
But they'd have to toss the reverse Polish and the "screens" as a concept
and rewrite some things. Then it would be so easy to teach that it
virtually wouldn't need a teacher!! The kernel could have learner routines
in minimal space to show off the standardized routines and how to do flow
control and I/O and that would be it! With a help-base adjunct to the
kernel as interactive performer, some children would likely begin talking
to it OR even WRITING personalities into it for themselves to talk to!
And it was the FIRST truly object-oriented language, when you think about
it, with ability around that which other languages have to graft into
themselves! It comes ready made for parallelism, multitasking AND
multiprocessing, and object orientation! Why didn't we SEE what we were
missing out on back then! The more I think about it, the more I want a
Forth or even a Logo style language, it's closest cousin. I recall my first
few times using it or teaching my son to use Logo! It felt automatically
human, like it was built into humans almost without a required learning
curve! From the moment you write your first definition, you're done
learning and begun exploring, as other languages only allow after weeks or
months! Can anybody get me into the best of this world without much strain?
I have looked through some of the DOS Forth's and they always seem too
hidebound and imposing. I would very much welcome anyone's solicitation who
has what they may see from what I said here that I would like? Anyone?
-Steve Walz   rstevew@armory.com

