From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [IPv6:2600:3c01:e000:146::1]) by inbox.vuxu.org (Postfix) with ESMTP id A0A2221635 for ; Mon, 4 Mar 2024 04:38:58 +0100 (CET) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 7BA6443667; Mon, 4 Mar 2024 13:38:52 +1000 (AEST) Received: from mcvoy.com (mcvoy.com [192.169.23.250]) by minnie.tuhs.org (Postfix) with ESMTPS id E3F9043664 for ; Mon, 4 Mar 2024 13:38:45 +1000 (AEST) Received: by mcvoy.com (Postfix, from userid 3546) id 56B8635E084; Sun, 3 Mar 2024 19:38:45 -0800 (PST) Date: Sun, 3 Mar 2024 19:38:45 -0800 From: Larry McVoy To: Marc Rochkind Message-ID: <20240304033845.GB5304@mcvoy.com> References: <13abd764-984a-4c9f-8e3e-b1eb7c624692@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Message-ID-Hash: 7CCR7K7UMVO4HSGNLT4NA4CTCQKB7DCE X-Message-ID-Hash: 7CCR7K7UMVO4HSGNLT4NA4CTCQKB7DCE X-MailFrom: lm@mcvoy.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Will Senn , TUHS X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: regex early discussions List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Marc is right. I'll add that I grew up in terminal rooms, a bunch of kids connected to a VAX 780, like 40 or more. I have no idea how the kids ahead of me learned but I learned by looking at their terminal and going "what did you just do?". My real understanding of regex is from Henry Spencer's regex. On Sun, Mar 03, 2024 at 07:03:39PM -0700, Marc Rochkind wrote: > Will, here's my recollection, when I got to UNIX in late 1972 or > thereabouts: > > First, there was ed. grep and sed were derived from ed, so came along > later. awk came along way later. > > There were only manual pages. You typed "man ed" and there it was. The man > pages were very accurate, very clear, and very authoritative. Many found > them too succinct, especially as UNIX got more popular, but all of us back > in the day found them perfect. Maybe you had to read the man page a few > times to understand it, but at least that's all you had to read. No need to > hunt around for more documentation! > > (Well, there was more documentation: The source code, which was all online. > But reading the ed source to understand regular expressions was impossible. > It was in assembler, and Ken was generating code on the fly as the > expression was compiled.) > > Also, it should be noted that ed produced a single error message: a > question mark. No wasting of teletype paper! > > The motivation for learning regular expressions was that that's how you > edited files. ed was the only game in town. > > (sh used a greatly restricted form of regular expressions, which were > documented on the sh man page.) > > Marc Rochkind > > On Sun, Mar 3, 2024 at 6:31???PM Will Senn wrote: > > > Hi All, > > > > I was wondering, what were the best early sources of information for > > regexes and why did folks need to know them to use unix? In my recent > > explorations, I have needed to have a better understanding of them, so I'm > > digging in... awk's my most recent thing and it's deeply associated with > > them, so here we are. I went to the bookshelf to find something appropriate > > and as usual, I've traced to primary sources to some extent. I started with > > Mastering Regular Expressions by Friedl, and I won't knock it (it's one of > > the bestsellers in our field), but it's much to long for my personal taste > > and it's not quite as systematic as I would like (the author himself notes > > that his interests are less technical than authors preceding him on the > > subject). So, back to the shelves... Bourne's, The Unix Environment, and > > Kernighan & Pike's, The Unix Programming Evironment both talk about them in > > the context of grep, ed, sed, and awk. Going further back, the Unix > > Programmer's Manual v7 - ed, grep, sed, awk... > > > > After digging around it seems like folks needed regexes for ed, grep, sed > > and awk... and any other utility that leveraged the wonderful nature of > > these handy expressions. Fine. Where did folks go learn them? Was there a > > particularly good (succinct and accurate) source of information that folks > > kept handy? I'm imagining (based on what I've seen) that someone might cut > > out the ed discussion or the grep pages of the manual and tape them to > > their monitors, but maybe I'm stooopid and they didn't need no stinkin' > > memory device for regexes - surely they're intuitive enough that even a > > simpleton could pick them up after seeing a few examples... but if that > > were really the case, Friedl's book would have been a flop and it wasn't > > :). So seriously, if you remember that far back - what was the definitive > > source of your regex knowledge and what were the first motivators for > > learning them? > > > > Thanks, > > > > Will > > > > > -- > *My new email address is mrochkind@gmail.com * -- --- Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat