home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / forth / 3762 < prev    next >
Encoding:
Text File  |  1993-01-04  |  7.4 KB  |  185 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!starnine!mikeh
  3. From: mikeh@starnine.com (Mike Haas)
  4. Subject: Re: Documenting
  5. Message-ID: <C0CvAB.Cx8@starnine.com>
  6. Sender: mikeh@starnine.com (Mike Haas)
  7. Date: Tue, 5 Jan 1993 00:42:10 GMT
  8. References: <4226.UUL1.3#5129@willett.pgh.pa.us>
  9. Organization: StarNine Technologies, Inc.
  10. Lines: 173
  11.  
  12. Believe it or not, I don't want to start another screens-vs-text files
  13. flame war, but I get a little frustrated when I see people both moaning
  14. "Why isn't Forth more popular" and others arguing "screens are great!".
  15.  
  16.  I really wasn't going to post anymore on this topic, but Brian's post
  17.  below was something I couldn't resist because many of the "desirable"
  18.  things he sez SHOULD be included in screen editors by vendors can be
  19.  done with JForth on the Amiga with the supplied TEXTRA editor, a
  20.  GUI-based text editor that uses the Amiga ARexx system to communicate
  21.  with JForth.
  22.  
  23.  To be more specific...
  24.  
  25. In article <4226.UUL1.3#5129@willett.pgh.pa.us> ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) writes:
  26. >Category 3,  Topic 3
  27. >Message 17        Fri Jan 01, 1993
  28. >B.DUNN5 [Brian]              at 23:09 EST
  29. > A decent file text editor would allow a single keypress which would
  30. > backup the cursor to the start of the current definition ( back until
  31. > finding a line with a non-whitespace character in the first column ),
  32. > start loading at that cursor position, and when a new word is
  33. > defined, any previous definition with the same name would be patched to
  34. > call the new definition.  The load would then stop after the new word has
  35. > been defined.  The result is a single key redefinition of one word without
  36. > loading anything before or after.
  37.  
  38. TEXTRA allows any sub-section of a file to be interpreted (or compiled)
  39. by dragging the mouse over the text to be processed.  Once it is
  40. "selected" in this way, a single key press sends the text to the
  41. JForth interpreter.
  42.  
  43. >
  44. > > I don't care how cool a Forth SCREEN editor you have... there are
  45. > > much better ones for text files.
  46. >
  47. > Every vendor should provide a spiffy editor built with and interacting with
  48. > Forth, regardless of screens or files.  It can be more useful than calling
  49. > an external editor from Forth via the operating system.  When it is
  50. > built in, you can do single definition reloads, 
  51.  
  52. As described above, You can do this with TEXTRA and JForth (or
  53. reload two or THREE definitions... it's up to you).
  54.  
  55. >word by word execution,
  56.  
  57. Also do-able from the TEXTRA editor.
  58.  
  59. > useful interaction with a Forth terminal program, 
  60.  
  61. Using the Amiga's AREXX facility, you could have TEXTRA, JForth and
  62. an ARexx-compatible Amiga terminal program ALL WORKING TOGETHER (or ANY
  63. ARexx-compatible application :-)
  64.  
  65. >have multiple copies
  66. > executing at a time,
  67.  
  68. TEXTRA allows you to have any number of text files open at one time...
  69. puts each in their own window.
  70.  
  71. >and all usually with much less memory, time, and
  72. > operating system overhead.
  73.  
  74. As I have 6 Meg and a 25Mhz 68030 in my Amiga, no problem.
  75.  
  76. > > I hope I never again have to wind my way trough something like...
  77. > > 5 LOAD 8 LOAD 23 LOAD 100 110 THRU 56 LOAD 13 LOAD etc. etc. etc
  78. >
  79. > A good screen oriented system will often have some kind of directory.  The
  80. > above could become:
  81. >   dload editor   dload terminal   dload extensions   dload decompiler
  82.  
  83. JForth allows you to INCLUDE text files.  The above becomes...
  84.  
  85. INCLUDE editor  INCLUDE terminal  INCLUDE extensions  INCLUDE decompiler
  86.  
  87. ...IF you have files of those names.  (In other words, it uses the
  88. native file system as the "directory"... why re-invent the wheel
  89. when every platform has a file system?)
  90.  
  91. Also, JForth even allows you to conditionally compile a given file
  92. if needed.  For example...
  93.  
  94.    INCLUDE? SQUARE MY-MATH-UTILS
  95.  
  96. ...will only compile the file MY-MATH-UTILS if the word SQUARE
  97. can't be found in the dictionary.
  98.  
  99. >
  100. > It is possible to build a pseudo-file interface over a blocks system, with
  101. > block allocation tables and filenames.  Each file would really be a set of
  102. > physical blocks organized into a virtual sequence starting from virtual
  103. > block 0.  You would have fileIDs and tables to map virtual to physical.
  104. > To carry the concept out a little more, you could have the file be one
  105. > big block 64 characters wide and of unlimited number of lines.  The editor
  106. > would scroll through the entire file without 16 line page breaks.
  107.  
  108. I did this for the last screen-based system I built (about 8 years ago).
  109. It was the only way I found to get major work done, reliably backup
  110. source, share source.  I had 2 5 Meg cartridge hard disks on that machine
  111. and it was next to IMPOSSIBLE to manage 10,000 screens by number!
  112.  
  113. It WAS great!  FInally, I could copy files, maintain separate directories,
  114. keep file creation & modification dates, USE FILENAMES!!!  I can't express
  115. enough how much more USEABLE that system was after adding a file system.
  116.  
  117. >
  118. > Imagine an editor or terminal program built with Forth, where you may
  119. > define a function key to fire off a definition you provide, with all the
  120. > power of Forth available for that action, plus access to common editor and
  121. > terminal functions.
  122.  
  123. TEXTRA has programmable function keeys that can be set up to
  124. launch it's own script files, send any message to any running
  125. Amiga program (including JForth), basically kick off anything
  126. you want.
  127.  
  128.  
  129. >This was put to very effective use with
  130. > an online starship game, where the other guys were using their simple
  131. > terminal macros to automatically raise shields and fire weapons, whereas
  132. > a single keypress on my own machine fired off little a Forth program which
  133. > automatically raised shields, launched decoys, started a sequence of
  134. > defensive maneuvers, scanned for the enemy, parsed their direction and
  135. > range from the input stream, immediatly selected and fired the
  136. > appropriate weapons for that range, monitored damage, and hit jammers and
  137. > dropped mines when it was time to bug out and run.  The response time,
  138. > parsing of useful information, and decisionmaking based on that information
  139. > made it the ultimate macro game program.  All using a simple built in
  140. > terminal which could fire off real Forth words from its function keys, with
  141. > access to useful functions provided for later use.  The same works with
  142. > an editor.
  143.  
  144. Sounds really cool, but none of it requires a built-in editor with
  145. screen files.
  146.  
  147. Text editors are no longer closed, canned programs.  They enjoy the
  148. trends of the industry in the last 20 years toward open systems,
  149. and can interface to many various and sundry entities.
  150.  
  151. TEXTRA's interface to JForth needs to be seen to be appreciated.
  152. Even when you've pressed that single key, telling JForth to
  153. compile the current file, if an error occurs, JForth tells TEXTRA
  154. the file line number, and the editor highlights that line and
  155. puts up an error message.
  156.  
  157. TEXTRA v1.11 is provided free with JForth.  It is a freeware program
  158. that can be passed around and used for general text uses, like letters,
  159. book reports, etc.
  160.  
  161. In the latest TEXTRA package (v1.13), there is now the capability
  162. to interface with the HSPascal compiler, replacing their own
  163. integrated text editor.
  164.  
  165. TEXTRA is written in JForth, and is a standalone, CLONEd program.
  166.  
  167. I guess this post has turned into another shameless plug.
  168. Sorry, but it really did apply to the matter at hand.
  169.  
  170. For info about JForth, contact...
  171.  
  172.    Delta Research
  173.    P.O. Box 151051
  174.    San Rafael, CA. 94915-1051
  175.    (415) 461-1442
  176.  
  177.    direct e-mail to:
  178.  
  179.    mikeh@starnine.com   OR
  180.    phil@ntg.com
  181.  
  182. If you read this far, thanks.
  183.