Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: iso646.h Date: Thu, 01 Feb 2024 05:24:50 -0800 Organization: A noiseless patient Spider Lines: 89 Message-ID: <86jzno9v19.fsf@linuxsc.com> References: <87jznu1c4v.fsf@nosuchdomain.example.com> <86zfwnc34o.fsf@linuxsc.com> <86il3bb7rb.fsf@linuxsc.com> <865xzaas3m.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="e0e985b0c186ff2246e59878011e515e"; logging-data="2198413"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Nl38Hp+yTZUpCxYv1OtO+4vrYhm+c6ek=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:sDcu8yTcdu+odxHyKpsGVfkzuSA= sha1:GcNoj1ACvOk+3aojXWXB222KnAY= Xref: csiph.com comp.lang.c:381458 Malcolm McLean writes: > On 31/01/2024 07:18, Tim Rentsch wrote: > >> Malcolm McLean writes: >> >>> On 30/01/2024 07:27, Tim Rentsch wrote: >>> >>>> Malcolm McLean writes: >>>> >>>>> On 29/01/2024 20:10, Tim Rentsch wrote: >>>>> >>>>>> Malcolm McLean writes: >>>>>> >>>>>> [...] >>>>>> >>>>>>> I've never used standard output for binary data. >>>>>>> [...] it strikes me as a poor design decision. >>>>>> >>>>>> How so? >>>>> >>>>> Because the output can't be inspected by humans, and because it might >>>>> have unusual effects if passed though systems designed to handle >>>>> human-readable text. For instance in some systems designed to receive >>>>> ASCII text, there is no distinction between the nul byte and "waiting >>>>> for next data byte". Obviously this will cause difficuties if the data >>>>> is binary. >>>>> Also many binary formats can't easily be extended, so you can pass one >>>>> image and that's all. While it is possible to devise a text format >>>>> which is similar, in practice text formats usually have enough >>>>> redundancy to be easily extended. >>>>> >>>>> So it's harder to correct errors, more prone to errors, and harder to >>>>> extend. >>>> >>>> Your reasoning is all gobbledygook. Your comments reflect only >>>> limitations in your thinking, not any essential truth about using >>>> standard out for binary data. >>> >>> I must admit that it's nothing I have ever done or considered doing. >>> >>> [...] >> >> Simple example (disclaimer: not tested): >> >> ssh foo 'cd blah ; tar -cf - . | gzip -c' | \ >> (mkdir foo.blah ; cd foo.blah ; gunzip -c | tar -xf -) >> >> Of the five main programs in this command, four are using >> standard out to send binary data: >> >> tar -cf - . >> gzip -c >> ssh foo [...] >> gunzip -c >> >> The tar -xf - at the end reads binary data on standard in >> but doesn't output any (or anything else for that matter). >> >> It is FAR more cumbersome to accomplish what this command >> is doing without sending binary data through standard out. >> Anyone who doesn't understand this doesn't understand Unix. > > Yes. I don't do that sort of thing. > While I have used Unix, it is as a platform for interactive programs > which work on graohics, or a general C compilation environment. I > don;t build pipeliens to do that sort of data processing. If I had to > download a tar file I'd either use a graphical tool or type serveal > commands into the shell, each launching single executable, > interactively. > > The reason is that I'd only run the command once, and it's so likely > that there will be either a syntax misunderstanding or a typing error > that I'd have to test to ensure that it was right. And by the time > you've done that any time saved by typing only one commandline is > lost. Of course if you are writing scripts then that doesn't > apply. But now it's effectively a programming language, and, from the > example code, a very poorly designed one which is cryptic and fussy > and liable to be hard to maintain. So it's better to use a language > like Perl to achieve the same thing, and I did have a few Perl scripts > handy for repetitive jobs of that nature in my Unix days. > > You admit this with "not tested". Says it all. '"Understandig Unix" is > an intellectually useless achievement. You might have to do it if you > have to use the system and debug and trouble shoot. But it's nothing > to be proud about. You're an idiot. As usual trying to have a useful discussion with you has turned out to be a complete waste of time.