* Re: [TUHS] The UNIX Command Language (1976) [not found] <CAKH6PiWA2uN4m0AGp7VRJTQ6XXDLJQweHoHjx2wN=zQYs1onpA@mail.gmail.com> @ 2020-12-03 20:31 ` M Douglas McIlroy 2020-12-03 20:37 ` Niklas Karlsson 0 siblings, 1 reply; 64+ messages in thread From: M Douglas McIlroy @ 2020-12-03 20:31 UTC (permalink / raw) To: tuhs There's a back story. The paper appears in the proceedings of a conference held in London in 1973, a few months after the advent of pipes. While preparing the presentation, Ken was inspired to invent and install the pipe operator. His talk wouldn't have been nearly as compelling had it been expressed in the original pipeline syntax (for which I take the blame). References to eqn (v5), bc (v6), and ratfor (v7) obviously postdate the London conference. Ken must have edited--or re-created--the transcript for the proceedings sometime after v6 (May, 1975). Bibliographic citations are missing. Can they be resurrected? Reference 137, about Unix itself, probably refers to a presentation by Ken and Dennis at SOSP in January1973. Alas, only an abstract of the talk appears in the conference proceedings. But the abstract does contain the potent and often-repeated sentence, "It offers a number of features seldom found even in larger operating systems, including ... inter-process IO ..." The talk--in Yorktown Heights--was memorable, and so was a ride to the same place in Ken's 'vette. (I can't recall whether the two happened on the same occasion.) Given that the talk at SOSP preceded the talk in London, and that the Unix manual was widely distributed by (1976) when the revised London talk was printed, the claim that "The Unix command language" was the first publication of Unix seems hyperbolic. In no way, though, does this detract from the inherent interest of the paper. Doug ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:31 ` [TUHS] The UNIX Command Language (1976) M Douglas McIlroy @ 2020-12-03 20:37 ` Niklas Karlsson 2020-12-03 20:43 ` Larry McVoy 2020-12-03 20:51 ` M Douglas McIlroy 0 siblings, 2 replies; 64+ messages in thread From: Niklas Karlsson @ 2020-12-03 20:37 UTC (permalink / raw) To: M Douglas McIlroy; +Cc: tuhs [-- Attachment #1: Type: text/plain, Size: 682 bytes --] Den tors 3 dec. 2020 kl 21:32 skrev M Douglas McIlroy < m.douglas.mcilroy@dartmouth.edu>: > There's a back story. The paper appears in the proceedings of a > conference held in London in 1973, a few months after the advent of > pipes. While preparing the presentation, Ken was inspired to invent > and install the pipe operator. His talk wouldn't have been nearly as > compelling had it been expressed in the original pipeline syntax (for > which I take the blame). > Now I'm curious. Is there anywhere I can read about the original pipeline syntax? I tried searching a bit, but the only mention that was even vaguely informative only stated that > was involved. Thanks! Niklas [-- Attachment #2: Type: text/html, Size: 1062 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:37 ` Niklas Karlsson @ 2020-12-03 20:43 ` Larry McVoy 2020-12-03 20:56 ` Ralph Corderoy ` (3 more replies) 2020-12-03 20:51 ` M Douglas McIlroy 1 sibling, 4 replies; 64+ messages in thread From: Larry McVoy @ 2020-12-03 20:43 UTC (permalink / raw) To: Niklas Karlsson; +Cc: tuhs On Thu, Dec 03, 2020 at 09:37:17PM +0100, Niklas Karlsson wrote: > Den tors 3 dec. 2020 kl 21:32 skrev M Douglas McIlroy < > m.douglas.mcilroy@dartmouth.edu>: > > > There's a back story. The paper appears in the proceedings of a > > conference held in London in 1973, a few months after the advent of > > pipes. While preparing the presentation, Ken was inspired to invent > > and install the pipe operator. His talk wouldn't have been nearly as > > compelling had it been expressed in the original pipeline syntax (for > > which I take the blame). > > > > Now I'm curious. Is there anywhere I can read about the original pipeline > syntax? I tried searching a bit, but the only mention that was even vaguely > informative only stated that > was involved. Wasn't there a version that was cat whatever ^ wc -l ? ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:43 ` Larry McVoy @ 2020-12-03 20:56 ` Ralph Corderoy 2020-12-03 21:01 ` Ben Walton ` (2 subsequent siblings) 3 siblings, 0 replies; 64+ messages in thread From: Ralph Corderoy @ 2020-12-03 20:56 UTC (permalink / raw) To: tuhs Hi Larry, > Wasn't there a version that was > > cat whatever ^ wc -l It existed for quite a while in Bourne's shell even when | came along and was useful when the keyboard didn't have a | keycap or, more likely, when it was a modern machine with the capability of mapping keys which had a poor mapping with no | available. -- Cheers, Ralph. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:43 ` Larry McVoy 2020-12-03 20:56 ` Ralph Corderoy @ 2020-12-03 21:01 ` Ben Walton 2020-12-03 21:12 ` Clem Cole 2020-12-04 0:29 ` Dave Horsfall 3 siblings, 0 replies; 64+ messages in thread From: Ben Walton @ 2020-12-03 21:01 UTC (permalink / raw) To: Larry McVoy; +Cc: tuhs [-- Attachment #1: Type: text/plain, Size: 1208 bytes --] On Thu 3 Dec 2020, 20:43 Larry McVoy, <lm@mcvoy.com> wrote: > On Thu, Dec 03, 2020 at 09:37:17PM +0100, Niklas Karlsson wrote: > > Den tors 3 dec. 2020 kl 21:32 skrev M Douglas McIlroy < > > m.douglas.mcilroy@dartmouth.edu>: > > > > > There's a back story. The paper appears in the proceedings of a > > > conference held in London in 1973, a few months after the advent of > > > pipes. While preparing the presentation, Ken was inspired to invent > > > and install the pipe operator. His talk wouldn't have been nearly as > > > compelling had it been expressed in the original pipeline syntax (for > > > which I take the blame). > > > > > > > Now I'm curious. Is there anywhere I can read about the original pipeline > > syntax? I tried searching a bit, but the only mention that was even > vaguely > > informative only stated that > was involved. > > Wasn't there a version that was > > cat whatever ^ wc -l > > ? > Yes, that's it. And you'll still find[1] that /bin/sh on (at least?) Solaris honors that syntax. That's one reason why the git test suite fails on Solaris without being pushed to use a modern shell implementation. Thanks -Ben [1] At least up to Solaris 10. I've not used newer. [-- Attachment #2: Type: text/html, Size: 1940 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:43 ` Larry McVoy 2020-12-03 20:56 ` Ralph Corderoy 2020-12-03 21:01 ` Ben Walton @ 2020-12-03 21:12 ` Clem Cole 2020-12-04 0:29 ` Dave Horsfall 3 siblings, 0 replies; 64+ messages in thread From: Clem Cole @ 2020-12-03 21:12 UTC (permalink / raw) To: Larry McVoy; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 1243 bytes --] Yup early shell's equated ^ and | The problem was while the Model - 33, post 1965 could print a vertical bar, as note 2 of page three of teletypes document: "33 Keyboard" General Description and Principles of Operations" ISS 4, Section 574-121-100TC (Issue 4, June 1974), the keyboard could not generate it. On Thu, Dec 3, 2020 at 3:43 PM Larry McVoy <lm@mcvoy.com> wrote: > On Thu, Dec 03, 2020 at 09:37:17PM +0100, Niklas Karlsson wrote: > > Den tors 3 dec. 2020 kl 21:32 skrev M Douglas McIlroy < > > m.douglas.mcilroy@dartmouth.edu>: > > > > > There's a back story. The paper appears in the proceedings of a > > > conference held in London in 1973, a few months after the advent of > > > pipes. While preparing the presentation, Ken was inspired to invent > > > and install the pipe operator. His talk wouldn't have been nearly as > > > compelling had it been expressed in the original pipeline syntax (for > > > which I take the blame). > > > > > > > Now I'm curious. Is there anywhere I can read about the original pipeline > > syntax? I tried searching a bit, but the only mention that was even > vaguely > > informative only stated that > was involved. > > Wasn't there a version that was > > cat whatever ^ wc -l > > ? > [-- Attachment #2: Type: text/html, Size: 2012 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:43 ` Larry McVoy ` (2 preceding siblings ...) 2020-12-03 21:12 ` Clem Cole @ 2020-12-04 0:29 ` Dave Horsfall 2020-12-04 0:43 ` Rob Pike ` (2 more replies) 3 siblings, 3 replies; 64+ messages in thread From: Dave Horsfall @ 2020-12-04 0:29 UTC (permalink / raw) To: The Eunuchs Hysterical Society On Thu, 3 Dec 2020, Larry McVoy wrote: > Wasn't there a version that was > > cat whatever ^ wc -l Sort of pipe-related, but one thing that really gets my goat is the inefficient redundancy in "cat file | process" when "process < file" will suffice (and I'll bet that I'm not alone). And yes, "^" preceded "|" for reasons discussed later in this thread. -- Dave ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 0:29 ` Dave Horsfall @ 2020-12-04 0:43 ` Rob Pike 2020-12-04 0:48 ` Larry McVoy 2020-12-04 1:25 ` Dan Cross 2020-12-04 0:45 ` George Michaelson 2020-12-04 1:10 ` Bakul Shah 2 siblings, 2 replies; 64+ messages in thread From: Rob Pike @ 2020-12-04 0:43 UTC (permalink / raw) To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 661 bytes --] I've long been fascinated by the prevalence of cat file | process and think of it as a sort of triumph of the model. Pipes are more natural than redirection as a human interface. -rob On Fri, Dec 4, 2020 at 11:30 AM Dave Horsfall <dave@horsfall.org> wrote: > On Thu, 3 Dec 2020, Larry McVoy wrote: > > > Wasn't there a version that was > > > > cat whatever ^ wc -l > > Sort of pipe-related, but one thing that really gets my goat is the > inefficient redundancy in "cat file | process" when "process < file" will > suffice (and I'll bet that I'm not alone). > > And yes, "^" preceded "|" for reasons discussed later in this thread. > > -- Dave > [-- Attachment #2: Type: text/html, Size: 1141 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 0:43 ` Rob Pike @ 2020-12-04 0:48 ` Larry McVoy 2020-12-04 1:25 ` Dan Cross 1 sibling, 0 replies; 64+ messages in thread From: Larry McVoy @ 2020-12-04 0:48 UTC (permalink / raw) To: Rob Pike; +Cc: The Eunuchs Hysterical Society I should have done cat file file2 file3 ^ wc -l since the redirect works with only one file. On Fri, Dec 04, 2020 at 11:43:52AM +1100, Rob Pike wrote: > I've long been fascinated by the prevalence of > > cat file | process > > and think of it as a sort of triumph of the model. Pipes are more natural > than redirection as a human interface. > > -rob > > > On Fri, Dec 4, 2020 at 11:30 AM Dave Horsfall <dave@horsfall.org> wrote: > > > On Thu, 3 Dec 2020, Larry McVoy wrote: > > > > > Wasn't there a version that was > > > > > > cat whatever ^ wc -l > > > > Sort of pipe-related, but one thing that really gets my goat is the > > inefficient redundancy in "cat file | process" when "process < file" will > > suffice (and I'll bet that I'm not alone). > > > > And yes, "^" preceded "|" for reasons discussed later in this thread. > > > > -- Dave > > -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 0:43 ` Rob Pike 2020-12-04 0:48 ` Larry McVoy @ 2020-12-04 1:25 ` Dan Cross 2020-12-04 9:27 ` arnold 1 sibling, 1 reply; 64+ messages in thread From: Dan Cross @ 2020-12-04 1:25 UTC (permalink / raw) To: Rob Pike; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 1003 bytes --] On Thu, Dec 3, 2020 at 7:44 PM Rob Pike <robpike@gmail.com> wrote: > I've long been fascinated by the prevalence of > > cat file | process > > and think of it as a sort of triumph of the model. Pipes are more natural > than redirection as a human interface. > This has always struck me as particularly elegant in scripts. Consider: cat "$@" | whatever (Or you may prefer `cat $* | whatever`) Now one's script can take any number of file arguments or stdin, even if the filter does not. - Dan C. On Fri, Dec 4, 2020 at 11:30 AM Dave Horsfall <dave@horsfall.org> wrote: > >> On Thu, 3 Dec 2020, Larry McVoy wrote: >> >> > Wasn't there a version that was >> > >> > cat whatever ^ wc -l >> >> Sort of pipe-related, but one thing that really gets my goat is the >> inefficient redundancy in "cat file | process" when "process < file" will >> suffice (and I'll bet that I'm not alone). >> >> And yes, "^" preceded "|" for reasons discussed later in this thread. >> >> -- Dave >> > [-- Attachment #2: Type: text/html, Size: 1965 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 1:25 ` Dan Cross @ 2020-12-04 9:27 ` arnold 2020-12-04 11:33 ` Andy Kosela 0 siblings, 1 reply; 64+ messages in thread From: arnold @ 2020-12-04 9:27 UTC (permalink / raw) To: robpike, crossd; +Cc: tuhs Dan Cross <crossd@gmail.com> wrote: > This has always struck me as particularly elegant in scripts. Consider: > > cat "$@" | whatever > > (Or you may prefer `cat $* | whatever`) > > Now one's script can take any number of file arguments or stdin, even if > the filter does not. I think Dan has hit the heart of the matter. People are used to using cat for multiple files to start pumping data down a pipeline, so they continue to do so even when there's only one file. Arnold ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 9:27 ` arnold @ 2020-12-04 11:33 ` Andy Kosela 2020-12-04 13:14 ` Tyler Adams 0 siblings, 1 reply; 64+ messages in thread From: Andy Kosela @ 2020-12-04 11:33 UTC (permalink / raw) To: arnold; +Cc: tuhs On 12/4/20, arnold@skeeve.com <arnold@skeeve.com> wrote: > Dan Cross <crossd@gmail.com> wrote: > >> This has always struck me as particularly elegant in scripts. Consider: >> >> cat "$@" | whatever >> >> (Or you may prefer `cat $* | whatever`) >> >> Now one's script can take any number of file arguments or stdin, even if >> the filter does not. > > I think Dan has hit the heart of the matter. People are used to using > cat for multiple files to start pumping data down a pipeline, so they > continue to do so even when there's only one file. > The classic example is: $ cat file | grep foo instead of the simpler: $ grep foo file It appears cat(1) and pipe(7) are deeply ingrained in people's brains. --Andy ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 11:33 ` Andy Kosela @ 2020-12-04 13:14 ` Tyler Adams 2020-12-04 13:17 ` Niklas Karlsson 0 siblings, 1 reply; 64+ messages in thread From: Tyler Adams @ 2020-12-04 13:14 UTC (permalink / raw) To: Andy Kosela; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 931 bytes --] I find cat file | grep foo simpler because it reads Left to Right. Tyler On Fri, Dec 4, 2020 at 1:34 PM Andy Kosela <akosela@andykosela.com> wrote: > On 12/4/20, arnold@skeeve.com <arnold@skeeve.com> wrote: > > Dan Cross <crossd@gmail.com> wrote: > > > >> This has always struck me as particularly elegant in scripts. Consider: > >> > >> cat "$@" | whatever > >> > >> (Or you may prefer `cat $* | whatever`) > >> > >> Now one's script can take any number of file arguments or stdin, even if > >> the filter does not. > > > > I think Dan has hit the heart of the matter. People are used to using > > cat for multiple files to start pumping data down a pipeline, so they > > continue to do so even when there's only one file. > > > > The classic example is: > > $ cat file | grep foo > > instead of the simpler: > > $ grep foo file > > It appears cat(1) and pipe(7) are deeply ingrained in people's brains. > > --Andy > [-- Attachment #2: Type: text/html, Size: 1693 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 13:14 ` Tyler Adams @ 2020-12-04 13:17 ` Niklas Karlsson 2020-12-04 13:22 ` Tyler Adams 0 siblings, 1 reply; 64+ messages in thread From: Niklas Karlsson @ 2020-12-04 13:17 UTC (permalink / raw) To: Tyler Adams; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 1080 bytes --] < file grep foo works. Niklas Den fre 4 dec. 2020 kl 14:16 skrev Tyler Adams <coppero1237@gmail.com>: > I find cat file | grep foo simpler because it reads Left to Right. > > Tyler > > > On Fri, Dec 4, 2020 at 1:34 PM Andy Kosela <akosela@andykosela.com> wrote: > >> On 12/4/20, arnold@skeeve.com <arnold@skeeve.com> wrote: >> > Dan Cross <crossd@gmail.com> wrote: >> > >> >> This has always struck me as particularly elegant in scripts. Consider: >> >> >> >> cat "$@" | whatever >> >> >> >> (Or you may prefer `cat $* | whatever`) >> >> >> >> Now one's script can take any number of file arguments or stdin, even >> if >> >> the filter does not. >> > >> > I think Dan has hit the heart of the matter. People are used to using >> > cat for multiple files to start pumping data down a pipeline, so they >> > continue to do so even when there's only one file. >> > >> >> The classic example is: >> >> $ cat file | grep foo >> >> instead of the simpler: >> >> $ grep foo file >> >> It appears cat(1) and pipe(7) are deeply ingrained in people's brains. >> >> --Andy >> > [-- Attachment #2: Type: text/html, Size: 2088 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 13:17 ` Niklas Karlsson @ 2020-12-04 13:22 ` Tyler Adams 2020-12-04 13:25 ` Niklas Karlsson 0 siblings, 1 reply; 64+ messages in thread From: Tyler Adams @ 2020-12-04 13:22 UTC (permalink / raw) To: Niklas Karlsson; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 1449 bytes --] Not always $ cat a | while read line; do echo $line; done #!/usr/bin/env bash PUPPETEER_PRODUCT=firefox npm install -g md-to-pdf $ < a while read line; do echo $line; done -bash: syntax error near unexpected token `do' Tyler On Fri, Dec 4, 2020 at 3:17 PM Niklas Karlsson <nikke.karlsson@gmail.com> wrote: > < file grep foo works. > > Niklas > > Den fre 4 dec. 2020 kl 14:16 skrev Tyler Adams <coppero1237@gmail.com>: > >> I find cat file | grep foo simpler because it reads Left to Right. >> >> Tyler >> >> >> On Fri, Dec 4, 2020 at 1:34 PM Andy Kosela <akosela@andykosela.com> >> wrote: >> >>> On 12/4/20, arnold@skeeve.com <arnold@skeeve.com> wrote: >>> > Dan Cross <crossd@gmail.com> wrote: >>> > >>> >> This has always struck me as particularly elegant in scripts. >>> Consider: >>> >> >>> >> cat "$@" | whatever >>> >> >>> >> (Or you may prefer `cat $* | whatever`) >>> >> >>> >> Now one's script can take any number of file arguments or stdin, even >>> if >>> >> the filter does not. >>> > >>> > I think Dan has hit the heart of the matter. People are used to using >>> > cat for multiple files to start pumping data down a pipeline, so they >>> > continue to do so even when there's only one file. >>> > >>> >>> The classic example is: >>> >>> $ cat file | grep foo >>> >>> instead of the simpler: >>> >>> $ grep foo file >>> >>> It appears cat(1) and pipe(7) are deeply ingrained in people's brains. >>> >>> --Andy >>> >> [-- Attachment #2: Type: text/html, Size: 2930 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 13:22 ` Tyler Adams @ 2020-12-04 13:25 ` Niklas Karlsson 0 siblings, 0 replies; 64+ messages in thread From: Niklas Karlsson @ 2020-12-04 13:25 UTC (permalink / raw) To: Tyler Adams; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 1688 bytes --] Fair enough, and I guess it gets messy trying to remember all of the odd exceptions. Niklas Den fre 4 dec. 2020 kl 14:23 skrev Tyler Adams <coppero1237@gmail.com>: > Not always > > $ cat a | while read line; do echo $line; done > #!/usr/bin/env bash > > PUPPETEER_PRODUCT=firefox npm install -g md-to-pdf > > $ < a while read line; do echo $line; done > -bash: syntax error near unexpected token `do' > > > Tyler > > > On Fri, Dec 4, 2020 at 3:17 PM Niklas Karlsson <nikke.karlsson@gmail.com> > wrote: > >> < file grep foo works. >> >> Niklas >> >> Den fre 4 dec. 2020 kl 14:16 skrev Tyler Adams <coppero1237@gmail.com>: >> >>> I find cat file | grep foo simpler because it reads Left to Right. >>> >>> Tyler >>> >>> >>> On Fri, Dec 4, 2020 at 1:34 PM Andy Kosela <akosela@andykosela.com> >>> wrote: >>> >>>> On 12/4/20, arnold@skeeve.com <arnold@skeeve.com> wrote: >>>> > Dan Cross <crossd@gmail.com> wrote: >>>> > >>>> >> This has always struck me as particularly elegant in scripts. >>>> Consider: >>>> >> >>>> >> cat "$@" | whatever >>>> >> >>>> >> (Or you may prefer `cat $* | whatever`) >>>> >> >>>> >> Now one's script can take any number of file arguments or stdin, >>>> even if >>>> >> the filter does not. >>>> > >>>> > I think Dan has hit the heart of the matter. People are used to using >>>> > cat for multiple files to start pumping data down a pipeline, so they >>>> > continue to do so even when there's only one file. >>>> > >>>> >>>> The classic example is: >>>> >>>> $ cat file | grep foo >>>> >>>> instead of the simpler: >>>> >>>> $ grep foo file >>>> >>>> It appears cat(1) and pipe(7) are deeply ingrained in people's brains. >>>> >>>> --Andy >>>> >>> [-- Attachment #2: Type: text/html, Size: 3376 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 0:29 ` Dave Horsfall 2020-12-04 0:43 ` Rob Pike @ 2020-12-04 0:45 ` George Michaelson 2020-12-04 1:10 ` Bakul Shah 2 siblings, 0 replies; 64+ messages in thread From: George Michaelson @ 2020-12-04 0:45 UTC (permalink / raw) To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society I also get this, but there is a part of this which is about the history of your command stream as a history of thinking. cat file <blurs past> (sigh) cat file | more not more file. because you are heading to cat file | cut -d, -f1,2 | real-job yes, the cat is redundant. but syntactically it is like (a b) + vs plus(a,b) its not the functional order of the atoms for execution, its how you "pronounce" the work you are doing inside your head.. expressed through your fingers. The cost of the cat is really not big. the cost of re-framing your command to cmd < thing is sometimes higher in brain cost. Brains are expensive. On Fri, Dec 4, 2020 at 10:30 AM Dave Horsfall <dave@horsfall.org> wrote: > > On Thu, 3 Dec 2020, Larry McVoy wrote: > > > Wasn't there a version that was > > > > cat whatever ^ wc -l > > Sort of pipe-related, but one thing that really gets my goat is the > inefficient redundancy in "cat file | process" when "process < file" will > suffice (and I'll bet that I'm not alone). > > And yes, "^" preceded "|" for reasons discussed later in this thread. > > -- Dave ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 0:29 ` Dave Horsfall 2020-12-04 0:43 ` Rob Pike 2020-12-04 0:45 ` George Michaelson @ 2020-12-04 1:10 ` Bakul Shah 2020-12-04 1:17 ` George Michaelson 2 siblings, 1 reply; 64+ messages in thread From: Bakul Shah @ 2020-12-04 1:10 UTC (permalink / raw) To: The Eunuchs Hysterical Society On Dec 3, 2020, at 4:29 PM, Dave Horsfall <dave@horsfall.org> wrote: > > On Thu, 3 Dec 2020, Larry McVoy wrote: > >> Wasn't there a version that was >> >> cat whatever ^ wc -l > > Sort of pipe-related, but one thing that really gets my goat is the inefficient redundancy in "cat file | process" when "process < file" will suffice (and I'll bet that I'm not alone). Checking command history in zsh: $ h 1-|wc -l; h 1-|grep '<' | wc -l; h 1-|grep '>' | wc -l; h 1-|grep '|'|wc -l 10009 125 225 878 So it appears I used < ~1%, > ~2% and | ~9% of the command lines! I bet others will something similar. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-04 1:10 ` Bakul Shah @ 2020-12-04 1:17 ` George Michaelson 0 siblings, 0 replies; 64+ messages in thread From: George Michaelson @ 2020-12-04 1:17 UTC (permalink / raw) To: Bakul Shah; +Cc: The Eunuchs Hysterical Society ggm@ggm-802382 ~ % h 1-|wc -l; h 1-|grep '<' | wc -l; h 1-|grep '>' | wc -l; h 1-|grep '|'|wc -l 1005 34 14 91 ggm@ggm-802382 ~ % On Fri, Dec 4, 2020 at 11:11 AM Bakul Shah <bakul@iitbombay.org> wrote: > > On Dec 3, 2020, at 4:29 PM, Dave Horsfall <dave@horsfall.org> wrote: > > > > On Thu, 3 Dec 2020, Larry McVoy wrote: > > > >> Wasn't there a version that was > >> > >> cat whatever ^ wc -l > > > > Sort of pipe-related, but one thing that really gets my goat is the inefficient redundancy in "cat file | process" when "process < file" will suffice (and I'll bet that I'm not alone). > > Checking command history in zsh: > $ h 1-|wc -l; h 1-|grep '<' | wc -l; h 1-|grep '>' | wc -l; h 1-|grep '|'|wc -l > 10009 > 125 > 225 > 878 > > So it appears I used < ~1%, > ~2% and | ~9% of the command lines! > I bet others will something similar. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-03 20:37 ` Niklas Karlsson 2020-12-03 20:43 ` Larry McVoy @ 2020-12-03 20:51 ` M Douglas McIlroy 1 sibling, 0 replies; 64+ messages in thread From: M Douglas McIlroy @ 2020-12-03 20:51 UTC (permalink / raw) To: Niklas Karlsson; +Cc: tuhs https://archive.org/details/a_research_unix_reader pp 29-30 On Thu, Dec 3, 2020 at 3:37 PM Niklas Karlsson <nikke.karlsson@gmail.com> wrote: > > Den tors 3 dec. 2020 kl 21:32 skrev M Douglas McIlroy <m.douglas.mcilroy@dartmouth.edu>: >> >> There's a back story. The paper appears in the proceedings of a >> conference held in London in 1973, a few months after the advent of >> pipes. While preparing the presentation, Ken was inspired to invent >> and install the pipe operator. His talk wouldn't have been nearly as >> compelling had it been expressed in the original pipeline syntax (for >> which I take the blame). > > > Now I'm curious. Is there anywhere I can read about the original pipeline syntax? I tried searching a bit, but the only mention that was even vaguely informative only stated that > was involved. > > Thanks! > Niklas ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) @ 2020-12-01 3:13 Norman Wilson 2020-12-02 0:31 ` George Michaelson 0 siblings, 1 reply; 64+ messages in thread From: Norman Wilson @ 2020-12-01 3:13 UTC (permalink / raw) To: tuhs I'm also forwarding this message that arrived in my mailbox. Is this **THE** Ken Thompson? Yes, that's the real Ken. Those who have communicated with him in the past (and didn't get a direct note as some of us did) should notice the new e-mail address, kenbob@gmail.com. Norman Wilson Toronto ON ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 3:13 Norman Wilson @ 2020-12-02 0:31 ` George Michaelson 2020-12-02 1:06 ` Adam Thornton 0 siblings, 1 reply; 64+ messages in thread From: George Michaelson @ 2020-12-02 0:31 UTC (permalink / raw) To: The Eunuchs Hysterical Society I don't normally like referring to "fight club" because its a crap movie. But "we don't talk about fight club" is a really useful rule. If you name call people on a list too much, they don't want to be on the list. It's not a place to collect gold stamps, or rare birds. I suspect I'd pass half the members of the list on the street and fail to recognize them. I very much hope this is reciprocated. cheers -G ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-02 0:31 ` George Michaelson @ 2020-12-02 1:06 ` Adam Thornton 2020-12-02 17:02 ` John Cowan 0 siblings, 1 reply; 64+ messages in thread From: Adam Thornton @ 2020-12-02 1:06 UTC (permalink / raw) To: George Michaelson; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 714 bytes --] Pretty sure I would pass ALL the members of the list on the street and fail to recognize them. Yes, even the famous ones. Also, "Fight Club" is not a crap movie and I will fight you over that. Adam On Tue, Dec 1, 2020 at 5:32 PM George Michaelson <ggm@algebras.org> wrote: > I don't normally like referring to "fight club" because its a crap > movie. But "we don't talk about fight club" is a really useful rule. > > If you name call people on a list too much, they don't want to be on > the list. It's not a place to collect gold stamps, or rare birds. > > I suspect I'd pass half the members of the list on the street and fail > to recognize them. I very much hope this is reciprocated. > > cheers > > -G > [-- Attachment #2: Type: text/html, Size: 1146 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-02 1:06 ` Adam Thornton @ 2020-12-02 17:02 ` John Cowan 0 siblings, 0 replies; 64+ messages in thread From: John Cowan @ 2020-12-02 17:02 UTC (permalink / raw) To: Adam Thornton; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 888 bytes --] On Tue, Dec 1, 2020 at 8:06 PM Adam Thornton <athornton@gmail.com> wrote: Pretty sure I would pass ALL the members of the list on the street and fail > to recognize them. Yes, even the famous ones. > I can pass anyone on the street and fail to recognize them (google "prosopagnosia" or "face blindness"). > Also, "Fight Club" is not a crap movie and I will fight you over that. > The first rule of Fish Club is that whales are not fish. The second rule of Fish Club is that lungfish are not fish either. The first rule of Linguist Club is to explain who belongs to Linguist Club. The first rule of Tautology Club is the first rule of Tautology Club. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org Sir, I quite agree with you, but what are we two against so many? --George Bernard Shaw, to a man booing at the opening of _Arms and the Man_ [-- Attachment #2: Type: text/html, Size: 3041 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
[parent not found: <CAMP=X_mO9oawUpHGOvgVtwVTgcmvdXAc5vrE_+s3d2NsH+1HgA@mail.gmail.com>]
* Re: [TUHS] The UNIX Command Language (1976) [not found] <CAMP=X_mO9oawUpHGOvgVtwVTgcmvdXAc5vrE_+s3d2NsH+1HgA@mail.gmail.com> @ 2020-12-01 0:00 ` Joachim via TUHS 2020-12-01 0:21 ` Dave Horsfall 0 siblings, 1 reply; 64+ messages in thread From: Joachim via TUHS @ 2020-12-01 0:00 UTC (permalink / raw) To: TUHS main list [-- Attachment #1: Type: text/plain, Size: 845 bytes --] I'm also forwarding this message that arrived in my mailbox. Is this **THE** Ken Thompson? Joachim -------- Forwarded Message -------- Subject: Re: [TUHS] The UNIX Command Language (1976) Date: Sun, 29 Nov 2020 21:47:16 -0800 From: Ken Thompson <kenbob@gmail.com> To: Joachim <j@tllds.com> yes. the unix manual was published before that, but i dont think it was released that early. it had a manual page on the shell. this paper might be the first paper ever released outside bell labs. On Sun, Nov 29, 2020 at 7:18 PM Joachim via TUHS <tuhs@minnie.tuhs.org <mailto:tuhs@minnie.tuhs.org>> wrote: Apologies if this has already been linked here. "The UNIX Command Languageis the first-ever paper published on the Unix shell. It was written by Ken Thompson in 1976." https://github.com/susam/tucl Joachim [-- Attachment #2: Type: text/html, Size: 3458 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 0:00 ` Joachim via TUHS @ 2020-12-01 0:21 ` Dave Horsfall 2020-12-01 2:23 ` Larry McVoy 0 siblings, 1 reply; 64+ messages in thread From: Dave Horsfall @ 2020-12-01 0:21 UTC (permalink / raw) To: The Eunuchs Hysterical Society On Mon, 30 Nov 2020, Joachim via TUHS wrote: > I'm also forwarding this message that arrived in my mailbox. Is this > **THE** Ken Thompson? I think he's on this list... -- Dave ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 0:21 ` Dave Horsfall @ 2020-12-01 2:23 ` Larry McVoy 0 siblings, 0 replies; 64+ messages in thread From: Larry McVoy @ 2020-12-01 2:23 UTC (permalink / raw) To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society He is. So is Rob Pike, Doug, Steve Johnson, Steve Bourne (I got him here) pretty much all of the remaining Bell Lab luminaries except for bwk. I've tried to twist his arm, he's remained a hard nut to crack. I think the list, and he, would love it if he were here. So long as we keep it on point and move stuff like tputs to COFF right away. I suspect all of them don't want a big deal made about them, my guess is they are here to talk about Unix. Just my opinion. On Tue, Dec 01, 2020 at 11:21:51AM +1100, Dave Horsfall wrote: > On Mon, 30 Nov 2020, Joachim via TUHS wrote: > > >I'm also forwarding this message that arrived in my mailbox. Is this > >**THE** Ken Thompson? > > I think he's on this list... > > -- Dave -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm ^ permalink raw reply [flat|nested] 64+ messages in thread
* [TUHS] The UNIX Command Language (1976) @ 2020-11-30 3:10 Joachim via TUHS 2020-11-30 8:30 ` Thomas Paulsen ` (4 more replies) 0 siblings, 5 replies; 64+ messages in thread From: Joachim via TUHS @ 2020-11-30 3:10 UTC (permalink / raw) To: TUHS main list [-- Attachment #1: Type: text/plain, Size: 211 bytes --] Apologies if this has already been linked here. "The UNIX Command Languageis the first-ever paper published on the Unix shell. It was written by Ken Thompson in 1976." https://github.com/susam/tucl Joachim [-- Attachment #2: Type: text/html, Size: 2072 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 3:10 Joachim via TUHS @ 2020-11-30 8:30 ` Thomas Paulsen 2020-11-30 13:36 ` Brantley Coile ` (3 subsequent siblings) 4 siblings, 0 replies; 64+ messages in thread From: Thomas Paulsen @ 2020-11-30 8:30 UTC (permalink / raw) To: Joachim; +Cc: tuhs [-- Attachment #1: Type: text/html, Size: 1377 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 3:10 Joachim via TUHS 2020-11-30 8:30 ` Thomas Paulsen @ 2020-11-30 13:36 ` Brantley Coile 2020-11-30 15:12 ` Tom Ivar Helbekkmo via TUHS 2020-11-30 15:52 ` Clem Cole ` (2 subsequent siblings) 4 siblings, 1 reply; 64+ messages in thread From: Brantley Coile @ 2020-11-30 13:36 UTC (permalink / raw) To: Joachim; +Cc: TUHS main list Thank you very much! I've been looking for where Ken used the "much needed gap" phrase. Brantley > On Nov 29, 2020, at 10:10 PM, Joachim via TUHS <tuhs@minnie.tuhs.org> wrote: > > Apologies if this has already been linked here. > > "The UNIX Command Language is the first-ever paper published on the Unix shell. It was written by Ken Thompson in 1976." > > https://github.com/susam/tucl > > > Joachim ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 13:36 ` Brantley Coile @ 2020-11-30 15:12 ` Tom Ivar Helbekkmo via TUHS 0 siblings, 0 replies; 64+ messages in thread From: Tom Ivar Helbekkmo via TUHS @ 2020-11-30 15:12 UTC (permalink / raw) To: Brantley Coile; +Cc: TUHS main list Brantley Coile <brantley@coraid.com> writes: > Thank you very much! I've been looking for where Ken used the "much > needed gap" phrase. That formulation is funny - but I just got into a discussion with someone about whether ken was being intentionally funny or not. To me, it seems rather obvious that he chose that wording for the humourous effect of the double-take the reader experiences. A couple of friends of mine, though, insist that that paragraph is just clumsily written. Is he on record anywhere saying which it is? -tih -- Most people who graduate with CS degrees don't understand the significance of Lisp. Lisp is the most important idea in computer science. --Alan Kay ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 3:10 Joachim via TUHS 2020-11-30 8:30 ` Thomas Paulsen 2020-11-30 13:36 ` Brantley Coile @ 2020-11-30 15:52 ` Clem Cole 2020-11-30 16:25 ` Dan Cross 2020-11-30 16:37 ` Larry McVoy 2020-12-01 3:59 ` jason-tuhs 2020-12-01 16:04 ` Tyler Adams 4 siblings, 2 replies; 64+ messages in thread From: Clem Cole @ 2020-11-30 15:52 UTC (permalink / raw) To: Joachim; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 578 bytes --] Too bad, they did not use the UNIX tool kit like troff and eqn which are described in the paper itself, to restore it. If you were going to the trouble to make the 'md' file - it would have been just as easy to create troff source. Sigh ... get off my lawn ... Clem On Sun, Nov 29, 2020 at 10:17 PM Joachim via TUHS <tuhs@minnie.tuhs.org> wrote: > Apologies if this has already been linked here. > > "The UNIX Command Language is the first-ever paper published on the Unix > shell. It was written by Ken Thompson in 1976." > > https://github.com/susam/tucl > > > Joachim > [-- Attachment #2: Type: text/html, Size: 2722 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 15:52 ` Clem Cole @ 2020-11-30 16:25 ` Dan Cross 2020-11-30 16:38 ` Warner Losh 2020-11-30 16:37 ` Larry McVoy 1 sibling, 1 reply; 64+ messages in thread From: Dan Cross @ 2020-11-30 16:25 UTC (permalink / raw) To: Clem Cole; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 975 bytes --] On Mon, Nov 30, 2020 at 10:54 AM Clem Cole <clemc@ccc.com> wrote: > Too bad, they did not use the UNIX tool kit like troff and eqn which are > described in the paper itself, to restore it. If you were going to the > trouble to make the 'md' file - it would have been just as easy to create > troff source. > In fairness, the Markdown renders directly from the github web UI, but I agree that using troff/eqn would have been nice. Surely it wouldn't be that hard to massage the markdown into troff markdown. Sigh ... get off my lawn ... > I don't even have a lawn and I'm similarly distressed at the lack of homage to the past. - Dan C. On Sun, Nov 29, 2020 at 10:17 PM Joachim via TUHS <tuhs@minnie.tuhs.org> > wrote: > >> Apologies if this has already been linked here. >> >> "The UNIX Command Language is the first-ever paper published on the Unix >> shell. It was written by Ken Thompson in 1976." >> >> https://github.com/susam/tucl >> >> >> Joachim >> > [-- Attachment #2: Type: text/html, Size: 3503 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 16:25 ` Dan Cross @ 2020-11-30 16:38 ` Warner Losh 2020-11-30 16:41 ` Dan Cross 0 siblings, 1 reply; 64+ messages in thread From: Warner Losh @ 2020-11-30 16:38 UTC (permalink / raw) To: Dan Cross; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 983 bytes --] On Mon, Nov 30, 2020 at 9:27 AM Dan Cross <crossd@gmail.com> wrote: > On Mon, Nov 30, 2020 at 10:54 AM Clem Cole <clemc@ccc.com> wrote: > >> Too bad, they did not use the UNIX tool kit like troff and eqn which are >> described in the paper itself, to restore it. If you were going to the >> trouble to make the 'md' file - it would have been just as easy to create >> troff source. >> > > In fairness, the Markdown renders directly from the github web UI, but I > agree that using troff/eqn would have been nice. Surely it wouldn't be that > hard to massage the markdown into troff markdown. > There are a few MD to troff converters, though I don't know how many will convert to -ms format that was likely used historically. And given that ms has a little more semantic info than MD does, there may be some manual steps afterwards. Even a perfect converter would likely have manual steps since it was also the custom back in the day to tweak this or that in the output... Warner [-- Attachment #2: Type: text/html, Size: 1693 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 16:38 ` Warner Losh @ 2020-11-30 16:41 ` Dan Cross 0 siblings, 0 replies; 64+ messages in thread From: Dan Cross @ 2020-11-30 16:41 UTC (permalink / raw) To: Warner Losh; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 1272 bytes --] On Mon, Nov 30, 2020 at 11:38 AM Warner Losh <imp@bsdimp.com> wrote: > On Mon, Nov 30, 2020 at 9:27 AM Dan Cross <crossd@gmail.com> wrote: > >> On Mon, Nov 30, 2020 at 10:54 AM Clem Cole <clemc@ccc.com> wrote: >> >>> Too bad, they did not use the UNIX tool kit like troff and eqn which are >>> described in the paper itself, to restore it. If you were going to the >>> trouble to make the 'md' file - it would have been just as easy to create >>> troff source. >>> >> >> In fairness, the Markdown renders directly from the github web UI, but I >> agree that using troff/eqn would have been nice. Surely it wouldn't be that >> hard to massage the markdown into troff markdown. >> > > There are a few MD to troff converters, though I don't know how many will > convert to -ms format that was likely used historically. And given that ms > has a little more semantic info than MD does, there may be some manual > steps afterwards. Even a perfect converter would likely have manual steps > since it was also the custom back in the day to tweak this or that in the > output... > Sure, but this is a fairly short paper...I bet one could do a fairly faithful reproduction of the original in a couple of hours. I may take a stab at it and send a pull request. - Dan C. [-- Attachment #2: Type: text/html, Size: 2227 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 15:52 ` Clem Cole 2020-11-30 16:25 ` Dan Cross @ 2020-11-30 16:37 ` Larry McVoy 2020-11-30 16:54 ` Clem Cole 1 sibling, 1 reply; 64+ messages in thread From: Larry McVoy @ 2020-11-30 16:37 UTC (permalink / raw) To: Clem Cole; +Cc: TUHS main list So Clem, the fact that troff lost and LaTex won is a direct result of that walled garden that was the early days of Unix. Unless you had a Unix license, no troff for you! Which is a huge bummer, I'm a huge troff fan (especially pic, but all of the preprocessors let you see the output in your head). I wish we lived in a troff world but we don't and that is a direct result of haves (license holders) and have nots (the other 99.999999% of the world). It's not the result we would like but it is what it is. On Mon, Nov 30, 2020 at 10:52:40AM -0500, Clem Cole wrote: > Too bad, they did not use the UNIX tool kit like troff and eqn which are > described in the paper itself, to restore it. If you were going to the > trouble to make the 'md' file - it would have been just as easy to create > troff source. > > Sigh ... get off my lawn ... > > Clem > > On Sun, Nov 29, 2020 at 10:17 PM Joachim via TUHS <tuhs@minnie.tuhs.org> > wrote: > > > Apologies if this has already been linked here. > > > > "The UNIX Command Language is the first-ever paper published on the Unix > > shell. It was written by Ken Thompson in 1976." > > > > https://github.com/susam/tucl > > > > > > Joachim > > -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 16:37 ` Larry McVoy @ 2020-11-30 16:54 ` Clem Cole 2020-11-30 18:13 ` Theodore Y. Ts'o 2020-11-30 18:25 ` John Cowan 0 siblings, 2 replies; 64+ messages in thread From: Clem Cole @ 2020-11-30 16:54 UTC (permalink / raw) To: Larry McVoy; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 1665 bytes --] On Mon, Nov 30, 2020 at 11:37 AM Larry McVoy <lm@mcvoy.com> wrote: > So Clem, the fact that troff lost and LaTex won is a direct result of > that walled garden that was the early days of Unix. Indeed > Unless you had a Unix license, no troff for you! yes ... but ... even UNIX binary folks had troff licenses and many/most at ditroff licenses. I know Masscomp just ate $5 per CPU and included it because we did not want to mess with the older version. If you were an academic, it was free so most research academics had either the source or at least a binary on their workstations. This did not become an issue until the 386, but by that time Clark had written what would be groff. I think your observation is correct, but in practice, I don't think that was what it was. I think the academics went LaTex and that had more to do with it. LaTex was closer to Scribe for the PDP-10s and Vaxen, which had a short head lead on all them until it went walled garden when CMU sold the rights (and even its author - Brian Ried) could not use it at a Stanford. So your are right, Wall Garden certainly impacted the result, but I think it was more preference in this case. > Which is a huge bummer, I'm a huge > troff fan (especially pic, but all of the preprocessors let you see the > output in your head). Ditto to both. > I wish we lived in a troff world but we don't > Yep > and that is a direct result of haves (license holders) and have nots > (the other 99.999999% of the world). > Maybe -- I think the PC and Word was the real kiss of death, which I find even more troubling. > > It's not the result we would like but it is what it is. > +1 [-- Attachment #2: Type: text/html, Size: 4454 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 16:54 ` Clem Cole @ 2020-11-30 18:13 ` Theodore Y. Ts'o 2020-11-30 18:25 ` John Cowan 1 sibling, 0 replies; 64+ messages in thread From: Theodore Y. Ts'o @ 2020-11-30 18:13 UTC (permalink / raw) To: Clem Cole; +Cc: TUHS main list On Mon, Nov 30, 2020 at 11:54:37AM -0500, Clem Cole wrote: > > I think the academics went LaTex and that had more to do with it. LaTex > was closer to Scribe for the PDP-10s and Vaxen, which had a short head lead > on all them until it went walled garden when CMU sold the rights (and even > its author - Brian Ried) could not use it at a Stanford. The other issue to consider is how easily could you typeset a super-complex math expression (with integrals, sigmas, matricies, etc., etc.) using eqn vs Scribe vs LaTeX. For at least some of the stuff I needed to do when I was type-setting problem set results (there was an informal competition between some of the students regarding whose homework would get redistributed by the TA's as the official problem set answer to the rest of the class), I found LaTeX easier to use than Scribe, and I had access to all three as an MIT undergraduate. Granted, that could have been a matter of personal preference, and I never did try to use eqn for that purpose. - Ted ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 16:54 ` Clem Cole 2020-11-30 18:13 ` Theodore Y. Ts'o @ 2020-11-30 18:25 ` John Cowan 2020-11-30 18:37 ` Clem Cole 2020-11-30 18:46 ` Nemo Nusquam 1 sibling, 2 replies; 64+ messages in thread From: John Cowan @ 2020-11-30 18:25 UTC (permalink / raw) To: Clem Cole; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 880 bytes --] On Mon, Nov 30, 2020 at 11:55 AM Clem Cole <clemc@ccc.com> wrote: > I wish we lived in a troff world but we don't >> > Yep > I think O'Reilly was the last commercial publisher with a troff toolchain. Nowadays they accept HTMLBook (their own static subset of HTML5), DocBook, ASCIIDoc (analogous to Markdown but plain-text DocBook as opposed to plain-text HTML), Word, and in some cases InDesign or PDF. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org And through this revolting graveyard of the universe the muffled, maddening beating of drums, and thin, monotonous whine of blasphemous flutes from inconceivable, unlighted chambers beyond Time; the detestable pounding and piping whereunto dance slowly, awkwardly, and absurdly the gigantic tenebrous ultimate gods --the blind, voiceless, mindless gargoyles whose soul is Nyarlathotep. (Lovecraft) [-- Attachment #2: Type: text/html, Size: 2432 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 18:25 ` John Cowan @ 2020-11-30 18:37 ` Clem Cole 2020-11-30 20:11 ` arnold 2020-11-30 18:46 ` Nemo Nusquam 1 sibling, 1 reply; 64+ messages in thread From: Clem Cole @ 2020-11-30 18:37 UTC (permalink / raw) To: John Cowan; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 466 bytes --] On Mon, Nov 30, 2020 at 1:25 PM John Cowan <cowan@ccil.org> wrote: > > > On Mon, Nov 30, 2020 at 11:55 AM Clem Cole <clemc@ccc.com> wrote: > > >> I wish we lived in a troff world but we don't >>> >> Yep >> > > I think O'Reilly was the last commercial publisher with a troff toolchain. > I think it depends on who you are and your editor is at the said firm. Tim will still take troff as will John Waite at Pearson. That said, as Jon can tell you, Bill will not. [-- Attachment #2: Type: text/html, Size: 1766 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 18:37 ` Clem Cole @ 2020-11-30 20:11 ` arnold 2020-11-30 21:49 ` Will Senn 2020-12-01 2:55 ` Jon Steinhart 0 siblings, 2 replies; 64+ messages in thread From: arnold @ 2020-11-30 20:11 UTC (permalink / raw) To: cowan, clemc; +Cc: tuhs Clem Cole <clemc@ccc.com> wrote: > > I think O'Reilly was the last commercial publisher with a troff toolchain. They stopped using troff directly well over 20 years ago. These days if you're using a markup language and their toolset it's either Asciidoc or docbook. > I think it depends on who you are and your editor is at the said firm. Tim > will still take troff I assume you mean Tim O'Reilly? He hasn't been involved in the book side of his business in decades, and as I said, troff isn't in the picture there. > as will John Waite at Pearson. They farm such things out, they don't accept it in house. Or the author can provide "camera ready copy", which these days just means PDF. > That said, as Jon can tell you, Bill will not. No idea who Bill is. Arnold ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 20:11 ` arnold @ 2020-11-30 21:49 ` Will Senn 2020-12-01 2:55 ` Jon Steinhart 1 sibling, 0 replies; 64+ messages in thread From: Will Senn @ 2020-11-30 21:49 UTC (permalink / raw) To: tuhs [-- Attachment #1: Type: text/plain, Size: 1159 bytes --] To show how current this topic is, there's an interesting and related discussion upcoming at NYC Bug, For the Love of Troff, on Wed @ 18:45 (I'm guessing Eastern), via Zoom: https://www.nycbug.org/index?action=view&id=10678 On 11/30/20 2:11 PM, arnold@skeeve.com wrote: > Clem Cole <clemc@ccc.com> wrote: > >>> I think O'Reilly was the last commercial publisher with a troff toolchain. > They stopped using troff directly well over 20 years ago. > These days if you're using a markup language and their toolset it's > either Asciidoc or docbook. > >> I think it depends on who you are and your editor is at the said firm. Tim >> will still take troff > I assume you mean Tim O'Reilly? He hasn't been involved in the book > side of his business in decades, and as I said, troff isn't in the picture > there. > >> as will John Waite at Pearson. > They farm such things out, they don't accept it in house. > Or the author can provide "camera ready copy", which these days > just means PDF. > >> That said, as Jon can tell you, Bill will not. > No idea who Bill is. > > Arnold -- GPG Fingerprint: 68F4 B3BD 1730 555A 4462 7D45 3EAA 5B6D A982 BAAF [-- Attachment #2: Type: text/html, Size: 2509 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 20:11 ` arnold 2020-11-30 21:49 ` Will Senn @ 2020-12-01 2:55 ` Jon Steinhart 1 sibling, 0 replies; 64+ messages in thread From: Jon Steinhart @ 2020-12-01 2:55 UTC (permalink / raw) To: tuhs arnold@skeeve.com writes: > > > That said, as Jon can tell you, Bill will not. > > No idea who Bill is. Bill Pollack, No Starch Press. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 18:25 ` John Cowan 2020-11-30 18:37 ` Clem Cole @ 2020-11-30 18:46 ` Nemo Nusquam 1 sibling, 0 replies; 64+ messages in thread From: Nemo Nusquam @ 2020-11-30 18:46 UTC (permalink / raw) To: tuhs We seem to be straying into COFF-land. However... On 11/30/20 13:25, John Cowan wrote: > On Mon, Nov 30, 2020 at 11:55 AM Clem Cole <clemc@ccc.com > <mailto:clemc@ccc.com>> wrote: > > I wish we lived in a troff world but we don't > > Yep > > > I think O'Reilly was the last commercial publisher with a troff > toolchain. Nowadays they accept HTMLBook (their own static subset of > HTML5), DocBook, ASCIIDoc (analogous to Markdown but plain-text > DocBook as opposed to plain-text HTML), Word, and in some cases > InDesign or PDF. I wonder what Tanenbaum does these days? Prefaces of earlier versions of all his texts stated that they were written with troff. (And Springer accepts mostly LaTeX.) N. > John Cowan http://vrici.lojban.org/~cowan > <http://vrici.lojban.org/%7Ecowan> cowan@ccil.org <mailto:cowan@ccil.org> ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 3:10 Joachim via TUHS ` (2 preceding siblings ...) 2020-11-30 15:52 ` Clem Cole @ 2020-12-01 3:59 ` jason-tuhs 2020-12-01 4:03 ` Jon Steinhart ` (2 more replies) 2020-12-01 16:04 ` Tyler Adams 4 siblings, 3 replies; 64+ messages in thread From: jason-tuhs @ 2020-12-01 3:59 UTC (permalink / raw) To: tuhs [-- Attachment #1: Type: text/plain, Size: 626 bytes --] > "The UNIX Command Language is the first-ever paper published on the Unix > shell. It was written by Ken Thompson in 1976." > > https://github.com/susam/tucl Thanks for that. This reminded me that the Thompson shell used goto for flow control, which I had forgotten. Bourne commented on the omission of goto from the Bourne shell, "I eliminated goto in favour of flow control primitives like if and for. This was also considered rather radical departure from the existing practice." Was this decision contentious at all? Was there a specific reason for goto's exclusion in the Bourne shell? Thanks. -Jason ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 3:59 ` jason-tuhs @ 2020-12-01 4:03 ` Jon Steinhart 2020-12-01 9:27 ` Steve Nickolas 2020-12-01 15:09 ` Jim Capp 2 siblings, 0 replies; 64+ messages in thread From: Jon Steinhart @ 2020-12-01 4:03 UTC (permalink / raw) To: tuhs jason-tuhs@shalott.net writes: > > Bourne commented on the omission of goto from the Bourne shell, "I > eliminated goto in favour of flow control primitives like if and for. > This was also considered rather radical departure from the existing > practice." > > Was this decision contentious at all? Was there a specific reason for > goto's exclusion in the Bourne shell? I don't remember if this story has been told here before or not but I got it from Steve a few months ago. Ever wonder by the shell was symmetrical with if and fi, case and esac, but then had do and done? Reason was that by the time Steve wrote the shell, Ken had written the od command and dug in his heels and wouldn't change the name. Jon ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 3:59 ` jason-tuhs 2020-12-01 4:03 ` Jon Steinhart @ 2020-12-01 9:27 ` Steve Nickolas 2020-12-01 15:09 ` Jim Capp 2 siblings, 0 replies; 64+ messages in thread From: Steve Nickolas @ 2020-12-01 9:27 UTC (permalink / raw) To: tuhs [-- Attachment #1: Type: text/plain, Size: 987 bytes --] On Mon, 30 Nov 2020, jason-tuhs@shalott.net wrote: > >> "The UNIX Command Language is the first-ever paper published on the Unix >> shell. It was written by Ken Thompson in 1976." >> >> https://github.com/susam/tucl > > Thanks for that. > > This reminded me that the Thompson shell used goto for flow control, which I > had forgotten. > > Bourne commented on the omission of goto from the Bourne shell, "I eliminated > goto in favour of flow control primitives like if and for. This was also > considered rather radical departure from the existing practice." > > Was this decision contentious at all? Was there a specific reason for goto's > exclusion in the Bourne shell? > > > Thanks. > > > -Jason My personal opinion is that the way the Bourne shell handled flow control is a lot easier to code for (since I wrote a version of COMMAND.COM, and it has to have a "goto" command, and all the hairiness that goes with needing to be able to random-seek a shell script). -uso. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 3:59 ` jason-tuhs 2020-12-01 4:03 ` Jon Steinhart 2020-12-01 9:27 ` Steve Nickolas @ 2020-12-01 15:09 ` Jim Capp 2020-12-01 15:35 ` Toby Thain ` (2 more replies) 2 siblings, 3 replies; 64+ messages in thread From: Jim Capp @ 2020-12-01 15:09 UTC (permalink / raw) To: jason-tuhs; +Cc: tuhs [-- Attachment #1: Type: text/plain, Size: 1007 bytes --] Is it possible the elimination of the GOTO statement in the Bourne Shell was related to a Letter to the Editor in Communications of the ACM, March 1968: "Go To Statement Considered Harmful," by E. Dijkstra. Jim From: jason-tuhs@shalott.net To: tuhs@minnie.tuhs.org Sent: Monday, November 30, 2020 10:59:18 PM Subject: Re: [TUHS] The UNIX Command Language (1976) > "The UNIX Command Language is the first-ever paper published on the Unix > shell. It was written by Ken Thompson in 1976." > > https://github.com/susam/tucl Thanks for that. This reminded me that the Thompson shell used goto for flow control, which I had forgotten. Bourne commented on the omission of goto from the Bourne shell, "I eliminated goto in favour of flow control primitives like if and for. This was also considered rather radical departure from the existing practice." Was this decision contentious at all? Was there a specific reason for goto's exclusion in the Bourne shell? Thanks. -Jason [-- Attachment #2: Type: text/html, Size: 1502 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 15:09 ` Jim Capp @ 2020-12-01 15:35 ` Toby Thain 2020-12-01 15:38 ` arnold 2020-12-01 20:13 ` Dave Horsfall 2 siblings, 0 replies; 64+ messages in thread From: Toby Thain @ 2020-12-01 15:35 UTC (permalink / raw) To: Jim Capp, jason-tuhs; +Cc: tuhs On 2020-12-01 10:09 a.m., Jim Capp wrote: > Is it possible the elimination of the GOTO statement in the Bourne Shell > was related to a Letter to the Editor in Communications of the ACM, > March 1968: > "Go To Statement Considered Harmful," by E. Dijkstra. > Broadly connected to the rise of Structured Programming -- which we take fully for granted today. The same movement, and the popularity of Pascal, which was very competitive with C as an applications language, would have motivated the inclusion of what were at the time considered "high level" control structures, in C: do/while/for and block structuring. --Toby > Jim > > > ------------------------------------------------------------------------ > *From: *jason-tuhs@shalott.net > *To: *tuhs@minnie.tuhs.org > *Sent: *Monday, November 30, 2020 10:59:18 PM > *Subject: *Re: [TUHS] The UNIX Command Language (1976) > > >> "The UNIX Command Language is the first-ever paper published on the Unix >> shell. It was written by Ken Thompson in 1976." >> >> https://github.com/susam/tucl > > Thanks for that. > > This reminded me that the Thompson shell used goto for flow control, which > I had forgotten. > > Bourne commented on the omission of goto from the Bourne shell, "I > eliminated goto in favour of flow control primitives like if and for. > This was also considered rather radical departure from the existing > practice." > > Was this decision contentious at all? Was there a specific reason for > goto's exclusion in the Bourne shell? > > > Thanks. > > > -Jason ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 15:09 ` Jim Capp 2020-12-01 15:35 ` Toby Thain @ 2020-12-01 15:38 ` arnold 2020-12-01 16:24 ` Warner Losh 2020-12-01 20:13 ` Dave Horsfall 2 siblings, 1 reply; 64+ messages in thread From: arnold @ 2020-12-01 15:38 UTC (permalink / raw) To: jcapp, jason-tuhs; +Cc: tuhs In the late 70s and early 80s, structured programming was on the ascension, but had not completely captured the minds of all computer scientists and programmers. (cf. Knuth's "Structure Programming with Goto Statements" article.) It was recognized that goto was not necessary if one had proper control structures in a language (if/else, while), and that code with no (or minimal) gotos was easier to read and understand. So this kind of thing was "in the air" when Bourne wrote the V7 shell. If he's on this list, it'd be nice to hear directly from the source. :-) HTH, Arnold Jim Capp <jcapp@anteil.com> wrote: > Is it possible the elimination of the GOTO statement in the Bourne Shell > was related to a Letter to the Editor in Communications of the ACM, March 1968: > > "Go To Statement Considered Harmful," by E. Dijkstra. > > Jim > > > From: jason-tuhs@shalott.net > To: tuhs@minnie.tuhs.org > Sent: Monday, November 30, 2020 10:59:18 PM > Subject: Re: [TUHS] The UNIX Command Language (1976) > > > "The UNIX Command Language is the first-ever paper published on the Unix > > shell. It was written by Ken Thompson in 1976." > > > > https://github.com/susam/tucl > > Thanks for that. > > This reminded me that the Thompson shell used goto for flow control, which > I had forgotten. > > Bourne commented on the omission of goto from the Bourne shell, "I > eliminated goto in favour of flow control primitives like if and for. > This was also considered rather radical departure from the existing > practice." > > Was this decision contentious at all? Was there a specific reason for > goto's exclusion in the Bourne shell? > > Thanks. > > -Jason ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 15:38 ` arnold @ 2020-12-01 16:24 ` Warner Losh 2020-12-01 16:39 ` arnold 2020-12-01 16:47 ` Larry McVoy 0 siblings, 2 replies; 64+ messages in thread From: Warner Losh @ 2020-12-01 16:24 UTC (permalink / raw) To: Arnold Robbins; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 774 bytes --] On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote: > It was recognized that goto was not necessary if one had proper control > structures in a language (if/else, while), and that code with no (or > minimal) gotos was easier to read and understand. > This is true for simple flow control. However, when you had to break out of multiple levels, or continue not the inner loop, but the middle loop, the use of extra booleans sure made the code less understandable than a 'goto' a label that stood in for that purpose... This was something that wasn't well understood by language designers, and even today C and C++ neither have good flow control beyond the basics. Even though both break and continue could take an optional count without breaking old code.... Warner [-- Attachment #2: Type: text/html, Size: 1144 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 16:24 ` Warner Losh @ 2020-12-01 16:39 ` arnold 2020-12-01 20:13 ` Rob Pike ` (2 more replies) 2020-12-01 16:47 ` Larry McVoy 1 sibling, 3 replies; 64+ messages in thread From: arnold @ 2020-12-01 16:39 UTC (permalink / raw) To: imp, arnold; +Cc: tuhs > On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote: > > It was recognized that goto was not necessary if one had proper control > > structures in a language (if/else, while), and that code with no (or > > minimal) gotos was easier to read and understand. Warner Losh <imp@bsdimp.com> wrote: > This is true for simple flow control. However, when you had to break out of > multiple levels, or continue not the inner loop, but the middle loop, the > use of extra booleans sure made the code less understandable than a 'goto' > a label that stood in for that purpose... This was something that wasn't > well understood by language designers, and even today C and C++ neither > have good flow control beyond the basics. Even though both break and > continue could take an optional count without breaking old code.... Quite true. Modern Bourne shells let you supply a number to break and continue to specify how many loops to break. Ada, or maybe it was one of the Modula-X languages, let you put a label on a loop so that you could say `continue outer' or `break outer' and not need the booleans. This is something that newer languages (C#, Java, Go, ...) could have picked up but didn't, which I think is too bad. Arnold ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 16:39 ` arnold @ 2020-12-01 20:13 ` Rob Pike 2020-12-02 7:08 ` arnold 2020-12-01 20:20 ` Steffen Nurpmeso 2020-12-12 19:50 ` scj 2 siblings, 1 reply; 64+ messages in thread From: Rob Pike @ 2020-12-01 20:13 UTC (permalink / raw) To: Aharon Robbins; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 1402 bytes --] Go lets you say "Loop: for ..." and then "break Loop". -rob On Wed, Dec 2, 2020 at 3:40 AM <arnold@skeeve.com> wrote: > > On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote: > > > It was recognized that goto was not necessary if one had proper control > > > structures in a language (if/else, while), and that code with no (or > > > minimal) gotos was easier to read and understand. > > Warner Losh <imp@bsdimp.com> wrote: > > This is true for simple flow control. However, when you had to break out > of > > multiple levels, or continue not the inner loop, but the middle loop, the > > use of extra booleans sure made the code less understandable than a > 'goto' > > a label that stood in for that purpose... This was something that wasn't > > well understood by language designers, and even today C and C++ neither > > have good flow control beyond the basics. Even though both break and > > continue could take an optional count without breaking old code.... > > Quite true. Modern Bourne shells let you supply a number to break and > continue to specify how many loops to break. Ada, or maybe it was one of > the Modula-X languages, let you put a label on a loop so that you could > say `continue outer' or `break outer' and not need the booleans. > > This is something that newer languages (C#, Java, Go, ...) could have > picked > up but didn't, which I think is too bad. > > Arnold > [-- Attachment #2: Type: text/html, Size: 1988 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 20:13 ` Rob Pike @ 2020-12-02 7:08 ` arnold 2020-12-02 7:29 ` Rob Pike 0 siblings, 1 reply; 64+ messages in thread From: arnold @ 2020-12-02 7:08 UTC (permalink / raw) To: robpike, arnold; +Cc: tuhs If I knew that I forgot it (obviously). Thanks for letting me know. Yet another reason to move to Go. Has it been there since Day 1? Just wondering. Thanks, Arnold Rob Pike <robpike@gmail.com> wrote: > Go lets you say "Loop: for ..." and then "break Loop". > > -rob ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-02 7:08 ` arnold @ 2020-12-02 7:29 ` Rob Pike 0 siblings, 0 replies; 64+ messages in thread From: Rob Pike @ 2020-12-02 7:29 UTC (permalink / raw) To: Aharon Robbins; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 372 bytes --] Yes. -rob On Wed, Dec 2, 2020 at 6:08 PM <arnold@skeeve.com> wrote: > If I knew that I forgot it (obviously). Thanks for letting me know. > Yet another reason to move to Go. > > Has it been there since Day 1? Just wondering. > > Thanks, > > Arnold > > Rob Pike <robpike@gmail.com> wrote: > > > Go lets you say "Loop: for ..." and then "break Loop". > > > > -rob > > [-- Attachment #2: Type: text/html, Size: 828 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 16:39 ` arnold 2020-12-01 20:13 ` Rob Pike @ 2020-12-01 20:20 ` Steffen Nurpmeso 2020-12-01 20:39 ` Bakul Shah 2020-12-12 19:50 ` scj 2 siblings, 1 reply; 64+ messages in thread From: Steffen Nurpmeso @ 2020-12-01 20:20 UTC (permalink / raw) To: arnold; +Cc: tuhs arnold@skeeve.com wrote in <202012011639.0B1GdjcD031722@freefriends.org>: |> On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote: |>> It was recognized that goto was not necessary if one had proper control |>> structures in a language (if/else, while), and that code with no (or |>> minimal) gotos was easier to read and understand. | |Warner Losh <imp@bsdimp.com> wrote: |> This is true for simple flow control. However, when you had to break \ |> out of |> multiple levels, or continue not the inner loop, but the middle loop, the |> use of extra booleans sure made the code less understandable than \ |> a 'goto' |> a label that stood in for that purpose... This was something that wasn't |> well understood by language designers, and even today C and C++ neither |> have good flow control beyond the basics. Even though both break and |> continue could take an optional count without breaking old code.... | |Quite true. Modern Bourne shells let you supply a number to break and |continue to specify how many loops to break. Ada, or maybe it was one of |the Modula-X languages, let you put a label on a loop so that you could |say `continue outer' or `break outer' and not need the booleans. Bah, and perl could and obsoleted it, or at least jumping into blocks (not crossing initializers)! You now write code like my $ogoditisanewperl = 0; if(defined($nl = $self->begin_line)){ $self->begin_line(undef); $self->seen_endl(1); $ogoditisanewperl = 1 #goto jumpin; } while($ogoditisanewperl || ($nl = readline $self->infh)){ if(!$ogoditisanewperl){ ++${$self->__lineno}; $self->seen_endl($nl =~ s/(.*?)\s+$/$1/) } $ogoditisanewperl = 0; #jumpin: or even have to work with closures or whatever, or the worst, code duplication. |This is something that newer languages (C#, Java, Go, ...) could have \ |picked |up but didn't, which I think is too bad. Never without my goto:, and if it is only to break to error handling and/or staged destruction of local variables after initialization failures. Traumatic school impression, finding yourself locked in some PASCAL if condition, and no way to go to. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 20:20 ` Steffen Nurpmeso @ 2020-12-01 20:39 ` Bakul Shah 2020-12-01 21:24 ` Dan Cross 0 siblings, 1 reply; 64+ messages in thread From: Bakul Shah @ 2020-12-01 20:39 UTC (permalink / raw) To: Steffen Nurpmeso; +Cc: tuhs On Dec 1, 2020, at 12:20 PM, Steffen Nurpmeso <steffen@sdaoden.eu> wrote: > > Never without my goto:, and if it is only to break to error > handling and/or staged destruction of local variables after > initialization failures. Traumatic school impression, finding > yourself locked in some PASCAL if condition, and no way to go to. Pascal had goto. You can even do a non-local goto! In Go you don't need goto for the sort of thing you and McVoy talked about due to its defer statement and GC. Now granted GC may be too big of a hammer for C/C++ but a future C/C++ add defer gainfully as the defer pattern is pretty common. For example, mutex lock and unlock. But I have mixed feelings about goto vs continue/break. A nested loop with multiple continue/break can be as obscure. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 20:39 ` Bakul Shah @ 2020-12-01 21:24 ` Dan Cross 2020-12-01 23:44 ` John Cowan 0 siblings, 1 reply; 64+ messages in thread From: Dan Cross @ 2020-12-01 21:24 UTC (permalink / raw) To: Bakul Shah; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 3344 bytes --] On Tue, Dec 1, 2020 at 3:40 PM Bakul Shah <bakul@iitbombay.org> wrote: > On Dec 1, 2020, at 12:20 PM, Steffen Nurpmeso <steffen@sdaoden.eu> wrote: > > Never without my goto:, and if it is only to break to error > > handling and/or staged destruction of local variables after > > initialization failures. Traumatic school impression, finding > > yourself locked in some PASCAL if condition, and no way to go to. > > Pascal had goto. Pascal also had to go. (Thanks...I'm here all week.) You can even do a non-local goto! > > In Go you don't need goto for the sort of thing you and McVoy > talked about due to its defer statement and GC. Now granted > GC may be too big of a hammer for C/C++ but a future C/C++ > add defer gainfully as the defer pattern is pretty common. > For example, mutex lock and unlock. > C++ has had something analogous for some time: destructors that run when an object goes out of scope. Scope guards to do things like close files and auto-release locks on exiting a critical section are pretty common in that world, and in general, preferable to many of the alternatives (either deeply nested conditionals or banks of labels and `goto fail1;` `goto fail2;` etc, that successively release resources on return; the latter is basically hand-rolling what the language does automatically for you, and has been the cause of at least security-related bug: apple's "goto fail" bug in their SSL implementation). There's still no easy way to break out of nested loops, though. But I have mixed feelings about goto vs continue/break. A nested > loop with multiple continue/break can be as obscure. > I submit that it's in how you write it: if the set of conditions on which one would break/continue are explicit and early in the loop body, it can be a very expressive way to write something. But like any tool, it can be abused. Along those lines, it's always been interesting to me the way that Dijkstra's statement about goto must have influenced language design. The original "GOTO Statement Considered Harmful" note was quite damning, but I wonder if it meant to be: it strikes me that the really dangerous thing about "goto" isn't its mere existence or even its use, but rather, it's unconstrained use when better alternatives exist in the language. As one can observe in well-written C code, judicious use of `goto` can be quite elegant in comparison to the alternative. I've often wondered whether language designers, mindful of the pitfalls of `goto`, eventually took the most useful patterns of its usage and extracted them to stand on their own. Early returns from functions are an obvious example, but so are `break` and `continue` and one might argue exceptions fall into the same category. It strikes me that as we gain ever greater experience with languages, we find more and more examples of things one routinely does using a blunt instrument like goto, and we refine those to first-class features of the language. I think it's also illustrative of how social pressure can influence one to avoid "dangerous" patterns in favor of these language features. C isn't inherently more dangerous because it has a goto statement and labels; most of the time, one doesn't bother to use goto because alternatives exist that are more natural and fill the same role (continue, break, return, etc). - Dan C. [-- Attachment #2: Type: text/html, Size: 4361 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 21:24 ` Dan Cross @ 2020-12-01 23:44 ` John Cowan 0 siblings, 0 replies; 64+ messages in thread From: John Cowan @ 2020-12-01 23:44 UTC (permalink / raw) To: Dan Cross; +Cc: Bakul Shah, TUHS main list [-- Attachment #1: Type: text/plain, Size: 886 bytes --] On Tue, Dec 1, 2020 at 3:40 PM Bakul Shah <bakul@iitbombay.org> wrote: Along those lines, it's always been interesting to me the way that > Dijkstra's statement about goto must have influenced language design. The > original "GOTO Statement Considered Harmful" note was quite damning, but I > wonder if it meant to be: it strikes me that the really dangerous thing > about "goto" isn't its mere existence or even its use, but rather, it's > unconstrained use when better alternatives exist in the language. As one > can observe in well-written C code, judicious use of `goto` can be quite > elegant in comparison to the alternative. > D-1stra originally sent "Go to [...]" to CACM as a paper entitled "A Case Against The Go To Statement". But the editor, who was Niklaus Wirth, thought it important to publish it quickly, so he turned it into a letter to the editor and retitled it. [-- Attachment #2: Type: text/html, Size: 1942 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 16:39 ` arnold 2020-12-01 20:13 ` Rob Pike 2020-12-01 20:20 ` Steffen Nurpmeso @ 2020-12-12 19:50 ` scj 2 siblings, 0 replies; 64+ messages in thread From: scj @ 2020-12-12 19:50 UTC (permalink / raw) To: arnold; +Cc: tuhs When I wrote yacc, my first thought was to use goto's when implementing the finite state machine that is the heart of the parser. That's how FSM's work! I got the code written, but the C compiler complained and wouldn't compile. It turned out that, while goto was implemented in C, you could only have 10 of them! So I had to use a switch statement. I also recently came upon one of my first C programs -- I wrote a "go fish" game for my son as a practice in using the language. Reading the code was most instructive: 1. I had used FOUR gotos! I can't remember the last time I wrote a goto... 2. The program had a bug -- char being used as an int. Gave an advantage to the player. 3. The game was surprisingly hard to beat. I had to add a "dumb me down" flag because my kids never won. I think the game was distributed in some of the early releases. At one point, at a conference, the speaker accused the game of cheating! The game was just very good at remembering that if the player had asked it for a 6, and then it drew a 6 later, it would ask the player for 6 again. On 2020-12-01 08:39, arnold@skeeve.com wrote: >> On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote: >> > It was recognized that goto was not necessary if one had proper control >> > structures in a language (if/else, while), and that code with no (or >> > minimal) gotos was easier to read and understand. ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 16:24 ` Warner Losh 2020-12-01 16:39 ` arnold @ 2020-12-01 16:47 ` Larry McVoy 1 sibling, 0 replies; 64+ messages in thread From: Larry McVoy @ 2020-12-01 16:47 UTC (permalink / raw) To: Warner Losh; +Cc: TUHS main list On Tue, Dec 01, 2020 at 09:24:17AM -0700, Warner Losh wrote: > On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote: > > > It was recognized that goto was not necessary if one had proper control > > structures in a language (if/else, while), and that code with no (or > > minimal) gotos was easier to read and understand. > > > > This is true for simple flow control. However, when you had to break out of > multiple levels, or continue not the inner loop, but the middle loop, the > use of extra booleans sure made the code less understandable than a 'goto' > a label that stood in for that purpose... This was something that wasn't > well understood by language designers, and even today C and C++ neither > have good flow control beyond the basics. Even though both break and > continue could take an optional count without breaking old code.... Probably need to move this to COFF... but. Yeah, I've tons of examples of int somefunc() { char *a = 0; int *b = 0; flat *c = 0; int ret = 0; if (something) { a = malloc(something); } else { ret = NO_SOMETHING; goto error; } // same for b, c error: unless (ret) ret = GENERIC_ERROR; if (a) free(a); if (b) free(b); if (c) free(c); return (ret); } and you can handle a lot of simple cases that way. But sometimes the unraveling is more difficult than a simple free so I might have a goto unravel; instead of the generic goto out; I love goto *if* you figure out a pattern for using it and stick to that. For the people who don't like goto, what is your feeling on longjmp()? ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 15:09 ` Jim Capp 2020-12-01 15:35 ` Toby Thain 2020-12-01 15:38 ` arnold @ 2020-12-01 20:13 ` Dave Horsfall 2020-12-01 20:49 ` John Cowan 2 siblings, 1 reply; 64+ messages in thread From: Dave Horsfall @ 2020-12-01 20:13 UTC (permalink / raw) To: The Eunuchs Hysterical Society On Tue, 1 Dec 2020, Jim Capp wrote: > Is it possible the elimination of the GOTO statement in the Bourne > Shellwas related to a Letter to the Editor in Communications of the ACM, > March 1968: "Go To Statement Considered Harmful," by E. Dijkstra. And then there was the story of Professor Goto (a Japanese citizen and computer bod) who complained that everyone was trying to eliminate him :-) -- Dave ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-12-01 20:13 ` Dave Horsfall @ 2020-12-01 20:49 ` John Cowan 0 siblings, 0 replies; 64+ messages in thread From: John Cowan @ 2020-12-01 20:49 UTC (permalink / raw) To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society [-- Attachment #1: Type: text/plain, Size: 1705 bytes --] On Tue, Dec 1, 2020 at 3:14 PM Dave Horsfall <dave@horsfall.org> wrote: > And then there was the story of Professor Goto (a Japanese citizen and > computer bod) who complained that everyone was trying to eliminate him :-) > But cheerfully so, according to Knuth. He is also known for the invention of hash consing. Knuth's article "Structured programming with goto statements" <http://www.clifford.at/cfun/cliffdev/p261-knuth.pdf> is a great discussion of all the reasons you'd want to use goto in languages with just conditionals and while loops: error exits, jumping out of nested tests, jumping out of a nest of conditionals and break/continue (both essentially kinds of static catch tags), loops iterated n-and-a-half-times (break will do this, but it's over-powered), tail recursion, "encoding boolean variables in the program counter", coroutines. There are also such things as fast linear search by putting the searched-for value at the end of the array being searched, and what boils down to Lisp macros ("allowing an optimizing compiler to express its optimizations in the source language"). On Tue, Dec 1, 2020 at 3:39 PM Bakul Shah <bakul@iitbombay.org> wrote: > But I have mixed feelings about goto vs continue/break. A nested > loop with multiple continue/break can be as obscure. I think if the loops are labeled rather than the destinations, and you use "next foo" instead of "continue" and "last foo" instead of "break", it's all quite readable. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org Sir, I quite agree with you, but what are we two against so many? --George Bernard Shaw, to a man booing at the opening of _Arms and the Man_ [-- Attachment #2: Type: text/html, Size: 3317 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
* Re: [TUHS] The UNIX Command Language (1976) 2020-11-30 3:10 Joachim via TUHS ` (3 preceding siblings ...) 2020-12-01 3:59 ` jason-tuhs @ 2020-12-01 16:04 ` Tyler Adams 4 siblings, 0 replies; 64+ messages in thread From: Tyler Adams @ 2020-12-01 16:04 UTC (permalink / raw) To: Joachim; +Cc: TUHS main list [-- Attachment #1: Type: text/plain, Size: 747 bytes --] "The most exotic feature of the Shell is its ability to connect the standard output of one command directly to the standard input of another. *Again, neither program is aware that such things are going on.* In the example" So sad that many shell programs today break this abstraction barrier :/ Was there a watershed moment when people started doing this, or people just always couldn't resist the "convenience" of typing less? Tyler On Mon, Nov 30, 2020 at 5:18 AM Joachim via TUHS <tuhs@minnie.tuhs.org> wrote: > Apologies if this has already been linked here. > > "The UNIX Command Language is the first-ever paper published on the Unix > shell. It was written by Ken Thompson in 1976." > > https://github.com/susam/tucl > > > Joachim > [-- Attachment #2: Type: text/html, Size: 2626 bytes --] ^ permalink raw reply [flat|nested] 64+ messages in thread
end of thread, other threads:[~2020-12-12 20:07 UTC | newest] Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAKH6PiWA2uN4m0AGp7VRJTQ6XXDLJQweHoHjx2wN=zQYs1onpA@mail.gmail.com> 2020-12-03 20:31 ` [TUHS] The UNIX Command Language (1976) M Douglas McIlroy 2020-12-03 20:37 ` Niklas Karlsson 2020-12-03 20:43 ` Larry McVoy 2020-12-03 20:56 ` Ralph Corderoy 2020-12-03 21:01 ` Ben Walton 2020-12-03 21:12 ` Clem Cole 2020-12-04 0:29 ` Dave Horsfall 2020-12-04 0:43 ` Rob Pike 2020-12-04 0:48 ` Larry McVoy 2020-12-04 1:25 ` Dan Cross 2020-12-04 9:27 ` arnold 2020-12-04 11:33 ` Andy Kosela 2020-12-04 13:14 ` Tyler Adams 2020-12-04 13:17 ` Niklas Karlsson 2020-12-04 13:22 ` Tyler Adams 2020-12-04 13:25 ` Niklas Karlsson 2020-12-04 0:45 ` George Michaelson 2020-12-04 1:10 ` Bakul Shah 2020-12-04 1:17 ` George Michaelson 2020-12-03 20:51 ` M Douglas McIlroy 2020-12-01 3:13 Norman Wilson 2020-12-02 0:31 ` George Michaelson 2020-12-02 1:06 ` Adam Thornton 2020-12-02 17:02 ` John Cowan [not found] <CAMP=X_mO9oawUpHGOvgVtwVTgcmvdXAc5vrE_+s3d2NsH+1HgA@mail.gmail.com> 2020-12-01 0:00 ` Joachim via TUHS 2020-12-01 0:21 ` Dave Horsfall 2020-12-01 2:23 ` Larry McVoy -- strict thread matches above, loose matches on Subject: below -- 2020-11-30 3:10 Joachim via TUHS 2020-11-30 8:30 ` Thomas Paulsen 2020-11-30 13:36 ` Brantley Coile 2020-11-30 15:12 ` Tom Ivar Helbekkmo via TUHS 2020-11-30 15:52 ` Clem Cole 2020-11-30 16:25 ` Dan Cross 2020-11-30 16:38 ` Warner Losh 2020-11-30 16:41 ` Dan Cross 2020-11-30 16:37 ` Larry McVoy 2020-11-30 16:54 ` Clem Cole 2020-11-30 18:13 ` Theodore Y. Ts'o 2020-11-30 18:25 ` John Cowan 2020-11-30 18:37 ` Clem Cole 2020-11-30 20:11 ` arnold 2020-11-30 21:49 ` Will Senn 2020-12-01 2:55 ` Jon Steinhart 2020-11-30 18:46 ` Nemo Nusquam 2020-12-01 3:59 ` jason-tuhs 2020-12-01 4:03 ` Jon Steinhart 2020-12-01 9:27 ` Steve Nickolas 2020-12-01 15:09 ` Jim Capp 2020-12-01 15:35 ` Toby Thain 2020-12-01 15:38 ` arnold 2020-12-01 16:24 ` Warner Losh 2020-12-01 16:39 ` arnold 2020-12-01 20:13 ` Rob Pike 2020-12-02 7:08 ` arnold 2020-12-02 7:29 ` Rob Pike 2020-12-01 20:20 ` Steffen Nurpmeso 2020-12-01 20:39 ` Bakul Shah 2020-12-01 21:24 ` Dan Cross 2020-12-01 23:44 ` John Cowan 2020-12-12 19:50 ` scj 2020-12-01 16:47 ` Larry McVoy 2020-12-01 20:13 ` Dave Horsfall 2020-12-01 20:49 ` John Cowan 2020-12-01 16:04 ` Tyler Adams
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).