home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 4025 < prev    next >
Encoding:
Text File  |  1993-01-28  |  8.4 KB  |  182 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!ukma!darwin.sura.net!spool.mu.edu!torn!nott!uotcsi2!news
  3. From: cbbrowne@csi.uottawa.ca (Christopher Browne)
  4. Subject: Is Forth a "Real OS"? (Was re: Documentation)
  5. Message-ID: <1993Jan28.150017.413@csi.uottawa.ca>
  6. Sender: news@csi.uottawa.ca
  7. Nntp-Posting-Host: prgv
  8. Organization: Dept. of Computer Science, University of Ottawa
  9. References: <1993Jan22.105759.20424@Informatik.TU-Muenchen.DE> <C1JoxC.FuK@starnine.com> <1993Jan28.115710.12916@Informatik.TU-Muenchen.DE>
  10. Date: Thu, 28 Jan 93 15:00:17 GMT
  11. Lines: 169
  12.  
  13. In article <1993Jan28.115710.12916@Informatik.TU-Muenchen.DE> paysan@Informatik.TU-Muenchen.DE (Bernd Paysan) writes:
  14. >
  15. >I only want to pick out some lines of your long article:
  16.  
  17. Likewise...
  18. Minor comment:  Try to keep your line lengths to under 75 characters.
  19. If you don't, it makes followups very difficult to read.
  20.  
  21. >MH>No, under a normal OS, it's primitives are the right ones, and
  22. >MH>there is no reason to implement BLOCK because:
  23. >MH>
  24. >MH>   1. Many disk ops read/write MUCH less than 1024 bytes.
  25. >MH>   2. OS's provide their own block-style buffering and usually
  26. >MH>      in chunks less than 1024 bytes.
  27. >
  28. >Oups. Both my hard disk and my floppy works in chunks exactly 1 K (2b
  29. >depending on the size of the disk. My MS-DOS PC works with chunks of
  30. >1K for DD, and 512 bytes for HD floppies. The hard disk read in
  31. >chunks of 4K, because it is one partition of 105 MB and it can't be
  32. >less (8 sectors/cluster).
  33.  
  34. Which means that you can show an particular operating system for which
  35. Mike's assertion is NOT correct.  However, he wasn't saying that it
  36. was a UNIVERSAL fact, but merely that "many disk ops do less than 1K."
  37.  
  38. >But your second argument is exactly what I say: OS provide
  39. >block-style buffering at their low level disk I/O. The OS has to
  40. >implement block. And if you read chunks with block-size, the OS works
  41. >at best. Reading much less than 1K results 
  42. >in incredibly high overhead.
  43.  
  44. Is there an "incredibly high overhead"?  Precisely WHY is this the
  45. case?
  46.  
  47. If the OS reads in 1K of data, which may actually be how it does
  48. things at the hardware level, and a particular file only uses 75 bytes
  49. of that 1K, how does the performance differ from the situation where a
  50. BLOCK is used, and the only data referred to is in that 75 byte
  51. section of the block?
  52.  
  53. There may be "overhead", but it seems to me that it's overhead that
  54. doesn't really cost anything.
  55.  
  56. >MH>Whatever you bring your Forth or any other Forth up on, however it boots,
  57. >MH>whatever it does, it myopically only supports compiled Forth code.
  58. >
  59. >And the Church's thesis says: Then it supports everything else, too,
  60. >because you can do everything else once you can do it in Forth (or in
  61. >Turing machine). Forth is an universal language, and has good
  62. >performance, too (which Turing's machine hasn't).
  63.  
  64. Bogus use of theoretical argument:  OF COURSE, since Forth is a Turing
  65. machine equivalent, it can, in theory support any sort of computation.
  66.  
  67. However, theoretically supported computations are not the issue.  The
  68. issue is, can your bigForth system LOAD and EXECUTE programs that were
  69. written in OTHER languages, and compiled into binary executable form
  70. that your computer's operating system supports.
  71.  
  72. Can you load TOS/TTP programs from bigForth (which I gather runs on an
  73. Atari ST)?  THAT would be the first step in having language
  74. interoperability.  If, as well, you can pass parameters to the
  75. programs, that's the next step.
  76.  
  77. >MH>I feel strongly about this because it's one of the reasons Forth is
  78. >MH>so strongly rejected by professionals who KNOW operating systems,
  79. >MH>other languages, real-world uses for computers.  Loud
  80. >MH>claims that Forth is an operating system is dismissed as so
  81. >MH>much hype, and wisely so.
  82. >
  83.  
  84. >I KNOW about operating systems, other languages and real-world uses
  85. >for computers. And there are many computers that run only FORTH and
  86. >nothing else.  According to your words, they won't work, because they
  87. >have no OS, but only an interactive language running. How does it run,
  88. >without OS? 
  89.  
  90. They can run applications written in Forth, but probably can't do
  91. anything else.  Of course, they're probably embedded systems that may
  92. not have the same kind of I/O capabilities as a "general purpose
  93. computer", and thus have no NEED of any particular OS support.
  94.  
  95. >If you realy NEED a file system, why didn't everybody
  96. >implement it? And I'll give you a reference: There was an article in
  97. >the "Vierte Dimension", the german Forth magazine, I think in 1/89,
  98. >about "Block World", a unix-style file system implemented by using the
  99. >block interface. The implementation differs much from Unix, but the
  100. >functionality is about the same.
  101.  
  102. The only people that DIDN'T implement a file system are those that are
  103. "keeping the faith" about BLOCKs.
  104.  
  105. >To your claim about "tiny basic": As far as I know, tiny basic
  106. >implements all features of ANSI BASIC (which are few enough to call
  107. >it "tiny"). Tiny pascal is about the same: You can't compare it with
  108. >Turbo-Pascal, but it is Pascal. I think, tiny pascal is distributed
  109. >with F-PC or related to F-PC. 
  110.  
  111. If it can't be compared with Turbo Pascal, then what is the point to
  112. it?  If you can't take (say) Turbo Pascal programs and load them
  113. directly in, but rather have to rewrite them, then you might as well
  114. rewrite the whole application in Forth.
  115.  
  116. What people REALLY want is to not even need to CARE about whether
  117. there's a Pascal compiler, or whether the program was written in
  118. Pascal, or C, or Modula-2.  They want to be able to load the binary
  119. executable file.  On a system that actually DOES have an operating
  120. system, that's fairly straightforward.  Under TOS, the appropriate
  121. system call is pexec().
  122.  
  123. >MH>In my mind, the Forth community needs to spend more time figuring out how
  124. >MH>to get Forth to LIVE EASILY under real existing operating systems.
  125. >MH>Throw out blocks would be a good start.
  126. >
  127. >Why do you want to throw out blocks? bigFORTH, LMI Forth, JFORTH and
  128. >others live easily under real existing operating systems or
  129. >MS-DOESn't. There is no READLINE in many existing operating systems,
  130. >this is only a C/Forth/Pascal library function. So stream files with
  131. >line ends are no real parts of operating system.
  132.  
  133. "Not real parts"?  The operating system makes it extremely convenient
  134. to use stream files.  The BASIC LEVEL of operation in a stream is on
  135. the CHARACTER, which is most definitely not a LINE.  We're not talking
  136. about "line-based" systems, but on STREAM FILES.
  137.  
  138. >Just the other way round: Two years ago, here was a 370 compatible
  139. >mainframe from Siemens, running IBM's CMS/VMSP. This OS uses fixed
  140. >records for storing text files. Waste of space? Doesn't count. The
  141. >earlier versions of OS/370 allocated one cylinder for each file.
  142. >Hundrets of KB wasted. Very efficient for large files like data bases
  143. >or so.
  144.  
  145. That's ONE example of extreme wastage of disk space.  On a computer
  146. from the "enormous mainframe" family that appears to be waning, due to
  147. the increasing power and efficiency of smaller machines.
  148.  
  149. >MH>It'll make a difference when you fill that 50MB up.  Then the 50%
  150. >MH>of space wasted in those BLOCKS will seem more important.
  151. >
  152. >The rest of my 50 MB are filled up with text files, binaries and
  153. >stuff like this.
  154.  
  155. That's an answer?!?
  156.  
  157. Once your 50 MB is filled, and you find that you have to either
  158. a) Delete files,
  159. b) Find some way of making more efficient use of the 50 MB, or
  160. c) Stop work, because you're out of space,
  161. the wastage on BLOCKS will seem more important.
  162.  
  163. >MH>This is the kind of attitude that the "progressives" in this
  164. >MH>newsgroup mention often... justification of why the "waste" of BLOCKS
  165. >MH>is not important, or why it's OK for Forth source to be in a format
  166. >MH>that is completely alien to the host OS.  Rationalization run rampant.
  167.  
  168. >Block files aren't completely alien to the host OS. Only native blocks
  169. >without files are alien. Conversion is stupid simple. If you don't
  170. >like blocks, throw them out in your Forth. I don't want my costomers
  171. >run away, if I do so. I don't want my applications to stop run. 
  172.  
  173. Block files are a relatively alien concept to PROGRAMMERS.  They're a
  174. stumbling block that makes programmers say "Forth?  It can't even
  175. interface with modern computer systems.  Hardly a modern language."
  176.  
  177. -- 
  178. Christopher Browne                |     PGP 2.0 key available
  179. cbbrowne@csi.uottawa.ca           |======================================
  180. University of Ottawa              | Genius may have its limitations, but
  181. Master of System Science Program  | stupidity is not thus handicapped.
  182.