From: jpeters@wet.COM (John A. Peters)
Newsgroups: comp.lang.forth
Subject: Sampler Forth
Date: 7 Sep 92 05:44:14 GMT
Organization: Wetware Diversions, San Francisco

SAMPLER FORTH                      Revised September 9, 1992

Suggestions from the Silicon Valley FIG meeting August 22, 1992.
Additional comments by letter from Jerry Mueller on Aug 29, 1992  
         
                   -*|===========|*-


Trying to persuade people to try Forth is psychological stuff. 
Someone interested in learning Forth, needs a sampler Forth.  A
simple, friendly stable, Forth system.  Most computer users know
a word processor and may or may not know another language.  

Most of us are too involved inside Forth and haven't backed off
and looked at Forth through non Forth eyes.  We need to keep in
mind that the visitor is not worried about speed or using to much
memory or being redundant or figuring out how to actually do
something.  The following will make Forth acceptable to the
general public.  It's goal is to be conventional.


FLOATING POINT default with a toggle words called FLO and INT.  
     The model is the simple pocket calculator.  Think of the
     language Basic or a pocket calculator as the convention
     people are used to.  Example: No F* fDUP or F/ etc.  Just
     simple  *  /  +  -  in each mode.  Ideally the use off a
     decimal point or comma will perform this toggle.


                      RPN is controversial

  The RPN founders say:

RPN (Reverse polish notation) is retained as it is required for 
     extensibility and the other solutions may be too complex or
     have mixed mode problems.  RPN may be spoken of as "natural
     math" and it's advantages can be explained later on in the
     documentation.

  The RPN visionaries say:

A lot of people resist RPN.  A lot of people have the idea that
HP calculators are all RPN.  HP went with the flow and changed -
their newer calculators all have algebraic entry, with RPN as an
option.  Provide two Forth words: ALG (for algebraic) and RPN. 
Type ALG and you can type:

(5*6)+(4*5)/(2*5) 

The compiler then knows it should translate this first in to 

5 6 * 4 5 *  +  2 5 *  \

and then compile it.  Type RPN and you simply go back to usual
RPN entry.  This means that _(_  (paren) must always have a 
following space as is the case now.  With out a following space
it is a algebraic instruction and should not be used for comments
etc.  We have  \   and \s  now a days as a better substitute in
some cases.


Sequential files with a toggle between .SEQ and .BLK files.  The
     editor can read the file extension and do the right thing.

A simple interface.

Error resistance and compiler security.  Range checking for 
     EXECUTE  ! "store", C!, MOVE, and CMOVE etc.

Lots of Examples.  Three examples per concept at a minimum.  
     Three tested, working examples of a diverse nature, per
     concept.  This is important.  This is the equal of hyper
     text in that the student can go either of three ways to
     check out his understanding.

Sound and color.

Quick feed back (this we have)

A full system with all the options already loaded.

DOCUMENTATION; Use the resources of the machine!  The compiler
doesn't do anything with numbers above 127, so use control-C to
toggle the high-order bits to 1 and all incoming bytes are 128 or
above and are ignored by the compiler.  They can be used for
comments.  On the screen they're dimmer; the printer outputs then
as italics. I (Jerry Mueler) did all this a couple of years a go. 
Type control-C again and you're back into normal forth input.

SO... a user could type FLO ALG SEQ at the forth prompt and be
using floating point, algebraic and sequential.  Type FIX RPN SCR
and you're a Forth purist.  Personally I don't care either way my
self.

Will anything come of this?  Probably.  I think FIG people tend
to get involved with their own particular Forth problems and
haven't spent any time looking ahead in to the future.  Other non
Forth programmers did, and now we have C libraries.  They may be
unwieldy and time - consuming but they're what people want.  




POWERFUL FEATURES that will help sell Forth.

A usable link to C libraries and other black boxes. 

The ability to run in background as an TSR.  Example call and run
other .EXE files that do things, then terminate and run the next
.EXE file.  Works like a batch file does when it uses KEY-FAKE. 
It should also save data to a file for importing to another
running application.

A trace function and a debugger called BUG  i.e. BUG <word> which
will work the same as DBG does..

Typed values, Constants, and Variables were suggested at the
meeting but Jerry says are we sure?

We need feed back and implementations.  If you have an idea, or
opinion, write your self a note now, to call or write me.  If you
don't foreword you're ideas it than you are holding things up.

Newsgroups: comp.lang.forth