The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Marshall Conover <marzhall.o@gmail.com>
To: Joseph Holsten <joseph@josephholsten.com>
Cc: Tautological Eunuch Horticultural Scythians <tuhs@tuhs.org>
Subject: [TUHS] Re: Command Line Editing in the Terminal Driver (Was: A few comments on porting the Bourne shell)
Date: Tue, 3 Jan 2023 11:53:49 -0500	[thread overview]
Message-ID: <CAK0pxsH6bWTLVApE_vDhATmMgaF+nwc5D3pSz4srtwGS-8Ux_A@mail.gmail.com> (raw)
In-Reply-To: <b689c244-3ea9-4fd6-bb45-a59d131071d6@app.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 4937 bytes --]

Along these lines but not quite, Jupyter Notebooks have stood out to me as
another approach to this concept, with behavior I'd like to see implemented
in a shell.

With these notebooks, users type text into blocks, and then can have these
blocks evaluated by some underlying engine, with the results of the
evaluation showing up in a block underneath where they entered text.
Results can be not only text, but things like rendered charts and images.
There may be GUI-interactable rendered elements as well, but I'm unsure.

Notably, text-entry blocks are created such that each new block holds onto
the context of the previous blocks. So, a variable defined in the first
eval block will be available in later blocks.

Currently these are used primarily for demonstrating APIs, exploring data
with python, or writing quick PoCs that can then be extracted into an
application. Some companies, such as Netflix, have experimented with using
them entirely as a replacement for shell scripts, which is the sort of
research I'd most love to see.

Fundamentally, I think it's a smell that the way we interact with our
systems is tied to the long-gone hardware requirement of "be usable with a
teletype."  Acme was certainly a move towards recognizing the value of
being able to reuse space that, in TTYs, would be 'dead' text. The ability
to evaluate commands in Acme, and the further inclusion of an underlying
evaluator that holds state by Jupyter were good steps forward, I think.

I'd love to see experimentation with a whole system that takes the jupyter
approach, with nested namespaces forming applications, combined with data
being held in "blocks" as well as code - much like acme opens and edits
files as well as letting you execute either them or snippets in them. I
think there's a chance something could be developed that would better fit
the way we interface with computers today, and the underlying engine
approach would move us toward the "everything speaks one language" design
we lost in the move from shells to standalone GUI applications.

Mostly, I'd be bummed to see yet another shell that pretends it's behind a
"glass teletype", to use the tongue-in-cheek term from "Ed Mastery", or
just continuing elaboration on that design, despite the fact I use shells
daily. It's the best we have now, but I feel like it's the way forward.

Cheers!

Marshall

P.S. - Kakoune is neat and I'm going to have to poke around at that, thanks
for pointing it out.

On Mon, Jan 2, 2023 at 3:03 PM Joseph Holsten <joseph@josephholsten.com>
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’s so clearly the “correct”
> separation of concerns, until you actually attempt implementing it. And
> Bourne’s irregular grammar certainly doesn’t help here. I’d 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’m irrationally excluding vim
> text-objects, mostly because no one removed editor features that t-o made
> redundant. It’s 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’ve really seen “line editing […] move into the
> terminal driver” sound possible was acme’s win. For those who haven’t had
> the pleasure, rsc describes it at 15:25 in https://research.swtch.com/acme.
> “I worked for many years in a shell without history or command line
> editing, and I never missed it because Acme is providing this for me.”
>
> It’s 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 more code emulating old xterm behaviors than physical vt100 behaviours.
> This is especially exhausting when you try to use something like NeoVim’s
> :term expecting it to just work and discover that buffer-line-wrapping on
> window-resize hasn’t been implemented.
>
> Anyone seen any other “terminal drivers” that provide a pleasant
> alternative to line editing?
> --
> ~j
>

[-- Attachment #2: Type: text/html, Size: 6059 bytes --]

  parent reply	other threads:[~2023-01-03 16:55 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30 18:25 [TUHS] A few comments on porting the Bourne shell Paul Ruizendaal
2022-12-30 19:51 ` [TUHS] " Chet Ramey
2022-12-30 20:02   ` Larry McVoy
2022-12-30 20:31     ` Adam Thornton
2022-12-30 20:49       ` Chet Ramey
2022-12-30 20:42     ` Sven Mascheck
2022-12-30 20:48       ` Jon Steinhart
2022-12-30 20:51         ` Sven Mascheck
2022-12-31 11:40         ` Ralph Corderoy
2022-12-31 18:49           ` Jon Steinhart
2022-12-31 19:24             ` Clem Cole
2023-01-03 16:32               ` Chet Ramey
2023-01-01  1:51             ` Ron Natalie
2023-01-02 20:03       ` [TUHS] Command Line Editing in the Terminal Driver (Was: A few comments on porting the Bourne shell) Joseph Holsten
2023-01-02 20:33         ` [TUHS] Re: Command Line Editing in the Terminal Driver Lars Brinkhoff
2023-01-11  2:51           ` Chris Hanson
2023-01-11  3:53             ` Greg 'groggy' Lehey
2023-01-02 21:08         ` [TUHS] Re: Command Line Editing in the Terminal Driver (Was: A few comments on porting the Bourne shell) Rob Pike
2023-01-03 16:53         ` Marshall Conover [this message]
2023-01-04  9:18           ` Joseph Holsten
2023-01-11  2:56           ` Chris Hanson
2022-12-30 20:47     ` [TUHS] Re: A few comments on porting the Bourne shell Chet Ramey
2022-12-31  0:08     ` Luther Johnson
2022-12-31  3:59       ` Larry McVoy
2022-12-31  4:12         ` Steve Nickolas
2022-12-31  4:18         ` Bakul Shah
2022-12-31  4:40           ` Larry McVoy
2022-12-31  4:19         ` Marc Donner
2022-12-31  4:23         ` Dave Horsfall
2022-12-31  4:37           ` Clem Cole
2023-01-02  5:10           ` Mary Ann Horton
2023-01-02 16:25             ` Clem Cole
2023-01-02 16:51               ` Larry McVoy
2023-01-02 17:32                 ` Adam Thornton
2023-01-02 17:43                   ` Larry McVoy
2023-01-02 17:48                     ` Luther Johnson
2023-01-02 18:00                       ` G. Branden Robinson
2023-01-02 18:05                         ` Luther Johnson
2023-01-02 18:12                         ` Larry McVoy
2023-01-02 18:16                           ` Clem Cole
2023-01-02 19:50                             ` Warner Losh
2023-01-02 20:05                               ` Adam Thornton
2023-01-02 19:21                           ` G. Branden Robinson
2023-01-02 19:34                             ` Rich Salz
2023-01-02 20:12                               ` Larry McVoy
2023-01-02 20:24                               ` G. Branden Robinson
2023-01-02 20:41                                 ` Larry McVoy
2023-01-02 21:00                                   ` Dan Cross
2023-01-02 21:06                                     ` Clem Cole
2023-01-02 21:19                                       ` Dan Cross
2023-01-02 22:54                                         ` segaloco via TUHS
2023-01-02 23:58                                           ` Jon Steinhart
2023-01-04  9:00                                             ` Joseph Holsten
2023-01-02 22:43                                       ` Steve Nickolas
2023-01-02 21:08                                     ` Joseph Holsten
2023-01-02 21:15                                       ` Adam Thornton
2023-01-02 17:55                     ` Adam Thornton
2023-01-02 18:11                       ` Clem Cole
2023-01-02 18:36                         ` Dan Cross
2023-01-02 18:48                           ` Dan Cross
2023-01-02 18:18                       ` Larry McVoy
2023-01-04  3:20                     ` John Cowan
2023-01-04  3:31                       ` Dan Cross
2023-01-04  4:16                         ` Bakul Shah
2023-01-04 16:15                           ` Dan Cross
2023-01-04 18:28                             ` ron minnich
2023-01-04 19:33                             ` Chet Ramey
2023-01-04 15:21                       ` Ralph Corderoy
2023-01-04 15:54                         ` Ron Natalie
2023-01-02 17:55                 ` Clem Cole
2023-01-03 17:08                   ` Paul Winalski
2023-01-03 19:19                     ` Warner Losh
2023-01-03 19:56                       ` Luther Johnson
2023-01-03 20:21                       ` Dave Horsfall
2023-01-03 21:47                       ` Clem Cole
2023-01-03 21:51                         ` Clem Cole
2022-12-31  4:41         ` Greg 'groggy' Lehey
2022-12-30 20:20   ` Sven Mascheck
2022-12-30 20:49     ` Ron Natalie
2022-12-30 20:52       ` Rob Pike
2022-12-30 20:53       ` Jon Steinhart
2023-01-01 10:44   ` arnold
2023-01-01 11:28     ` arnold
2023-01-03 16:34       ` Chet Ramey
2023-01-03 15:06     ` Chet Ramey
2022-12-30 19:57 ` segaloco via TUHS
2022-12-31 12:55   ` Paul Ruizendaal
2023-01-01  2:55     ` Warner Losh
2023-01-01  4:38       ` Jonathan Gray
2023-01-01  5:25         ` Warner Losh
2023-01-01  5:35           ` Dan Cross
2023-01-01  5:52             ` G. Branden Robinson
2023-01-01  6:35               ` Warner Losh
2023-01-01  6:35               ` Rob Pike
2023-01-01  6:27             ` Warner Losh
2023-01-01 14:50             ` Ron Natalie
2023-01-01  7:11           ` Jonathan Gray
2023-01-01  7:21             ` Warner Losh
2023-01-01 10:25           ` Paul Ruizendaal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK0pxsH6bWTLVApE_vDhATmMgaF+nwc5D3pSz4srtwGS-8Ux_A@mail.gmail.com \
    --to=marzhall.o@gmail.com \
    --cc=joseph@josephholsten.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).