home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 3957 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  7.1 KB

  1. Path: sparky!uunet!noc.near.net!transfer.stratus.com!sw.stratus.com!nick
  2. From: nick@sw.stratus.com (Nicolas Tamburri)
  3. Newsgroups: comp.lang.forth
  4. Subject: Re: Documenting
  5. Date: 22 Jan 1993 16:04:17 GMT
  6. Organization: Stratus Computer, Inc.
  7. Lines: 123
  8. Distribution: world
  9. Message-ID: <1jp5u1INNsam@transfer.stratus.com>
  10. References: <1492@eouk9.eoe.co.uk> <C0ry23.8Dy@starnine.com> <1993Jan14.122149.16814@Informatik.TU-Muenchen.DE> <C18CFv.GtA@starnine.com> <1993Jan22.105759.20424@Informatik.TU-Muenchen.DE>
  11. NNTP-Posting-Host: kyron.sw.stratus.com
  12.  
  13. Bernd Paysan writes:
  14. > MH>Only Forth code is "hosted".  Forth is not an operating system.
  15. > Forth + tiny Basic HOSTS basic. You can do SAVESYSTEM or save tiny basic
  16. > as an binary application....
  17. >
  18. > ...
  19. >
  20. > me>Some Forths even have ways to save applications
  21. > me>as binary and reload them very fast (i.e. my bigFORTH). These Forths even
  22. > me>provide something an Unix would call "Shared Libraries". A host of Forths
  23. > me>provide multiuser abilities.
  24. > MH>It is still a Forth-only environment... NOT an operating system.
  25. > Stop with this. Repeating it makes it not more true. You can load Tiny
  26. > Pascal (I didn't port it, so you have actually some work to do), and then
  27. > you can compile pascal programs and save them as binaries. You can start 
  28. > them up, they will link at load time (just as MS Windows' dynamic linking) 
  29. > and they will run. The parameter passing to system routines is a bit 
  30. > different from other Pascal compilers, but that's not the point. The 
  31. > feature of saving part of the application as binary and reload it later is 
  32. > not uniq to my bigFORTH. To the common definition, bigFORTH is just as 
  33. > much an operating system as Unix. Unix is NOT a C-only OS, although you 
  34. > have to use much of the C environment to start up any program (either C 
  35. > hosted or with the C linker /bin/ld linked).
  36. > ...
  37. > The nonexistence of C compilers or so for bigFORTH has it's reason because
  38. > bigFORTH isn't a very widespread OS and none of my user needs C programs
  39. > hosted by bigFORTH :-).
  40.  
  41. I think we have to get our definitions straight here.  Just because someone (you) has
  42. written a language in Forth to run under Forth, does not put your Forth in the same
  43. league as Unix or even MSDOS.  It is fine to have tiny pascal generate binaries which
  44. can then be linked and run by an external OS as a regular application, external to the
  45. Forth that ran the compiler.  It is great that some Forths save applications and data
  46. as binaries to be read in later without re-interpretation.  Neither of these make the
  47. originating Forth an OS.  The trick is to be able to read and run binaries generated by
  48. external source, and unless I'm mis-interpreting you, bigForth, (nor any other Forth
  49. I've ever heard of,) does this.  If you have this feature, then you do not need a C
  50. compiler for bigForth,  you would be able to run the GNU C (or any other,) compiler
  51. binary as a process under bigForth, and bigForth would have to provide that process with
  52. its memory management, I/O management etc.  You publish the binary interface, or (even
  53. better,) use an exiting one, and promise to provide the services needed by any
  54. application which complies with that interface.  That is what an operating system
  55. provides (even MSDOS,) not simply a promise to compile, save and read back any
  56. program written in a particular language.
  57.  
  58. One can fake some things out:  If your Forth does not run native on a platform,
  59. you may be able to spawn other tools from Forth and let the host OS provide those
  60. services.  In this case, Forth becomes a SHELL (and a powerful one too!) but still
  61. is not an OS.
  62.  
  63. You are correct:  Repeating a truth does not make it more true, it merely reinforces
  64. it. Your naming applications that run under bigFORTH does not make it false either.
  65.  
  66. > MH>Just go the next logical step and throw away the BLOCK layer.  There's
  67. > MH>no reason for it on file-based platforms, and it's continuance
  68. > MH>hurts Forth.
  69. > I have some applications using the BLOCK layer, including the ability to
  70. > read stream files. If I cut out the BLOCK layer, no file interface will
  71. > work. BLOCKs are the right primitive to implement any sort of disk I/O.
  72. > You OS uses blocks, too. Cut it out and try to work ;-).
  73.  
  74. Do you have a seperate partition for running bigFORTH, or do you do the typical
  75. Forth blocks on top of OS files on top of SCSI blocks?  Doesn't the latter seem a
  76. little inefficient to you?
  77.  
  78. > MH>It not only saves a tremendous amount of disk space over blocks, but
  79. > MH>is still in a format that is interpretable...you don't have to
  80. > MH>PKUNZIP it first.
  81. > I've a 50 MB hard disk. du F:\bigforth gives about 5 MB. This is not
  82. > tremendous - one third of this are binaries, GEM resources, dupes and
  83. > old projects. Forth sources are so compact, if in screens or streams,
  84. > wasting 50% of the space doesn't matter much - projects are still much
  85. > shorter than C sources.
  86.  
  87. Wasting 50% of disk doesn't matter much...  So much for pushing Forth efficiency
  88. in this area.
  89.  
  90. In this are your 'projects' start off with a 50% handicap in relation to a C
  91. project before you even begin the design.  But that doesn't matter, and is
  92. an arbitrary measurement;  I've C programs which are probably compact enough to
  93. challange your claim, and I don't mind wasting  disk space to make program source
  94. more readable.  You however are wasting it period.  The line between paragraphs of
  95. this message costs (at most,) 2 bytes.  If these were screens, a blank line costs
  96. 64 bytes.  What you're really handicapping is the block side of this debate.
  97. I consider the 50% disk space utilization caused by blocks unacceptable.
  98. (Obviously you disagree, and I accept that you find the cost/benefit ratio of that
  99. waste worth it for you.  I don't have an argument with that, and at least you admit
  100. that there is waste.)
  101.  
  102. > But tell me: why do screens hurt Forth if you can use stream files if you
  103. > want? The most unpopular feature of Forth is the postfix notation. Why
  104. > don't you start a flame war against this :-). It's realy not difficult to
  105. > build an infix compiler for Forth (2 screens - or 32 lines, if you like
  106. > that more :-).
  107. > -- 
  108. > Bernd Paysan
  109. > "Late answers are wrong answers!"
  110.  
  111. Screens do not hurt Forth if files are available.  What has fanned these flames are
  112. those who advocate that block are the only way to go, and stream files are an
  113. abomination to Forth.  (Although I believe it was MH who set fire to it all with
  114. an incindiary message about how screens should go the way of the dinosaur.
  115. Apologies beforehand if I'm wrong Mike.)
  116.  
  117. I tend to come down on Mike's side, and believe all new-comers should be steered
  118. toward file usage, to introduce Forth as a language which can co-exist with their
  119. existing environment and tools, rather than as a language which requires that
  120. everything be done its way.  I don't believe blocks will make new-comers better
  121. factorers, and I don't believe that files will make them write 2000 line word
  122. definitions.  I believe that Forth is an incredibly liberating language.  Making
  123. users conform their source to 64 character lines does not fit in with that
  124. philosophy.  It's right up there with making all FORTRAN source start on
  125. the 6th column of each line.
  126.  
  127.                                 /nt
  128.