The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@iitbombay.org>
To: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Book Recommendation [ reallly inscrutable languages ]
Date: Wed, 17 Nov 2021 14:36:48 -0800	[thread overview]
Message-ID: <47CE7A59-B66D-4814-A91A-20A95B15C8FC@iitbombay.org> (raw)
In-Reply-To: <50F3E958-F0A4-4895-B1BC-41A2644A074A@oclsc.org>

On Nov 17, 2021, at 11:12 AM, Norman Wilson <norman@oclsc.org> wrote:
> 
> Wasn't Perl created to fill this void?
> 
> Void? I thought Perl was created to fill a much-needed gap.

and tcl, rc etc.

I just want better builtin support for shell pipelines as
they are essentially (flat) list processors! As an example
consider something like the following:

find . -name '*.[hc]' -type f | \
xargs grep -l '\<foo\>' /dev/null | \
xargs grep -l '\<bar\>' /dev/null | \
xargs some-command

Just to run some-command on all *.[hc] files with words
foo & bar. And this will fall apart if there are spaces
or : in filenames. Basically most scripts are about
enumerating, filtering, converting and processing. If
files, especially text files, are so central to unix,
a shell should know about them and provide common
operations on them. One can even think of shell variables
as files (sort of like the env device in plan9). If you
want to name some sub-computation instead of processing it
all in one pipeline, it should be trivial but it isn't;
you have to find uniq names for these temp files and remember
to delete them when done. I want lexically scoped variables
(aka files) that disappear once you exist the scope!

The difficulty is in coming up with an intuitive, regular
& a relatively concise syntax. Even so it would likely be
unpopular since people seem to prefer for-loops!


  parent reply	other threads:[~2021-11-17 22:39 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 17:00 [TUHS] Book Recommendation Douglas McIlroy
2021-11-16 17:54 ` [TUHS] Book Recommendation [ reallly inscrutable languages ] Jon Steinhart
2021-11-16 17:57   ` Ron Natalie
2021-11-16 18:00   ` Dan Cross
2021-11-16 18:04   ` Larry McVoy
2021-11-16 19:53     ` Richard Salz
2021-11-16 20:05       ` Warner Losh
2021-11-17 19:12   ` Norman Wilson
2021-11-17 20:46     ` Dan Stromberg
2021-11-17 20:52       ` Warner Losh
2021-11-17 21:17         ` Dan Cross
2021-11-17 22:21           ` Rob Pike
2021-11-18  0:35             ` Larry McVoy
2021-11-19 20:04               ` Alan Glasser
2021-11-19 20:14                 ` Larry McVoy
2021-11-19 21:48                   ` Alan Glasser
2021-11-19 22:28                     ` Larry McVoy
2021-11-19 23:17               ` Alan Glasser
2021-11-18 21:03             ` George Michaelson
2021-11-18 21:39               ` Rob Pike
2021-11-17 22:36     ` Bakul Shah [this message]
2021-11-18  0:56       ` Dan Stromberg
     [not found] ` <CAKH6PiXinxBQGRqoeGMcG9CwTA5BNeU-LY164f-ZLYA4obsyuA@mail.g mail.com>
2021-11-16 18:47   ` [TUHS] Book Recommendation John Foust via TUHS
2021-11-16 20:35 ` Bakul Shah
2021-12-02 21:35 ` Duncan Mak
2021-12-02 22:32   ` Bakul Shah
2021-12-02 22:34   ` Rob Pike
2021-11-16 19:29 [TUHS] Book Recommendation [ reallly inscrutable languages ] Douglas McIlroy
2021-11-16 19:54 ` Jon Steinhart
2021-11-18 18:47 Paul Ruizendaal via TUHS
2021-11-18 19:03 ` arnold
2021-11-18 19:16   ` Chet Ramey
2021-11-18 19:20     ` arnold
2021-11-18 21:03   ` John Cowan
2021-11-18 21:42 ` Rich Morin
2021-11-18 22:59 Nelson H. F. Beebe

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=47CE7A59-B66D-4814-A91A-20A95B15C8FC@iitbombay.org \
    --to=bakul@iitbombay.org \
    --cc=tuhs@minnie.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).