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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13928 invoked from network); 2 Jan 2023 21:10:35 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 2 Jan 2023 21:10:35 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 6CB3E424CA; Tue, 3 Jan 2023 07:10:01 +1000 (AEST) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) by minnie.tuhs.org (Postfix) with ESMTPS id 9541E424C1 for ; Tue, 3 Jan 2023 07:09:57 +1000 (AEST) Received: by mail-vs1-f49.google.com with SMTP id a64so26507507vsc.2 for ; Mon, 02 Jan 2023 13:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Gh0UvfEwK8fOxz96MbokK+25oszbVnPJjdpCs6QJBTs=; b=oytXjnW+1I+wb5lVms5kQi2L9L56E7TKdgevHaTlK/Yxu7BtGtypwP3Vchhv7gRotH dtlBtFAMsgYY/4LmXsShMD5EPUg1lQoZe2GShma6zIPMzRNnQ7mLCyD33Pwi8P7LbX+C 9+426zELSlqcZEcNrZcRX/pNuG/KI5Ty3DUHq3kNcOMf+C78+SKpEV4vED48PUjOjYiP x7JPOtqX50CbDszGUBRXeGb/kuFA4fPyeHNDOLmy6YIN5KHUhor1+dZTbEATu3eIwZzb 7jPm9HIfmjAsNU03DoWu36UmfeFMes0p/LLWnpRvjZVeSnJ/B91qleCadQ+2NOLizPXa reng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gh0UvfEwK8fOxz96MbokK+25oszbVnPJjdpCs6QJBTs=; b=Szj9q2wkEY5g4jJ4Ft83GubzX9z5jGKvZixyRZG4TcqTf2Z8scwhQpKCq4ywarDd9Z 5/YnifyWgTeMUws7TUzn+gVNjcIJTCvZ7Yqgo0mwiuvlWohaIBawe/s+0cRTOtbOcEH6 MaP3rH54fJ+o37I48eBmPZF8pgtStPaFkvXl2W48PgFpWug0LvaJu6fH0p2dAmDbm5Wy b7GYfbu8YTiiQPq1qxbmRvGGbquhom2xBOJFPKsIXcHruI6ndf3MldUjsDB/rOSC/uy0 joCUG08ha1VuXD1JXlYTwHTvdf5A3lHNs2U+BFhe6dQwdV72tHjOPF36M8V9UDROQtW6 9bAA== X-Gm-Message-State: AFqh2kr5DTAbPTI2CWYIm6AqZz6CJer8jV+f1ZkGGiKZuxeDJdF1CLYy AiiGu41LLBz6Urth4/9BMpBm62VF2s6u6kHU+crlslBJ X-Google-Smtp-Source: AMrXdXt4Po7TcNgGPaRdq6P3FDZ3oaFXz5epWsIZOW79s5KyehlcVRVi16ClzVH9h/Eds74AeRPRbleoCEUbmWPrVJk= X-Received: by 2002:a67:e958:0:b0:3b1:502b:fe23 with SMTP id p24-20020a67e958000000b003b1502bfe23mr5784909vso.19.1672693736518; Mon, 02 Jan 2023 13:08:56 -0800 (PST) MIME-Version: 1.0 References: <52FB6638-AEFF-4A4F-8C2E-32089D577BA0@planet.nl> <464819f0-d2f6-2a60-6481-a194f4428b4d@case.edu> <20221230200246.GW5825@mcvoy.com> <8ca17d52-a25a-dbbf-e1f0-d743b8884cfa@in-ulm.de> In-Reply-To: From: Rob Pike Date: Tue, 3 Jan 2023 08:08:45 +1100 Message-ID: To: Joseph Holsten Content-Type: multipart/alternative; boundary="000000000000fbb83505f14e5bac" Message-ID-Hash: KKMZ7FXWOHZRAUATTCWDV2VBASJQLKTH X-Message-ID-Hash: KKMZ7FXWOHZRAUATTCWDV2VBASJQLKTH X-MailFrom: robpike@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Tautological Eunuch Horticultural Scythians X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Command Line Editing in the Terminal Driver (Was: A few comments on porting the Bourne shell) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000fbb83505f14e5bac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It just seems much more natural to me to have line editing provided at some fundamental level. Putting it in the shell or some library means some tools get it but some don't. Why should sh have editing but mail not? But then there's glob. Do it once, do it well, and do it for everything, where "it" is a wildcard that refers to every important detail. -rob On Tue, Jan 3, 2023 at 7:03 AM Joseph Holsten wrote: > On Fri, Dec 30, 2022, at 12:42, Sven Mascheck wrote: > > and in "ksh - An Extensible High Level Language" David Korn writes: > > - "Originally the idea of adding command line editing to ksh was > rejected in the hope that line editing would move into the terminal > driver." [2] > > [2] https://www.in-ulm.de/~mascheck/bourne/korn.html > > > This phrase has haunted me for years. It=E2=80=99s so clearly the =E2=80= =9Ccorrect=E2=80=9D > separation of concerns, until you actually attempt implementing it. And > Bourne=E2=80=99s irregular grammar certainly doesn=E2=80=99t help here. I= =E2=80=99d prefer to move > beyond readline, ideally something like text objects per > vim/zsh/treesitter. But having one parser in the interpreter and another = in > the line editor becomes quite exciting if you want a true bourne or even > posix sh. > > But the thing that brought be back to playing against this quote again > this year was starting to research the QED lineage and discovering helix = & > kakoune. Honestly, they feels like the most coherent advancements in > QED-style editors since sam & acme. (Yes, I=E2=80=99m irrationally exclud= ing vim > text-objects, mostly because no one removed editor features that t-o made > redundant. It=E2=80=99s as if ed had twice as many commands, one for rege= xp matches > and one for pre-ken-QEDist exact matches.) > > Anyway, the only time I=E2=80=99ve really seen =E2=80=9Cline editing [=E2= =80=A6] move into the > terminal driver=E2=80=9D sound possible was acme=E2=80=99s win. For those= who haven=E2=80=99t had > the pleasure, rsc describes it at 15:25 in https://research.swtch.com/acm= e. > =E2=80=9CI worked for many years in a shell without history or command li= ne > editing, and I never missed it because Acme is providing this for me.=E2= =80=9D > > It=E2=80=99s hard to convey how surprisingly pleasant sh or rc can be wit= hin acme > win to someone who has only used them within a mere > terminal-emulator-emulator. Especially since a greenfield terminal app > has more code emulating old xterm behaviors than physical vt100 behaviour= s. > This is especially exhausting when you try to use something like NeoVim= =E2=80=99s > :term expecting it to just work and discover that buffer-line-wrapping on > window-resize hasn=E2=80=99t been implemented. > > Anyone seen any other =E2=80=9Cterminal drivers=E2=80=9D that provide a p= leasant > alternative to line editing? > -- > ~j > --000000000000fbb83505f14e5bac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It just seems much more natural to me to have line editing provid= ed at some fundamental level. Putting it in the shell or some library means= some tools get it but some don't. Why should sh have editing but mail = not? But then there's glob.

Do it once, do it well, and do it for eve= rything, where "it" is a wildcard that refers to every important = detail.

-rob


On Tue, Jan 3, 2023 at 7:03 AM Joseph Holsten <joseph@josephholsten.com> w= rote:
On Fri, Dec 30, 2022, at 12:4= 2, Sven Mascheck wrote:

and in "ksh - An Extensible High Level Language&quo= t; David Korn writes:

  • =C2=A0"Originally the idea of addi= ng command line editing to ksh was rejected in the hope that line editing would move into the terminal driver." [2]
This phrase has haunted me for years. It=E2=80=99s so clearly = the =E2=80=9Ccorrect=E2=80=9D separation of concerns, until you actually at= tempt implementing it. And Bourne=E2=80=99s irregular grammar certainly doe= sn=E2=80=99t help here. I=E2=80=99d prefer to move beyond readline, ideally= something like text objects per vim/zsh/treesitter. But having one parser = in the interpreter and another in the line editor becomes quite exciting if= you want a true bourne or even posix sh.

But = the thing that brought be back to playing against this quote again this yea= r was starting to research the QED lineage and discovering helix & kako= une. Honestly, they feels like the most coherent advancements in QED-style = editors since sam & acme. (Yes, I=E2=80=99m irrationally excluding vim = text-objects, mostly because no one removed editor features that t-o made r= edundant. It=E2=80=99s as if ed had twice as many commands, one for regexp = matches and one for pre-ken-QEDist exact matches.)

=
Anyway, the only time I=E2=80=99ve really seen =E2=80=9Cline editing [= =E2=80=A6] move into the terminal driver=E2=80=9D sound possible was acme= =E2=80=99s win. For those who haven=E2=80=99t had the pleasure, rsc describ= es it at 15:25 in=C2=A0https://research.swtch.com/acme. =E2=80=9CI worked for many= years in a shell without history or command line editing, and I never miss= ed it because Acme is providing this for me.=E2=80=9D

It=E2=80=99s hard to convey how surprisingly pleasant sh or rc can = be within acme win to someone who has only used them within a mere terminal= -emulator-emulator. Especially since a greenfield terminal app has mo= re code emulating old xterm behaviors than physical vt100 behaviours. This = is especially exhausting when you try to use something like NeoVim=E2=80=99= s :term expecting it to just work and discover that buffer-line-wrapping on= window-resize hasn=E2=80=99t been implemented.

Anyone seen any other =E2=80=9Cterminal drivers=E2=80=9D tha= t provide a pleasant alternative to line editing?
--
~j
--000000000000fbb83505f14e5bac--