home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / msdos / programm / 11566 < prev    next >
Encoding:
Text File  |  1992-12-22  |  6.0 KB  |  127 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!uunet.ca!ohrd!twriter
  3. From: twriter@rd.hydro.on.ca (Timothy Writer)
  4. Subject: Re: Normal MSDOS multitasking!
  5. Message-ID: <1992Dec22.003509.8929@rd.hydro.on.ca>
  6. Reply-To: twriter@rd.hydro.on.ca
  7. Organization: "Ontario Hydro - Research Division"
  8. References: <1ghb1vINNccb@ub.d.umn.edu> <9212142475@fcshome.UUCP> <dmurdoch.363.724430472@mast.queensu.ca> <1992Dec15.202449.28162@rd.hydro.on.ca> <dmurdoch.365.724454682@mast.queensu.ca>
  9. Date: Tue, 22 Dec 92 00:35:09 GMT
  10. Lines: 115
  11.  
  12. dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
  13.  
  14. >In article <1992Dec15.202449.28162@rd.hydro.on.ca> twriter@rd.hydro.on.ca (Timothy Writer) writes:
  15. >>>The number of times where it really matters whether two programs are run 
  16. >>>concurrently at half speed or sequentially at full speed is so tiny, that I 
  17. >>>doubt if it's on anybody's "10 most important projects" list.
  18. >>
  19. >>Can you support that statement?  I doubt it.  It may be true for DOS
  20. >>users because they have never had the option but I don't think it's true
  21. >>for the wider user community.  Consider the following (UNIX commands):
  22. >>
  23. >>    cc -E program.c | more
  24. >>
  25. >>I use this to view the result of running the C preprocessor on my
  26. >>program when I suspect a problem with a complex macro.  I don't want to
  27. >>wait for the first command to complete before I can view the results.
  28.  
  29. >I don't deny that there are some cases where there's a difference.  But 
  30. >how often do you really have problems with complex macros?  If it's as 
  31. >often as once a week, I'd suggest that you're doing something wrong.
  32.  
  33. You missed the point.  My programming skill (or possible lack thereof)
  34. is not the issue.  The issue is:  Are (UNIX style) pipelines, where each
  35. program (process) in the pipeline runs concurrently, a useful device in
  36. ANY operating system/environment be it DOS, Windows, Desqview, VMS, CICS
  37. or (heaven forbid ;-) a UNIX derivative?  Without providing examples or
  38. an argument to support your assertion, you stated that they are rarely
  39. useful.  That is your opinion and you are entitled to it.  However, I
  40. have a different opinion.  Consequently, I provided several simple
  41. examples supporting my assertion that pipelines are useful.  I chose
  42. simple examples to illustrate my point so that others who may be
  43. unfamiliar with UNIX style pipelines would understand.  The fact that
  44. you (or I for that matter) may not actually use one of these specific
  45. examples on a daily basis does not refute my argument.  Although I did
  46.  
  47. >>    man cc | more
  48. >>
  49. >>Suppose I just want to check the syntax of a particular option for the C
  50. >>compiler.  The most common options are documented at the beginning (for
  51. >>obvious reasons) so I don't want to wait for the entire manual page to
  52. >>be formatted first.  In fact, if I quit once I've found what I'm looking
  53. >>for, man cc never runs to completeion!  This may not matter to me much
  54. >>but it may matter to other users who are sharing the CPU with me.
  55.  
  56. >Under DOS, nobody is sharing the CPU with you.  Under DOS, the weird idea 
  57. >that you should pass a manual page through a text formatter every time you 
  58. >want to look at it never caught on; help systems keep their text in a format 
  59. >that's convenient to display.
  60.  
  61. True, under *DOS* nobody is sharing the CPU with you.  However, under
  62. Windows or Desqview you maybe sharing the CPU with yourself!  For
  63. example, you may have a huge compile running in the background while you
  64. do some other useful work.  Or perhaps you have a long running numerical
  65. application also running in the background.  Do you want to steal CPU
  66. cycles from your own background jobs?
  67.  
  68. I don't buy your second point either.  First, man is not a text
  69. formatter.  It may pass your manual page through a text formatter if it
  70. is not already preformatted; however, most systems now store manual
  71. pages in compressed, formatted form.  Every time you want to look at
  72. them you do have to uncompress them.  What's wrong with that?  Furthermore,
  73. some sites prefer to install unformatted manual pages because they use
  74. less disk space.  This is just another form or compression with the
  75. added benefit that they can easily be formatted for a variety of output
  76. devices including terminals, line printers, laser printers, and
  77. bitmapped displays.
  78.  
  79. >>zcat huge.tar.Z | tar tvf - | grep 'foo*.c'
  80. >>
  81. >>Here I'm just looking for some files matching a pattern in a LARGE
  82. >>compressed archive.  Do you really want to uncompress and list the
  83. >>entire contents of the archive?  What if you don't have the disk space
  84. >>for the entire archive?
  85.  
  86. >Under DOS, there are lots of programs available to search the text contained 
  87. >in archives without uncompressing them, and every archive program that I've 
  88.  
  89. These (and others) are available for UNIX too.  What's your point?
  90.  
  91. >ever seen will list the filenames without uncompressing the archive.  For 
  92. >example, I'd probably run
  93.  
  94. >  pkunzip -v huge foo*.c
  95.  
  96. That won't work very well on a compressed tar archive!  Oh, I get it,
  97. I'm supposed to have a zip file.  But I don't have a zip file, I have a
  98. tar archive.
  99.  
  100. The purpose of the example was to illustrate the utility of a pipeline
  101. not the merits of tar and compress.
  102.  
  103. >to do what you did above.  The idea that you have to uncompress 
  104. >anything at all just to see the filenames strikes me as a very bad design.
  105.  
  106. So on an individual basis, you didn't like any of my examples.  You
  107. weren't supposed to consider them on an individual basis you were
  108. supposed to look at the whole and say, 'Just maybe he's right, maybe
  109. pipes are useful, too bad DOS or Windows doesn't have them'.  Instead
  110. you chose to nitpick example by example.  I could cite 100 more examples
  111. but I suppose you would just nitpick those too.
  112.  
  113. Here's another argument for pipes.  Have you ever written a program
  114. where you wanted the output of some system command, DIR for example?
  115. Of course you can use a temporary file but what if there's not enough
  116. disk space?  Why not use a pipe instead?
  117.  
  118. Tim
  119.  
  120. >Duncan Murdoch
  121. >dmurdoch@mast.queensu.ca
  122. -- 
  123. Tim Writer                 phone:  (416) 231-4111 ext. 6990
  124. Ontario Hydro Research Division         fax:    (416) 237-9285
  125. Toronto, Ontario             e-mail: twriter@rd.hydro.on.ca
  126. CANADA
  127.