home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / forth / 3086 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  4.9 KB

  1. Path: sparky!uunet!decwrl!csus.edu!netcom.com!netcomsv!wet!wet.COM
  2. From: jpeters@wet.COM (John A. Peters)
  3. Newsgroups: comp.lang.forth
  4. Subject: Sampler Forth
  5. Message-ID: <4303@wet.UUCP>
  6. Date: 7 Sep 92 05:44:14 GMT
  7. Sender: jpeters@wet.UUCP
  8. Organization: Wetware Diversions, San Francisco
  9. Lines: 123
  10.  
  11. SAMPLER FORTH                      Revised September 9, 1992
  12.  
  13. Suggestions from the Silicon Valley FIG meeting August 22, 1992.
  14. Additional comments by letter from Jerry Mueller on Aug 29, 1992  
  15.          
  16.                    -*|===========|*-
  17.  
  18.  
  19. Trying to persuade people to try Forth is psychological stuff. 
  20. Someone interested in learning Forth, needs a sampler Forth.  A
  21. simple, friendly stable, Forth system.  Most computer users know
  22. a word processor and may or may not know another language.  
  23.  
  24. Most of us are too involved inside Forth and haven't backed off
  25. and looked at Forth through non Forth eyes.  We need to keep in
  26. mind that the visitor is not worried about speed or using to much
  27. memory or being redundant or figuring out how to actually do
  28. something.  The following will make Forth acceptable to the
  29. general public.  It's goal is to be conventional.
  30.  
  31.  
  32. FLOATING POINT default with a toggle words called FLO and INT.  
  33.      The model is the simple pocket calculator.  Think of the
  34.      language Basic or a pocket calculator as the convention
  35.      people are used to.  Example: No F* fDUP or F/ etc.  Just
  36.      simple  *  /  +  -  in each mode.  Ideally the use off a
  37.      decimal point or comma will perform this toggle.
  38.  
  39.  
  40.                       RPN is controversial
  41.  
  42.   The RPN founders say:
  43.  
  44. RPN (Reverse polish notation) is retained as it is required for 
  45.      extensibility and the other solutions may be too complex or
  46.      have mixed mode problems.  RPN may be spoken of as "natural
  47.      math" and it's advantages can be explained later on in the
  48.      documentation.
  49.  
  50.   The RPN visionaries say:
  51.  
  52. A lot of people resist RPN.  A lot of people have the idea that
  53. HP calculators are all RPN.  HP went with the flow and changed -
  54. their newer calculators all have algebraic entry, with RPN as an
  55. option.  Provide two Forth words: ALG (for algebraic) and RPN. 
  56. Type ALG and you can type:
  57.  
  58. (5*6)+(4*5)/(2*5) 
  59.  
  60. The compiler then knows it should translate this first in to 
  61.  
  62. 5 6 * 4 5 *  +  2 5 *  \
  63.  
  64. and then compile it.  Type RPN and you simply go back to usual
  65. RPN entry.  This means that _(_  (paren) must always have a 
  66. following space as is the case now.  With out a following space
  67. it is a algebraic instruction and should not be used for comments
  68. etc.  We have  \   and \s  now a days as a better substitute in
  69. some cases.
  70.  
  71.  
  72. Sequential files with a toggle between .SEQ and .BLK files.  The
  73.      editor can read the file extension and do the right thing.
  74.  
  75. A simple interface.
  76.  
  77. Error resistance and compiler security.  Range checking for 
  78.      EXECUTE  ! "store", C!, MOVE, and CMOVE etc.
  79.  
  80. Lots of Examples.  Three examples per concept at a minimum.  
  81.      Three tested, working examples of a diverse nature, per
  82.      concept.  This is important.  This is the equal of hyper
  83.      text in that the student can go either of three ways to
  84.      check out his understanding.
  85.  
  86. Sound and color.
  87.  
  88. Quick feed back (this we have)
  89.  
  90. A full system with all the options already loaded.
  91.  
  92. DOCUMENTATION; Use the resources of the machine!  The compiler
  93. doesn't do anything with numbers above 127, so use control-C to
  94. toggle the high-order bits to 1 and all incoming bytes are 128 or
  95. above and are ignored by the compiler.  They can be used for
  96. comments.  On the screen they're dimmer; the printer outputs then
  97. as italics. I (Jerry Mueler) did all this a couple of years a go. 
  98. Type control-C again and you're back into normal forth input.
  99.  
  100. SO... a user could type FLO ALG SEQ at the forth prompt and be
  101. using floating point, algebraic and sequential.  Type FIX RPN SCR
  102. and you're a Forth purist.  Personally I don't care either way my
  103. self.
  104.  
  105. Will anything come of this?  Probably.  I think FIG people tend
  106. to get involved with their own particular Forth problems and
  107. haven't spent any time looking ahead in to the future.  Other non
  108. Forth programmers did, and now we have C libraries.  They may be
  109. unwieldy and time - consuming but they're what people want.  
  110.  
  111.  
  112.  
  113.  
  114. POWERFUL FEATURES that will help sell Forth.
  115.  
  116. A usable link to C libraries and other black boxes. 
  117.  
  118. The ability to run in background as an TSR.  Example call and run
  119. other .EXE files that do things, then terminate and run the next
  120. .EXE file.  Works like a batch file does when it uses KEY-FAKE. 
  121. It should also save data to a file for importing to another
  122. running application.
  123.  
  124. A trace function and a debugger called BUG  i.e. BUG <word> which
  125. will work the same as DBG does..
  126.  
  127. Typed values, Constants, and Variables were suggested at the
  128. meeting but Jerry says are we sure?
  129.  
  130. We need feed back and implementations.  If you have an idea, or
  131. opinion, write your self a note now, to call or write me.  If you
  132. don't foreword you're ideas it than you are holding things up.
  133.  
  134.