home .. forth .. misc mail list archive ..

Re: MISC-ShBoom-MuP21-F21


Hi Tom,

Sounds like you are going to be very helpful in illuminating, and
putting into perspective, what everyone on this list is struggling to
do. Thank you.

I don't know too much about the hardware issues, but my company has
probably built as many Forth applications in the form of
educational/consumer/business presentation software as anyone.

Tom Vermeiren wrote:
> 

> 
> The PSC1000 is promoted as a Java-processor (though not in the way like
> the picoJava's), though it has it roots in Forth. But I think that the
> virtual machines defined by both Java and Forth are very much alike.
> But, just to make sure, could somebody point me out where I could find
> a full, comprehensive summary of the Forth Virtual Machine, and while
> I'm at it, of the Forth language in itself. I've already searched the net
> for the Forth-language and have found much information, but most of it was
> not that adequate.

The best description of the virtual machine that I have seen was written
years ago by Dr. Ting and presented in Forth Dimensions, a print
publication. You may be able to get a copy of this through Glen Haydon
-- glen@haydon.org. Glen has lots of useful stuff re: Forth and probably
the best historical archive I know of. His website is
http://theforthsource.com. Tell him I sent you. 

Also, see if Glen can help you track down Tom Hand's great article on
programming metrics and Forth.

If your budget allows, buy all of the back copies of Forth Dimensions
and Rochester and FORML conference proceedings that you can afford. They
might not make too much sense initially, but with repeated rereading you
can dig out some very valuable ideas. You can get these through the FIG
website.

> 
> Forth itself is a a fairly low-level language that can build up with the
> help of macro's for higher usage. Right? But, what's the advantage of it
> above other languages like C or Java? I can guess wath you're answers will
> be, but I would like to hear them though.

I can't speak to contemporary comparisons, but for many years Forth
offered an exceptionally productive development environment,
applications with remarkably small memory footprints, access to all
resources of the underlying hardware, and compiler "transparency," e.g.
you didn't have to fight a mysterious black box to accomplish what you
wanted to do. If the compiler didn't do what you wanted, you simply
built a new one -- usually in minutes. For a number of years my company
commanded a small but relatively profitable niche -- putting interactive
marketing presentations on floppy disk. To my knowledge, no one could
put as much content on a 1.44 Mb floppy as we could, or produce it as
quickly and inexpensively.

For me personally, without doubt, the biggest strength of Forth is that
it works the way I think -- in small, extensible modules. I'm more of a
word person than number person, and Forth supports me in that regard
beautifully. From what some of the mathematicians in the Forth community
tell me, it supports them very well also, thank you. In my view, the
colon definition is an incredibly elegant and powerful construction.

In general, I think that people with a job to do -- engineers,
scientists, mathematicians, educational content developers -- have
tended to enjoy Forth far more than mainstream programmers and computer
scientists.

I can think of at least six problems with Forth. 

1) Because of its powerful extensibility, the language tended to
fragment into many dialects and variations. There were four "standards"
promoted within the span of a very few years -- and probably hundreds of
variations on the theme. Everybody thought they could "improve" Forth by
adding this or that "feature" -- usually something they knew from
another language, but didn't know how to do in Forth. This wasn't much
of a problem for experienced Forth users, but was unbelieveably
confusing to newcomers, and made it almost impossible to "market" the
language.

2) Because, I believe, of poor presentation to the larger "market," the
Forth programming community dwindled by attrition over the years to the
point where the incredible creativity of the early years dropped off.
Forth just didn't keep up with other developments in the larger world of
computing -- particularly graphics, networks, databases, etc. It held on
tenaciously in the embedded markets, but I fear it is dying even there.
You're lucky to see one mention of Forth in Embedded Systems magazine
per issue. Go to a Forth conference, which you may not be able to find
this year, and you'll find that by far the majority is over 50.

3) Forth poses a fairly stiff learning/conceptual readjustment curve for
programmers steeped in other languages. You basically have to put aside
many concepts that you regard as central to the programming task.
Moreover, you have to learn postfix notation, how to maintain stack
discipline, develop a careful documentation/coding "style," and wrestle
with the "integar vs. floating point" and "block vs. file"
controversies. 

Programmers seem to go through at least three plateaus as they learn and
master Forth. The climb to the first, which gives you the ability to
write useful, straight-forward programs, is fairly tough. You can sit on
the first plateau comfortably for a long time but still not write great
Forth. At the top plateau, Forth programs are unbelieveably terse and
powerful. They're almost like advanced mathematical expressions or
deeply-moving modern poetry. The very best of them are crystal clear in
both intention and functionality. On the other hand, you just don't want
to have to wade through badly-written Forth. Like a high-performance
sports car, you can get in trouble with Forth very quickly.

4) The Forth community never mastered a standard technique for sharing
code. The idea was that if you needed something, you built it yourself.
Usually code was shared as source, which was fine, but the many dialects
made it almost impossible for neophyes. By and large, this worked ok for
sort routines and other relatively simple chunks of code; but was quite
out of the question for advanced algorithms like, say, an MPEG routine,
or an outline font generator. 

5) Forth took steps toward many very contemporary programming concepts
long before other languages, e.g., object-orient programming, token
threading, and others. But because of reasons cited above, many of the
concepts were not developed to full potential. 

6) Non-proprietary institutional support for Forth, starting with the
Forth Interest Group, has atrophied.

I very much agree with a recent comment on the list that the future of
Forth is closely tied to the development of a powerful, inexpensive
Forth chip. This is what many of the MISC people are trying to achieve.
But I fervently hope that the MISC community learns from the historic
mistakes of the larger Forth community.

Best wishes,

Lloyd R. Prentice