From mboxrd@z Thu Jan 1 00:00:00 1970 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=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10861 invoked from network); 31 Jul 2021 19:42:10 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 31 Jul 2021 19:42:10 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 241F09C9E0; Sun, 1 Aug 2021 05:42:09 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id AE6369C9B2; Sun, 1 Aug 2021 05:41:46 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ccc.com header.i=@ccc.com header.b="B1Pbptw6"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 49CE29C9B2; Sun, 1 Aug 2021 05:41:44 +1000 (AEST) Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by minnie.tuhs.org (Postfix) with ESMTPS id 85D449C9AF for ; Sun, 1 Aug 2021 05:41:43 +1000 (AEST) Received: by mail-ot1-f45.google.com with SMTP id 61-20020a9d0d430000b02903eabfc221a9so13429861oti.0 for ; Sat, 31 Jul 2021 12:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=he4oRIMcFuJc7w6ZgNN6KujQXIzvQ5cqu0pm1jzoVAo=; b=B1Pbptw6Sjhd0WgIt/LKRCKtBTZMtT2vh5H9hYeW2fHcoaEKTU9xBql1Nyi0rWVHuC DL1YltZQ0iBO0Swiwqmt2qGhjag5+iHD7R31eEEKgH9WzyibDIRGS9Ukq4PYjSm8KTew TnJsIqgs4UxcKZh+T6ygsjv42zuwZmiSESX3Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=he4oRIMcFuJc7w6ZgNN6KujQXIzvQ5cqu0pm1jzoVAo=; b=nC17jOVREAxHx0hYzTdD4eh1ySuKCY3fU5My6R1+GufDKvAozxyVDZVc5PCto0VM16 N8zfZ6Ddwx83Km/61pa9oMHEdqRfsWZN7M1J/soASVLpwy1uiF5RZNQCzMbdM2Dpkfs8 V4i+4zF7CiLX7tlozRGu6QupDQEtMr7pkqwF1FsbCqthkXmTbmos0genNau8rGoff4d3 HDm5ArbjzvBe1Qbe8Swd403paAhOCfSmVdfOSG+3SKpkASNEbBnOORfLyMypFIFrTZt5 oOiOzGBMpw8wNN9M53DrwS1U8Bg4p6h/aKBr65r+9obgYlefWt/Kqh7ajmVlzupg2+ja Ftzw== X-Gm-Message-State: AOAM531it8XA2bEfPobGy0vekxw6PC5DuUytE9IYzRf5si0bmSc+jNj8 IUOa3faj0jCEbeLjjx77rIr5gdUUVxBP1YLcX7FpZp10QhRNVd2W X-Google-Smtp-Source: ABdhPJwaNNOVkxRo1s/VPmiGS3fRHa80aA0ElP2Ox2o0Sof3zDVRZQSRdIxsYWKZ8RtEGU9eeN6k0lDjJBncV4G1t8U= X-Received: by 2002:a9d:1ea5:: with SMTP id n34mr6444938otn.340.1627760502563; Sat, 31 Jul 2021 12:41:42 -0700 (PDT) MIME-Version: 1.0 References: <20210731142533.69caf929@moon> <20210731205609.07e8149f@moon> In-Reply-To: <20210731205609.07e8149f@moon> From: Clem Cole Date: Sat, 31 Jul 2021 15:41:17 -0400 Message-ID: To: Michael Siegel Content-Type: multipart/alternative; boundary="00000000000088f68f05c87086d5" Subject: Re: [TUHS] Systematic approach to command-line interfaces X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --00000000000088f68f05c87086d5 Content-Type: text/plain; charset="UTF-8" On Sat, Jul 31, 2021 at 2:58 PM Michael Siegel wrote: > I mean, which shell would I use to accomplish this on Unix? In the old days, when the first Unix shell wars started, there was a Unix adage: *"Bourne to Program, Type with Joy"* FWIW: tcsh supports TOPS-20 autocomplete -- a little work with your search engine, you can figure out how to use its many options. That said, the GNU bash is said to do it also, but I can not say I have tried it personally since the ROMS in my fingers were long ago burned to 'Type with Joy.' Also in 50 years, it's so much that UNIX is perfect, it has lots of flaws and quirks. Thinking about them and considering 'better' solutions is often wise, particularly when capabilities (like Moore's law) give you new tools to solve them. But a level of wisdom here is not all of those quirks are worth repairing. In the case of command-line parsing, getopt(3) has proven to be 'good enough' for most things. If it was really as bad as you seem to think, I suspect one of the previous N attempts over the last 50 years might have taken root. My point in my previous message was that getopt(3) was created to solve the original UNIX problem. It did actually take root (I'll not get into if the Gnu long stuff was an improvement). But there were other attempts, including the Tops-20 scheme (which has been pointed out is quite similar to yours) that have been around for at least 35 years in the UNIX community and it did not catch on. I ask you to think about if maybe your value of that feature might be more than others have set it to be. As an analog, when I first came to UNIX and C from other systems, ideas like the open curly brace/close curly brace instead of BEGIN/END in C, and there were plenty of things in Ken's original shell that I found annoying, particularly coming from the regularity of TOPS-20 and the like. Hey, I used EMACS, TECO and DDT and none of them were in my new kit. But I forced myself to learn the new tools and new way of doing things. Since I was programming on UNIX in C, I made sure my code looked like everyone else [K&R did not yet exist -- but we would later call this 'White Book C." Why? So someone else could read it. I learned that style too and frankly have a hard time with any C code that does not follow it today. But if I am writing in a BEGIN/END style language, I adopt that style. When in Rome and all that. In time, the wonderful things I could do in the UNIX world way outpaced what I could do in the old world. In fact, by the time either TECO or EMACS bacame available for my use by then on a Vax, I never switched off the earlier UNIX tools I had learned. Like I said, I 'Type with Joy", frankly even if I'm on a Mac, Linux or Windows -- I switch the shell to be tcsh. Could I learn a new shell, sure? If I were to switch today, it would probably be zsh, but my suggestion is to learn the tools that system has really well. They keep using them. Adapt to the style of the system you are using. Anyway, that my thoughts from an old guy. --00000000000088f68f05c87086d5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jul 31, 2021 at 2:58 PM Michael Siegel &= lt;msi@malbolge.net> wrote:
<= /font>
I mean, which shell would I use to accomplish this = on Unix?
In the old day= s, when the first Unix shell wars started, there was a Unix adage:=C2=A0 "Bourne to Program, Type wi= th Joy"=C2=A0<= /font>
FWIW: tcsh supports TOPS-20= autocomplete -- a little work with your search engine, you can figure out = how to use its many options.=C2=A0 That said, the GNU bash is said to do it= also, but=C2=A0 I can not say I have tried it personally since the ROMS in= my fingers were long ago burned to 'Type with Joy.'

Also i= n 50 years, it's so much that UNIX is perfect, it has lots of flaws and= quirks.=C2=A0 Thinking about them and considering 'better' solutio= ns is often wise, particularly when capabilities (like Moore's law) giv= e you new tools to solve them.=C2=A0 But a level of wisdom here is not all = of those quirks are worth repairing.=C2=A0 In the case of command-line pars= ing, getopt(3) has proven to be 'good enough' for most things.=C2= =A0 If=C2=A0it was really as bad as you seem to think, I suspect one of the= previous N attempts over the last 50 years might have taken root.

= My point in my previous message was that getopt(3) was created to solve the= original UNIX problem.=C2=A0 It did actually take root (I'll not get i= nto if the Gnu long stuff was an improvement).=C2=A0 But there were other a= ttempts, including=C2=A0the Tops-= 20 scheme (which has been pointed out is quite=C2=A0similar to yours) that have been around for at least 35 = years in the UNIX community and it did not catch on.=C2=A0 I ask you to thi= nk about if maybe=C2=A0your value of that feature might be more than others= have set it to be.

<= /span>
As an analog, when I firs= t came to UNIX and C from other systems, ideas like the open curly brace/cl= ose curly brace instead of BEGIN/END in C, and there were plenty of things = in Ken's original shell that I found annoying, particularly coming from= the regularity of TOPS-20 and the like.=C2=A0 Hey, I used EMACS, TECO and = DDT and none of them were in my new kit.=C2=A0 =C2=A0But I forced myself to= learn the new tools and new way of doing things.=C2=A0 Since I was program= ming on UNIX in C, I made sure my code looked like everyone else [K&R d= id not yet exist -- but we would later call this 'White Book C."= =C2=A0 =C2=A0Why? So someone else could read it.=C2=A0 =C2=A0I learned that= style too and frankly have a hard time with any C code that does not follo= w it today. But if I am writing in a BEGIN/END style language, I adopt that= style.=C2=A0 When in Rome and all that.

In t= ime, the wonderful things I could do in the UNIX world way outpaced what I = could do in the old world.=C2=A0 =C2=A0In fact, by the time either TECO or = EMACS bacame available for my use by then on a=C2=A0Vax, I never switched o= ff the earlier UNIX tools I had learned.=C2=A0 =C2=A0Like I said, I 'Ty= pe with Joy", frankly even if I'm on a Mac, Linux or Windows -- I = switch the shell to be tcsh.=C2=A0 Could I learn a new shell, sure?=C2=A0 = =C2=A0If I were to switch today, it would probably be zsh, but my suggestio= n is to learn the tools that system has really well.=C2=A0 They keep using = them. Adapt to the style of the system you are using.

Anyway, that=C2=A0my thoughts from an old guy.

--00000000000088f68f05c87086d5--