Newsgroups: comp.robotics,comp.realtime
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!uhog.mit.edu!europa.eng.gtefsd.com!howland.reston.ans.net!ix.netcom.com!netcom.com!jfox
From: jfox@netcom.com (Jeff Fox)
Subject: Re: Forth 
Message-ID: <jfoxD42MB7.5zH@netcom.com>
Sender: jfox@netcom3.netcom.com
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
References: <38cbbk$739@ixnews1.ix.netcom.com>
            <3hcevr$2h2@hopper.acm.org> <D3sEHI.BtJ@armory.com>
Date: Thu, 16 Feb 1995 02:16:19 GMT
Lines: 126
Xref: glinda.oz.cs.cmu.edu comp.robotics:18055 comp.realtime:8693

In article <D3sEHI.BtJ@armory.com> rstevew@armory.com 
           (Richard Steven Walz) writes:
> \ \
>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

Some people are using Dr. Julian Noble's Formula-Translater to simply
quote algebraic formulas from Fortran programs in their source code.
It only needs about 1.5k to add this feature to a Forth, and it lets
you mix complex numbers, integers and floating point expressions in
an algebraic expression then say F" algeraic-expression" to get it to
compile into your program.  He also has an In-Tran version for integer 
only algebraic expressions.  See his book "Scientific Forth"

>detest non-file oriented storage, but the idea of on the fly compile and

Most Forth uses have been using files for over a decade, but blocks
remain useful in embedded applications where there may not be file support,
or applications where the performance overhead of a file system is not
acceptable. Some systems offer Files or Blocks, some offer files and/or
blocks,  some offer files in blocks and some offer blocks in files.

>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

Now you are talking my language.  I have been working on parallel Forth
implementations, hardware  and software for a number of years.

>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

IMHO the use of reverse Polish syntax is naturally coupled to the use of
stacks.  If you toss it, it isnt Forth.  People have done things like this
but I never saw the  advantage.  It is a way of thinking.  Of course most
Forth users have tossed blocks a decade ago.  But those who do use them 
will tell you how useful they can be to get the performance that you need
when things are tight. 
 
>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!

I agree that it is very easy to teach Forth to children.  But teachability
was not one of the "goals" in the early design of Forth, and it has
for the most part remained an sort of "oral tradition" handed down from
teacher to student.  (hard to find classes in school)

>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 agree with you about most of that.  But because Forth is so simple 
people who never really had any idea what their compiler was doing
can learn to write a Forth compiler VERY quickly.  And as a result
many do, and many public domain Forth systems lack professional
quality and leave a bad taste in the mouth of those who are exposed.
Few people ever see some of the high quality commercial Forths, and
although there are some very good PD Forths it is a hit or miss
proposition.

>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

There are very small and efficient Forth's like Frank Sargeant's Pygmy Forth
and there are giant Forth's like Tom Zimmer's Win32for with over 5000
words in the system. (both good PD systems)  I have used Tom's very large
but popular FPC for years.  It is imposing and since it comes with megabytes 
of source it is often involved to unravel.  But it does  have a disassembler
and a decompiler, and a hypertext help system with links to a description
and source for almost all words.  I like the target compiler that comes
with it.  TCOM will generate very small and fast COM files in DOS and
also will generate stand alone applications for a number of other target
processors.  It is mostly source compatible with things developed in FPC.
I use many very fast utilities that were compiled to tiny COM files with
TCOM.  
I am also a fan of eForth.  E stand for Embedded, or Easy, or Educational.
It is not a Forth optimized for performance.  Instead it is a good 
educational tool because it is very very simple.  You can easily get a
complete ANS Forth system with file access in a tiny COM file.
Tom Almy's ForthCMP will generate really tight optimized machine code
and there are some other very nice PD Forths.

Forth seems headed in several different directions to me.  It is still
very useful for embedded systems, squeazing the most out of real-time
systems, and experimenting with new hardware really quickly.  There
are those who want to make it a more mainstream platform type language
and generally they support the effort towards the use of ANS Forth.
Skip Carter's Scientific Library project is a good example.  Then
there are those interested in Open Boot the system independent used
by Sun workstations, many PowerPC machines and other new designs,
which is a type of Forth.  So many user's machines are booting in
Forth before they go into the OS that they normally use and they
many never know they are using Forth.  Then there are those like
myself that are interested in distilling the language to its very
core and implementing it directly in hardware to get designs that
are as simple and efficient in hardware as Forth can be in software.

I think it is in the nature of an extensible language to be extended
in many different directions.  But it makes it very hard to get
people to agree on what Forth really is all about.

Jeff Fox
Ultra Technology
2510 10th St.
Berkeley CA 94710
(510) 848-2149
jfox@netcom.com
http://www.dnai.com/~jfox

