Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!lll-winken!iggy.GW.Vitalink.COM!widener!ukma!psuvax1!news From: flee@cs.psu.edu (Felix Lee) Newsgroups: comp.os.misc Subject: Re: UNIX vs. the world (again) Message-ID: Date: 23 Jun 91 03:20:43 GMT References: <25791@lanl.gov> <1991Jun16.184815.17898@kithrup.COM> <25855@lanl.gov> <1991Jun20.104642.27164@colorado.edu> <26207@lanl.gov> <1991Jun22.092931.8341@metapro.DIALix.oz.au> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 46 Nntp-Posting-Host: dictionopolis.cs.psu.edu >What's so complicated about "cat" for example, that requires careful >crafting? Well, first there's the basic issue of whether cat should have any options. SunOS has two cats with five and seven options. Research Unix (tenth edition) has a cat with no options---rather than saying things like "cat -v" you use a different command like "vis" (which also has no options). What happens if you say "cat a > a" or "cat a >> a"? Does "cat -s" squeeze blank but non-empty lines? Does "cat -v" understand locale and language? Should you be able to undo "cat -v" with an inverse tool? Should the filename "-" mean standard input or is /dev/fd/0 sufficient? Does cat buffer I/O? Should cat use mmap()? How much of a file should it mmap() at a time? Does cat preserve record and block boundaries? Can you say "cat /dev/tape1 > /dev/tape2" to copy a tape? How about "cat /dev/disk1 > /dev/disk2"? Should cat use a pool of buffers when reading or writing to slow devices? >What more can you expect of a pipe than to allow data to flow from >one point to another. Pipes are terrible for communicating structured data. Perhaps rather than streams of bytes, programs should be passing streams of ASN.1. Pipes are terrible for communicating large amounts of data. If I have a large structure I need to send perhaps I'd stuff it in its own segment, attach a capability, and pass the capability around. >UNIX is more of a theology than product. :-) Quite. Which sect do you belong to? -- Felix Lee flee@cs.psu.edu