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.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI 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 AC8AB3066D for ; Thu, 5 Dec 2024 23:03:41 +0100 (CET) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id AD20342728; Fri, 6 Dec 2024 08:03:37 +1000 (AEST) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by minnie.tuhs.org (Postfix) with ESMTPS id 7ECB642727 for ; Fri, 6 Dec 2024 08:03:30 +1000 (AEST) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7242f559a9fso1561794b3a.1 for ; Thu, 05 Dec 2024 14:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1733436210; x=1734041010; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9s6CkTTbM2AH6IsAIDlsakKyuT2RCR7ZqMAtghs91N8=; b=Wk0LxQMSo8wNNjplshdIHu4qKmxPJLAhFQczeRG1C4FWyD93uOTmE58vESoRL8AMDj 8wHYWcPKIvQbLYUWiyRb3XOXL4dURYL9NY4UDqOGv/nPHWXfAr+ZDCKQLH+61AXZFq75 vlRzUdB85mXJ7q7DkUrmZpqeWZYqnVTqi5nJN3KrJ6WiQCqTCORkLwW+HP57UJ2RDEFS kupVDPhH+SC0mQ2UqMeFcaRydHLtx05Mr1nlJQpQEr5vzvx/AWrsOpwQLd9RzxW8D7Uj nHQ4WexPFpCI3PLC8wX18BF3eMoQqzHFarpf4zLR790tbudojASEeWBia3GlCHcmlACF kzCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733436210; x=1734041010; 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=9s6CkTTbM2AH6IsAIDlsakKyuT2RCR7ZqMAtghs91N8=; b=Kh55wu5b4i/DjB4udfJU7N2TpsoG9KXLiNauZQ4NoinBBU9Adk6nwV+R0j6UDP0C2h +2KEHKvCZ4WzvuVl3gwjwsi8ZSKxGTL4W8J8v5OJq05POJAxaT+bYtxgS/pIw5/rmzro gtEROqZS3tdh2RL0KHpX3EnB6fSdLM5XztDDgY5kYpj1EuYLpG5AOC0Xt5R/N21AcCsq q6GAc/zYWxvyOIP2UT6Vn1XSXBGureo4mREjrkVk9exKYdB+yIOCBdN03kKyohpTlm5D xMtWU9u2Sz3maExN3SC3ci+q/ffOjoSDqqmPBB77o4qwj1TmyuTs2FS6GEMl+BAawvNa nU6A== X-Forwarded-Encrypted: i=1; AJvYcCXYt94KCC4al4VV1offF0skAHlXsIOCZqtGpYRu9TLddz1m39Tn6GO634I3dX1Exbuq5MMv@tuhs.org X-Gm-Message-State: AOJu0YwwZbtK6ZizoIWq+I1K62y+J8iuhe7n8xhoHMSujr1/wSNluehP +WURe6RIg5cpu4bRcPVkq6epemAj/cSXUcuKQ4dpeB2sIFfjUyqVUIylWgu3hI6ZLr2svyfEZ1n KXq6hBNB7t60C5eeuTeXRNFFdY9OeEMZBzYDECQ== X-Gm-Gg: ASbGncsPRMLzOqGvlaPSd1yp8u+K+0uQJWYcqcozLgw9cHjZDV42QFEAej9UycVqMSX VnVXLND+uvhRBgq8xT4elfDWEcYf2C2E= X-Google-Smtp-Source: AGHT+IE1e69RGQPtk6110Z9axLHYiEOj6/vEdVzzbVTzT10fvLYqY/bu6c3Zo+7J3/7E9UH/Ghyp7SuL1m0hPGC4p+Q= X-Received: by 2002:a17:90b:1f90:b0:2ee:8427:4b02 with SMTP id 98e67ed59e1d1-2ef6ab0cf87mr967698a91.28.1733436209908; Thu, 05 Dec 2024 14:03:29 -0800 (PST) MIME-Version: 1.0 References: <568FD44F-01FB-441B-846B-7D42C3A8E1FB@canb.auug.org.au> <20241205030843.8552FAB1EDA5@ary.qy> <2fd6a361-b26f-4ca4-9c65-b6ba0559644e@case.edu> <202412052055.4B5KtYf1781856@freefriends.org> In-Reply-To: From: Warner Losh Date: Thu, 5 Dec 2024 15:03:18 -0700 Message-ID: To: Dan Cross Content-Type: multipart/alternative; boundary="000000000000886a9a06288d1192" Message-ID-Hash: XDOFWKAHPLWRY7OQAYLJS2BD7DZBHWUR X-Message-ID-Hash: XDOFWKAHPLWRY7OQAYLJS2BD7DZBHWUR X-MailFrom: wlosh@bsdimp.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: johnl@taugh.com, tuhs@tuhs.org, marc.donner@gmail.com X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Pipes (was Re: After 50 years, what has the Impact of Unix been?) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000886a9a06288d1192 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 5, 2024 at 2:13=E2=80=AFPM Dan Cross wrote: > On Thu, Dec 5, 2024 at 3:56=E2=80=AFPM wrote: > > Chet Ramey via TUHS wrote: > > > On 12/5/24 10:19 AM, Dan Cross wrote: > > > > > > > Unix pipelines, on the other hand, tend to be used in a manner that > is > > > > strictly linear, without the fan-out and fan-in capabilities > described > > > > by Morrison. Of course, nothing prevents one from building a > > > > Morrison-style "network" from Unix processes and pipes, though it's > > > > hard to see how that would work without something like `select`, > which > > > > didn't yet exist in 1978. Regardless, Unix still doesn't expose a > > > > particularly convenient syntax for expressing these sorts of > > > > constructions at the shell. > > > > > > Process substitution is about as close as we can get, but most progra= ms > > > still process their filename arguments one at a time, beginning to en= d. > > > > > > The canonical process substitution example is > > > > > > diff <(old-program-version) <(new-program-version) > > > > > > to do simple regression testing. > > > > And fanout is simply > > > > ... | tee >(pipeline1) >(pipeline2) > > And indeed these things are pretty nifty, but don't they generate > trees, and not arbitrary dags? They don't quite capture the full > generality of Morrison-style networks since it doesn't seem like > there's a way to connect process substitution fan-out with fan-in; at > least, not conveniently. > > It is, perhaps, notable that Go allows me to do this sort of thing > with channels and goroutines, but it has `select` built into the > language. > > Funny, despite using Unix almost daily for over 30 years now, I don't > think I've ever felt limited by the power of pipelines. On the > contrary, I've lost count of the times I've felt limited on systems > that do Not support pipes. > The <() , >() syntax is a bash extension. Not all shells support it. And I couldn't find them in POSIX Issue 8. Warner --000000000000886a9a06288d1192 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Dec 5, = 2024 at 2:13=E2=80=AFPM Dan Cross <c= rossd@gmail.com> wrote:
On Thu, Dec 5, 2024 at 3:56=E2=80=AFPM <arnold@skeeve.com> wrote:
> Chet Ramey via TUHS <tuhs@tuhs.org> wrote:
> > On 12/5/24 10:19 AM, Dan Cross wrote:
> >
> > > Unix pipelines, on the other hand, tend to be used in a mann= er that is
> > > strictly linear, without the fan-out and fan-in capabilities= described
> > > by Morrison. Of course, nothing prevents one from building a=
> > > Morrison-style "network" from Unix processes and p= ipes, though it's
> > > hard to see how that would work without something like `sele= ct`, which
> > > didn't yet exist in 1978. Regardless, Unix still doesn&#= 39;t expose a
> > > particularly convenient syntax for expressing these sorts of=
> > > constructions at the shell.
> >
> > Process substitution is about as close as we can get, but most pr= ograms
> > still process their filename arguments one at a time, beginning t= o end.
> >
> > The canonical process substitution example is
> >
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0diff <(old-program-version) <(new= -program-version)
> >
> > to do simple regression testing.
>
> And fanout is simply
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0... | tee >(pipeline1) >(pipeli= ne2)

And indeed these things are pretty nifty, but don't they generate
trees, and not arbitrary dags? They don't quite capture the full
generality of Morrison-style networks since it doesn't seem like
there's a way to connect process substitution fan-out with fan-in; at least, not conveniently.

It is, perhaps, notable that Go allows me to do this sort of thing
with channels and goroutines, but it has `select` built into the
language.

Funny, despite using Unix almost daily for over 30 years now, I don't think I've ever felt limited by the power of pipelines. On the
contrary, I've lost count of the times I've felt limited on systems=
that do Not support pipes.

The <() ,= >()=C2=A0 syntax is a bash extension. Not all shells support it. And
I couldn't find them in POSIX Issue 8.

Warner
--000000000000886a9a06288d1192--