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.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 B164D25C27 for ; Mon, 4 Mar 2024 08:19:31 +0100 (CET) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 9FDF743683; Mon, 4 Mar 2024 17:19:26 +1000 (AEST) Received: from vimdzmsp-sfwd04.bluewin.ch (vimdzmsp-sfwd04.bluewin.ch [195.186.227.132]) by minnie.tuhs.org (Postfix) with ESMTPS id 58A2743682 for ; Mon, 4 Mar 2024 17:19:21 +1000 (AEST) Received: from smtpclient.apple ([178.197.199.174]) by vimdzmsp-sfwd04.bluewin.ch Swisscom AG with ESMTPA id h2bWrAQ9B3u1Ih2bWr6Upb; Mon, 04 Mar 2024 08:19:19 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluewin.ch; s=fxzs-2048-20230414; t=1709536759; bh=TD61TzU7zLIPHa/hZpmzqU4mBEqgHACZLLSPZecEgy0=; h=Mime-Version:Subject:From:Date:Cc:Message-Id:To; b=fUOTz56X+WxjJClxy0t06omqsuMyOsD5mVJR1isZd6l/AED8uRoNpgfT0Oua5N5vy fdw7W3B3VocQSaEzQauYWzBwOFxM9RLQGJjvLE0TxPHwfjmZ6NLurly9s/cFFgi/fO fWITXef7WkVE0B+OhH+r6HIHGK2f15xRTLTd1Tz8e9L6J4y9r1giAm1dKwJtqkI/TB xvAB0vTjGJ1H4CSvQ9n0/T0T53Xloof7ehq+TbdbH/m/+ZdJxRB1P3SnPNus/5rL9S aOsfURZefhdMJxJeiv7I8UEk26QQ7T0N/u9yXQOCE7DXJ5NrDQfZweqhNAiPYJX6rj S8tlUAx/imo0w== X-Bluewin-Spam-Analysis: v=2.4 cv=Xs5ZOkF9 c=1 sm=1 tr=0 ts=65e575f7 a=uYrNQAY2H5/Xln5MjySFAg==:117 a=uYrNQAY2H5/Xln5MjySFAg==:17 a=IkcTkHD0fZMA:10 a=AoeSMSUmAAAA:8 a=pGLkceISAAAA:8 a=Z-Qis9PrAmR3HaiA8KAA:9 a=QEXdDO2ut3YA:10 a=OclUjHcjm4gA:10 a=2UY7SMgi64q-0UtCmZ5F:22 a=Cm-gA_nj2VkGgBT0UFid:22 X-Bluewin-Spam-Score: 0.00 X-FXIT-IP: IPv4[178.197.199.174] Epoch[1709536759] X-Bluewin-AuthAs: dave.long@bluewin.ch Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) From: Dave Long In-Reply-To: Date: Mon, 4 Mar 2024 08:19:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <84A1CCDB-15CD-4A67-949E-FC83A698E032@bluewin.ch> References: <13abd764-984a-4c9f-8e3e-b1eb7c624692@gmail.com> To: Otto Moerbeek X-Mailer: Apple Mail (2.3774.400.31) X-CMAE-Envelope: MS4xfKcS/W0DiujPfC8DyLnvuNTG2WIN8rqg576MQHsj+nUIBoJntbTSEH/LfT6EUZYjOzizJv7SJwT6GYEOjrEpqmuZIrahf5CzgevdZQmmo5OLsY/J3U67 TkRXh54EK9T2Svis/rlGXhX0tn7yEbSGR8AEkh7w08WIV1uuNw/fIXaJN+Wie0mkFvPV5Qv783LXtuBlVID9wL+kpQK+3IC7b/7KiO6ErsX6ARuDdbmMWoQ8 MrwYVnB1UaP96iJSupCMj2G18Fbd/M71ONoa22XdKNc= Message-ID-Hash: 274UEMYXFJH7K5AZ35CA2TLSMVNUYIB2 X-Message-ID-Hash: 274UEMYXFJH7K5AZ35CA2TLSMVNUYIB2 X-MailFrom: dave.long@bluewin.ch 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: Marc Rochkind , 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: Did `learn` have a regex module? (my memory* does not suffice, and I = didn't even manage to get google to tell me if it were learn(1) or = learn(6), so please forgive the imprecision of this response) -Dave * although I do recall this was how I learned one of ed(1) or vi(1) > On 4 Mar 2024, at 08:10, Otto Moerbeek via TUHS wrote: >=20 > On Sun, Mar 03, 2024 at 07:03:39PM -0700, Marc Rochkind wrote: >=20 >> Will, here's my recollection, when I got to UNIX in late 1972 or >> thereabouts: >>=20 >> First, there was ed. grep and sed were derived from ed, so came along >> later. awk came along way later. >>=20 >> 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! >>=20 >> (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.) >=20 > I like to add that there was also quite a large set of additional > documentatiomn (Volume 2, Voilume 1 were the man pages), which > includes "Advanced Editing on UNIX" giving many examples on the use of > regexes in ed(1). >=20 > I do remeber reading a lot from Volume 2, as CS students in Amsterdam > we received printed and bound copies of both Volume 1 and 2. So in my > case, "only man pages or source" is not true. Having paper versions > was importent, because access to terminals for students was limited > (until I became a teaching assistent, which came with privileges, > including 24h access to terminals) >=20 > -Otto >=20 >>=20 >> Also, it should be noted that ed produced a single error message: a >> question mark. No wasting of teletype paper! >>=20 >> The motivation for learning regular expressions was that that's how = you >> edited files. ed was the only game in town. >>=20 >> (sh used a greatly restricted form of regular expressions, which were >> documented on the sh man page.) >>=20 >> Marc Rochkind >>=20 >> On Sun, Mar 3, 2024 at 6:31=E2=80=AFPM Will Senn = wrote: >>=20 >>> Hi All, >>>=20 >>> 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... >>>=20 >>> 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? >>>=20 >>> Thanks, >>>=20 >>> Will >>>=20 >>=20 >>=20 >> --=20 >> *My new email address is mrochkind@gmail.com *