Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

I have hardly ever known a mathematician who was capable of reasoning. -- Plato


devel / comp.unix.programmer / Re: Piping to stdin

SubjectAuthor
* Piping to stdinSpiros Bousbouras
+* Piping to stdinSpiros Bousbouras
|`* Piping to stdinKenny McCormack
| +* Piping to stdinKaz Kylheku
| |`* Piping to stdinKenny McCormack
| | `* Piping to stdinKalevi Kolttonen
| |  `* Piping to stdinGary R. Schmidt
| |   +* Piping to stdinKaz Kylheku
| |   |+* Piping to stdinJoe Pfeiffer
| |   ||`* Piping to stdinRichard Harnden
| |   || `- Piping to stdinPhil Carmody
| |   |+- Piping to stdinKeith Thompson
| |   |`* Piping to stdinRichard Kettlewell
| |   | +* Piping to stdinJames Kuyper
| |   | |`- Piping to stdinDavid Brown
| |   | +- Dealing with weird filenames (Was: Piping to stdin)Kenny McCormack
| |   | `* Piping to stdinDavid Brown
| |   |  +* Piping to stdinRichard Kettlewell
| |   |  |`* Piping to stdinScott Lurndal
| |   |  | +- Piping to stdinKenny McCormack
| |   |  | +* Piping to stdinSpiros Bousbouras
| |   |  | |`* Piping to stdinKaz Kylheku
| |   |  | | `- Piping to stdinKaz Kylheku
| |   |  | +* Piping to stdinKeith Thompson
| |   |  | |`* Piping to stdinGeoff Clare
| |   |  | | `- Piping to stdinKeith Thompson
| |   |  | `- Piping to stdinPhil Carmody
| |   |  `* Piping to stdinRichard Harnden
| |   |   +- Piping to stdinScott Lurndal
| |   |   `- Piping to stdinvallor
| |   `* Piping to stdinKalevi Kolttonen
| |    +* Piping to stdinGiovanni
| |    |`* Piping to stdinKenny McCormack
| |    | `* Piping to stdinKalevi Kolttonen
| |    |  +* Piping to stdinPhil Carmody
| |    |  |`* Piping to stdinLew Pitcher
| |    |  | `* Piping to stdinPhil Carmody
| |    |  |  `* Piping to stdinLew Pitcher
| |    |  |   +- Piping to stdinKaz Kylheku
| |    |  |   `- Piping to stdinPhil Carmody
| |    |  +- Piping to stdinBen Bacarisse
| |    |  `* Piping to stdinMuttley
| |    |   +* Piping to stdinPhil Carmody
| |    |   |`* Piping to stdinMuttley
| |    |   | +* Piping to stdinPhil Carmody
| |    |   | |+* Piping to stdinGeoff Clare
| |    |   | ||`- Piping to stdinMuttley
| |    |   | |+* Wrecking a good thing? (Was: Piping to stdin)Kenny McCormack
| |    |   | ||+- Wrecking a good thing?Phil Carmody
| |    |   | ||`- Wrecking a good thing? (Was: Piping to stdin)David Brown
| |    |   | |`- Piping to stdinMuttley
| |    |   | +* Piping to stdinKaz Kylheku
| |    |   | |+- Piping to stdinMuttley
| |    |   | |+- Piping to stdinKeith Thompson
| |    |   | |`- Piping to stdinDavid Brown
| |    |   | `* Piping to stdinBen Bacarisse
| |    |   |  `* Piping to stdinPhil Carmody
| |    |   |   +* Piping to stdinOğuz
| |    |   |   |`* Piping to stdinMuttley
| |    |   |   | +* Piping to stdinScott Lurndal
| |    |   |   | |`- Piping to stdinMuttley
| |    |   |   | `* Piping to stdinRainer Weikusat
| |    |   |   |  `* What language is this? (Was: Piping to stdin)Kenny McCormack
| |    |   |   |   `* What language is this? (Was: Piping to stdin)Scott Lurndal
| |    |   |   |    +* What language is this? (Was: Piping to stdin)Kenny McCormack
| |    |   |   |    |`* What language is this?Rainer Weikusat
| |    |   |   |    | `* What language is this?Kenny McCormack
| |    |   |   |    |  `* What language is this?Rainer Weikusat
| |    |   |   |    |   `* What language is this?Kenny McCormack
| |    |   |   |    |    `- What language is this?Rainer Weikusat
| |    |   |   |    `- What language is this? (Was: Piping to stdin)Muttley
| |    |   |   `* Piping to stdinBen Bacarisse
| |    |   |    `- Piping to stdinKalevi Kolttonen
| |    |   +* Piping to stdinKalevi Kolttonen
| |    |   |`* Piping to stdinMuttley
| |    |   | `* Piping to stdinKalevi Kolttonen
| |    |   |  `- Piping to stdinScott Lurndal
| |    |   `- Piping to stdinKaz Kylheku
| |    `- Piping to stdinPhil Carmody
| `- Piping to stdinNuno Silva
`* Piping to stdinJoe Pfeiffer
 `* Piping to stdinSpiros Bousbouras
  `* Piping to stdinBen Bacarisse
   `* Piping to stdinKenny McCormack
    `* Piping to stdinScott Lurndal
     `* Piping to stdinRichard Harnden
      `- Piping to stdinScott Lurndal

Pages:1234
Re: Piping to stdin

<ubtp4d$1gqlu$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9946&group=comp.unix.programmer#9946

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Sun, 20 Aug 2023 19:21:49 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <ubtp4d$1gqlu$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au> <ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it> <ubg6o7$3jrsn$1@news.xmission.com> <ubg853$2ssj8$1@dont-email.me> <ubg8a8$2t20l$1@dont-email.me> <87o7j82gix.fsf@fatphil.org> <ubkt02$3o9rp$1@dont-email.me> <87v8dde6j3.fsf@bsb.me.uk> <87wmxr9v9l.fsf@fatphil.org> <ubqf9k$r2ol$1@dont-email.me> <ubqkn7$skrr$1@dont-email.me> <y%rEM.716067$AsA.587368@fx18.iad>
Injection-Date: Sun, 20 Aug 2023 19:21:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="affaeae6a3f1c9c758234d6b2ef0cd83";
logging-data="1600190"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vHR7kYEseRtDQHa0NV2N5"
Cancel-Lock: sha1:SiN0CQGZDKqtwMxlah2eI06R71E=
 by: Mutt...@dastardlyhq.com - Sun, 20 Aug 2023 19:21 UTC

On Sun, 20 Aug 2023 17:24:46 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
>Muttley@dastardlyhq.com writes:
>>On Sat, 19 Aug 2023 16:15:32 +0300
>>=?UTF-8?B?T8SfdXo=?= <oguzismailuysal@gmail.com> wrote:
>>>On 8/19/23 1:33 PM, Phil Carmody wrote:
>>>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>>>> Some file systems (depending on mount options) can have complex rules
>>>>> such as rejecting any name with an invalid UTF-8 sequence.
>>>>
>>>> Oooh, now I'm tempted to name files in Latin-1, to deliberately break
>>>> filesystems that make such assumptions!
>>>Be careful with that attitude. The "memory-safe" sudo replacement
>>>doesn't support non-UTF-8 input either:
>>
>>Whats memory unsafe about sudo?
>>
>https://www.cisa.gov/news-events/alerts/2021/02/02/sudo-heap-based-buffer-overf
>low-vulnerability-cve-2021-3156

One bug in one version doesn't make it generally unsafe.

Re: Piping to stdin

<87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9947&group=comp.unix.programmer#9947

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweiku...@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Sun, 20 Aug 2023 21:57:30 +0100
Lines: 19
Message-ID: <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it>
<ubg6o7$3jrsn$1@news.xmission.com> <ubg853$2ssj8$1@dont-email.me>
<ubg8a8$2t20l$1@dont-email.me> <87o7j82gix.fsf@fatphil.org>
<ubkt02$3o9rp$1@dont-email.me> <87v8dde6j3.fsf@bsb.me.uk>
<87wmxr9v9l.fsf@fatphil.org> <ubqf9k$r2ol$1@dont-email.me>
<ubqkn7$skrr$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net FE3vaN8ro92Vk4mp2Y3rsw7u3Zw3p0FLNu3/NLPuokaqntwgs=
Cancel-Lock: sha1:vMNUFk/HMAY+D9LVtFapC31uWiQ= sha1:3fdbvnTp2WbJ1K4V9X0M7jyI8vE= sha256:dCuEMujzRJ+HsObxoGMZlbnJor6U6lG8vtIzpxvLsP0=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Rainer Weikusat - Sun, 20 Aug 2023 20:57 UTC

Muttley@dastardlyhq.com writes:
> On Sat, 19 Aug 2023 16:15:32 +0300
> =?UTF-8?B?T8SfdXo=?= <oguzismailuysal@gmail.com> wrote:
>>On 8/19/23 1:33 PM, Phil Carmody wrote:
>>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>>> Some file systems (depending on mount options) can have complex rules
>>>> such as rejecting any name with an invalid UTF-8 sequence.
>>>
>>> Oooh, now I'm tempted to name files in Latin-1, to deliberately break
>>> filesystems that make such assumptions!
>>Be careful with that attitude. The "memory-safe" sudo replacement
>>doesn't support non-UTF-8 input either:
>
> Whats memory unsafe about sudo?

It's not written in a language whose extremely complicate runtime system
that's conjectured to be bug free in this respect by Really Wishful
Thinking[tm] is supposed to prevent simple memory access errors C
supports.

What language is this? (Was: Piping to stdin)

<ubu4cd$3qqvc$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9948&group=comp.unix.programmer#9948

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: What language is this? (Was: Piping to stdin)
Date: Sun, 20 Aug 2023 22:33:49 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubu4cd$3qqvc$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <ubqf9k$r2ol$1@dont-email.me> <ubqkn7$skrr$1@dont-email.me> <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Sun, 20 Aug 2023 22:33:49 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="4025324"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 20 Aug 2023 22:33 UTC

In article <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>,
Rainer Weikusat <rweikusat@talktalk.net> wrote:
....
>It's not written in a language whose extremely complicate runtime
>system that's conjectured to be bug free in this respect by Really
>Wishful Thinking[tm] is supposed to prevent simple memory access errors
>C supports.

What language was this quoted paragraph written in?

Preumably one in which word order doesn't matter.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Reaganomics

Re: What language is this? (Was: Piping to stdin)

<g3zEM.718458$AsA.196497@fx18.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9949&group=comp.unix.programmer#9949

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: What language is this? (Was: Piping to stdin)
Newsgroups: comp.unix.programmer,comp.lang.c
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <ubqf9k$r2ol$1@dont-email.me> <ubqkn7$skrr$1@dont-email.me> <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com> <ubu4cd$3qqvc$1@news.xmission.com>
Lines: 17
Message-ID: <g3zEM.718458$AsA.196497@fx18.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 21 Aug 2023 01:26:36 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 21 Aug 2023 01:26:36 GMT
X-Received-Bytes: 1583
 by: Scott Lurndal - Mon, 21 Aug 2023 01:26 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:
>In article <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>,
>Rainer Weikusat <rweikusat@talktalk.net> wrote:
>...
>>It's not written in a language whose extremely complicate runtime
>>system that's conjectured to be bug free in this respect by Really
>>Wishful Thinking[tm] is supposed to prevent simple memory access errors
>>C supports.
>
>What language was this quoted paragraph written in?
>
>Preumably one in which word order doesn't matter.

Word order in German and English don't always agree.

Basically he is saying, somewhat mockingly, that because it is
not written in Rust, sudo written in C is inherently memory unsafe.

Re: What language is this? (Was: Piping to stdin)

<ubujqh$3r3b4$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9950&group=comp.unix.programmer#9950

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this? (Was: Piping to stdin)
Date: Mon, 21 Aug 2023 02:57:21 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubujqh$3r3b4$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com> <ubu4cd$3qqvc$1@news.xmission.com> <g3zEM.718458$AsA.196497@fx18.iad>
Injection-Date: Mon, 21 Aug 2023 02:57:21 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="4033892"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 21 Aug 2023 02:57 UTC

In article <g3zEM.718458$AsA.196497@fx18.iad>,
Scott Lurndal <slp53@pacbell.net> wrote:
>gazelle@shell.xmission.com (Kenny McCormack) writes:
>>In article <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>,
>>Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>...
>>>It's not written in a language whose extremely complicate runtime
>>>system that's conjectured to be bug free in this respect by Really
>>>Wishful Thinking[tm] is supposed to prevent simple memory access errors
>>>C supports.
>>
>>What language was this quoted paragraph written in?
>>
>>Preumably one in which word order doesn't matter.
>
>Word order in German and English don't always agree.
>
>Basically he is saying, somewhat mockingly, that because it is
>not written in Rust, sudo written in C is inherently memory unsafe.

OK, thanks.

I am glad that you were able to intuit that "Rust" was "the other language"
involved in the comparison.

--
They say compassion is a virtue, but I don't have the time!

- David Byrne -

Re: What language is this? (Was: Piping to stdin)

<ubv1er$1pvkr$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9952&group=comp.unix.programmer#9952

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this? (Was: Piping to stdin)
Date: Mon, 21 Aug 2023 06:50:03 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ubv1er$1pvkr$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <ubqf9k$r2ol$1@dont-email.me> <ubqkn7$skrr$1@dont-email.me> <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com> <ubu4cd$3qqvc$1@news.xmission.com> <g3zEM.718458$AsA.196497@fx18.iad>
Injection-Date: Mon, 21 Aug 2023 06:50:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fda3c9894a8af2ff94db8756b8e459c1";
logging-data="1900187"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XFtWoYJvRI9TBKrVBGZWW"
Cancel-Lock: sha1:52cRRhsQ27GSFB0iWa8Z1+AJxBE=
 by: Mutt...@dastardlyhq.com - Mon, 21 Aug 2023 06:50 UTC

On Mon, 21 Aug 2023 01:26:36 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
>gazelle@shell.xmission.com (Kenny McCormack) writes:
>>In article <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>,
>>Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>...
>>>It's not written in a language whose extremely complicate runtime
>>>system that's conjectured to be bug free in this respect by Really
>>>Wishful Thinking[tm] is supposed to prevent simple memory access errors
>>>C supports.
>>
>>What language was this quoted paragraph written in?
>>
>>Preumably one in which word order doesn't matter.
>
>Word order in German and English don't always agree.
>
>Basically he is saying, somewhat mockingly, that because it is
>not written in Rust, sudo written in C is inherently memory unsafe.

To do anything low level Rust has to disable memory protection (or whatever
they call it) anyway, so its no safer than C/C++ in these circumstances.

Re: What language is this?

<87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9957&group=comp.unix.programmer#9957

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweiku...@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this?
Date: Mon, 21 Aug 2023 17:16:51 +0100
Lines: 38
Message-ID: <87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>
<ubu4cd$3qqvc$1@news.xmission.com> <g3zEM.718458$AsA.196497@fx18.iad>
<ubujqh$3r3b4$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net AVzPZp3NtuCDTZjMZ7vveQAmGgED5f8yHDNnkwVMY3hUPzsNU=
Cancel-Lock: sha1:WX9Z9707uG1KlHgTOqvfu9YV+nQ= sha1:kk/JJHdIdRNZNp7rgYN3Uqaxy/8= sha256:Xx/FGqiRfCwX8CbBhoim8xSVPYkmqLF36Vct8AjZG0Q=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Rainer Weikusat - Mon, 21 Aug 2023 16:16 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:
> In article <g3zEM.718458$AsA.196497@fx18.iad>,
> Scott Lurndal <slp53@pacbell.net> wrote:
>>gazelle@shell.xmission.com (Kenny McCormack) writes:
>>>In article <87lee55t51.fsf@doppelsaurus.mobileactivedefense.com>,
>>>Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>...
>>>>It's not written in a language whose extremely complicate runtime
>>>>system that's conjectured to be bug free in this respect by Really
>>>>Wishful Thinking[tm] is supposed to prevent simple memory access errors
>>>>C supports.
>>>
>>>What language was this quoted paragraph written in?
>>>
>>>Preumably one in which word order doesn't matter.
>>
>>Word order in German and English don't always agree.
>>
>>Basically he is saying, somewhat mockingly, that because it is
>>not written in Rust, sudo written in C is inherently memory unsafe.
>
> OK, thanks.
>
> I am glad that you were able to intuit that "Rust" was "the other language"
> involved in the comparison.

That's pretty obvious from the

,----
| Be careful with that attitude. The "memory-safe" sudo replacement
| doesn't support non-UTF-8 input either:
|
| https://github.com/memorysafety/sudo-rs/issues/213
`----

upthread. Rust is conjectured to be memory safe because people using it
really want to believe that the Rust runtime - some orders of magnitude
more complicated than a real lot of C programs - has not such bugs.

Re: What language is this?

<uc0cqr$3rv8t$2@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9958&group=comp.unix.programmer#9958

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this?
Date: Mon, 21 Aug 2023 19:10:19 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <uc0cqr$3rv8t$2@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <g3zEM.718458$AsA.196497@fx18.iad> <ubujqh$3r3b4$1@news.xmission.com> <87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Mon, 21 Aug 2023 19:10:19 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="4062493"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 21 Aug 2023 19:10 UTC

In article <87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>,
Rainer Weikusat <rweikusat@talktalk.net> wrote:
....
>,----
>| Be careful with that attitude. The "memory-safe" sudo replacement
>| doesn't support non-UTF-8 input either:
>|
>| https://github.com/memorysafety/sudo-rs/issues/213
>`----

That URL means nothing to me. But that's just me. Don't take it
personally.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Seriously

Re: What language is this?

<87r0nwjios.fsf@doppelsaurus.mobileactivedefense.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9959&group=comp.unix.programmer#9959

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweiku...@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this?
Date: Mon, 21 Aug 2023 20:31:47 +0100
Lines: 25
Message-ID: <87r0nwjios.fsf@doppelsaurus.mobileactivedefense.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<g3zEM.718458$AsA.196497@fx18.iad> <ubujqh$3r3b4$1@news.xmission.com>
<87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>
<uc0cqr$3rv8t$2@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net uAkG3v9m5a053LKd4EOsIgKTKb4bJ3vJP+ohZXO8CDQxXHdNw=
Cancel-Lock: sha1:10BYB1tbuQ9/JztNLfCUvO4vfqk= sha1:xk3C7IV/KegFR+6Z3HeKDwXFBGo= sha256:jeDMNvzRCfwGNayTFIezB3N4TShFBhbKpu3d1tzOTXA=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Rainer Weikusat - Mon, 21 Aug 2023 19:31 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:
> In article <87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>,
> Rainer Weikusat <rweikusat@talktalk.net> wrote:
> ...
>>,----
>>| Be careful with that attitude. The "memory-safe" sudo replacement
>>| doesn't support non-UTF-8 input either:
>>|
>>| https://github.com/memorysafety/sudo-rs/issues/213
>>`----
>
> That URL means nothing to me. But that's just me. Don't take it
> personally.

In this case, I suggest one of two options

1) You'll try to memorize that rs commonly means Rust. Eg, it's usually
the extension used for Rust source files.

2) You'll ask your full-time carer to click on the link for you and read
the content of the page to you.

In either case, posting more lame flames into this groups for no
conceivable reason is not going to improve your understanding of
anything.

Re: What language is this?

<uc0hft$3s1du$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9960&group=comp.unix.programmer#9960

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this?
Date: Mon, 21 Aug 2023 20:29:49 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <uc0hft$3s1du$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com> <uc0cqr$3rv8t$2@news.xmission.com> <87r0nwjios.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Mon, 21 Aug 2023 20:29:49 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="4064702"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 21 Aug 2023 20:29 UTC

In article <87r0nwjios.fsf@doppelsaurus.mobileactivedefense.com>,
Rainer Weikusat <rweikusat@talktalk.net> wrote:
>blah, blah, blah

I told you not to take it personally, but what do you go and do?

All I can say is that I tried to help you and to steer you in the right
direction.

--
Men rarely (if ever) manage to dream up a God superior to themselves.
Most Gods have the manners and morals of a spoiled child.

Re: What language is this?

<87msykjf4p.fsf@doppelsaurus.mobileactivedefense.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9961&group=comp.unix.programmer#9961

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweiku...@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: What language is this?
Date: Mon, 21 Aug 2023 21:48:38 +0100
Lines: 12
Message-ID: <87msykjf4p.fsf@doppelsaurus.mobileactivedefense.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<87v8d8jrpo.fsf@doppelsaurus.mobileactivedefense.com>
<uc0cqr$3rv8t$2@news.xmission.com>
<87r0nwjios.fsf@doppelsaurus.mobileactivedefense.com>
<uc0hft$3s1du$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net befr/RwSJF/db/ylhNftTAV4TFet9FqwmwN2lap99No9j8rU4=
Cancel-Lock: sha1:JwAMg13ABwNKJamwLp7HkmdsEnI= sha1:gQdwnC/J9LCitzm0JRD493tnOBQ= sha256:naRkBnDy8BvGOqe9DcRd08ASQmEqsLQ4zQD9TXfSPhg=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Rainer Weikusat - Mon, 21 Aug 2023 20:48 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:
> In article <87r0nwjios.fsf@doppelsaurus.mobileactivedefense.com>,
> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>blah, blah, blah
>
> I told you not to take it personally, but what do you go and do?

I'm principally interested in technical discussions, eg, about Rust and
memory safety, and sometimes motivated to try my hands at minimally
creative flames when people are trying to play the Most Importinant
Dickhead with the help of the usual boilerplate phrases.

Re: Piping to stdin

<U4x2oQwlZ0Kk8WwnO@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10824&group=comp.unix.programmer#10824

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Followup: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Piping to stdin
Followup-To: comp.unix.programmer
Date: Sun, 13 Aug 2023 13:55:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <U4x2oQwlZ0Kk8WwnO@bongo-ra.co>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 13 Aug 2023 13:55:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3be25fa73c86264f344f4f91b574e804";
logging-data="1959227"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RFtiBSZ8vO18mGF4iBnnu"
Cancel-Lock: sha1:YrWYlxKthIK3KVf9wwUh3/vEE3I=
In-Reply-To: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sun, 13 Aug 2023 13:55 UTC

[ Followup-To: comp.unix.programmer ]

On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
> On Unix-lke systems, what is the convention for putting a program into a
> mode where it accepts input from stdin?
> Where the user invokes it directly, he'll normally want input from a file. So
> the normal invocation would be
>
> myprogram myinput.txt
>
> But if he just types "myprogram" it should display brief help text. So we
> can't omit the filename to make the program read from stdin.

I would use a -h option for help text and with no arguments it should read
from stdin .

> So do you pass an option
>
> myprogram -stdin
>
> or what is the normal way of solving this?

- (a single dash) as argument. Even if the programme accepts multiple file
name arguments , a single dash among those means "read from stdin".

--
vlaho.ninja/prog

Re: Piping to stdin

<LtQSo3SOOU09AXJ1X@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10825&group=comp.unix.programmer#10825

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.programmer
Subject: Re: Piping to stdin
Date: Sun, 13 Aug 2023 14:27:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <LtQSo3SOOU09AXJ1X@bongo-ra.co>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <U4x2oQwlZ0Kk8WwnO@bongo-ra.co> <f2044b26-5a38-493d-9ab9-906bf73b0499n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 13 Aug 2023 14:27:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3be25fa73c86264f344f4f91b574e804";
logging-data="1967822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qUcTjStZDTzDIun4t4fLf"
Cancel-Lock: sha1:R+THXx6n+ztQtUw1UH07AE/XA50=
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
In-Reply-To: <f2044b26-5a38-493d-9ab9-906bf73b0499n@googlegroups.com>
 by: Spiros Bousbouras - Sun, 13 Aug 2023 14:27 UTC

On Sun, 13 Aug 2023 07:07:55 -0700 (PDT)
Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
> On Sunday, 13 August 2023 at 14:55:57 UTC+1, Spiros Bousbouras wrote:
> > [ Followup-To: comp.unix.programmer ]
> > On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
> > Malcolm McLean <malcolm.ar...@gmail.com> wrote:
> > > On Unix-lke systems, what is the convention for putting a program into a
> > > mode where it accepts input from stdin?
> > > Where the user invokes it directly, he'll normally want input from a file. So
> > > the normal invocation would be
> > >
> > > myprogram myinput.txt
> > >
> > > But if he just types "myprogram" it should display brief help text. So we
> > > can't omit the filename to make the program read from stdin.
[...]
> > > So do you pass an option
> > >
> > > myprogram -stdin
> > >
> > > or what is the normal way of solving this?
> > - (a single dash) as argument. Even if the programme accepts multiple file
> > name arguments , a single dash among those means "read from stdin".
> >
> So conventionally the file name is "-"?

Yes.

Re: Piping to stdin

<ubbua5$3hium$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10826&group=comp.unix.programmer#10826

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!1.us.feeder.erje.net!feeder.erje.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 00:59:49 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubbua5$3hium$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <U4x2oQwlZ0Kk8WwnO@bongo-ra.co> <f2044b26-5a38-493d-9ab9-906bf73b0499n@googlegroups.com> <LtQSo3SOOU09AXJ1X@bongo-ra.co>
Injection-Date: Mon, 14 Aug 2023 00:59:49 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3722198"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 14 Aug 2023 00:59 UTC

In article <LtQSo3SOOU09AXJ1X@bongo-ra.co>,
Spiros Bousbouras <spibou@gmail.com> wrote:
....
>> So conventionally the file name is "-"?
>
>Yes.

Yes, but, as indicated, it is just that - a convention. The program has to
recognize it, and act accordingly. Note, incidentally, that it raises the
question of "What if the user actually has a file named '-' ?"

By the way, I wish to point out that, despite all the passion some here
have argued with, the idea that a program *must* read stdin if no args are
given, is a) not absolute and b) basically old-fashioned. The newer model
is, as Malcolm would like it to be, that running a program with no args
*should* generate a usage message. Among other things, the user should not
have to guess what the "help" option is. Is it -h, -?, --help, or something
else???

For example, consider "cat". As it is, if you run cat with no args, it
will copy stdin to stdout. That's the old-fashioned way - and, of course
that can't be changed (i.e., fixed) now, because of all the existing code
(scripts) that depend on it (and would break if it were changed). But if
"cat" were being designed today, it would probably require a '-' to make it
read stdin and, if run with no args, would display a usage message.

Note, incidentally, that if you run "cat" with no args from a shell prompt,
it will look like your computer has crashed, and you may be reaching for
the power cord. Programs can handle this by using the isatty() function;
and if stdin is a tty, can, at least, issue a prompt before reading from
stdin. Or, of course, they can throw a flag on the play and tell the user
that there is no point in reading input from the terminal (which is, in
fact, pretty much true for most programs). Some (but not many)
well-conceived modern programs do this.

--
I'll give him credit for one thing: He is (& will be) the most quotable President
ever. Books have been written about (GW) Bushisms, but Dubya's got nothing on Trump.

Tremendously wet - from the standpoint of water.

Re: Piping to stdin

<20230813200644.979@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10828&group=comp.unix.programmer#10828

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 03:07:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20230813200644.979@kylheku.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<U4x2oQwlZ0Kk8WwnO@bongo-ra.co>
<f2044b26-5a38-493d-9ab9-906bf73b0499n@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
Injection-Date: Mon, 14 Aug 2023 03:07:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e46a56cd35364bd395dd3d3fbcbd4bf2";
logging-data="2281841"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DE+USYzJlT1HRLNDiGnE+gyn1GrErKmY="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:BLi+mXo+zcZpfTUu1nxqfK9MwmA=
 by: Kaz Kylheku - Mon, 14 Aug 2023 03:07 UTC

On 2023-08-14, Kenny McCormack <gazelle@shell.xmission.com> wrote:
> In article <LtQSo3SOOU09AXJ1X@bongo-ra.co>,
> Spiros Bousbouras <spibou@gmail.com> wrote:
> ...
>>> So conventionally the file name is "-"?
>>
>>Yes.
>
> Yes, but, as indicated, it is just that - a convention. The program has to
> recognize it, and act accordingly. Note, incidentally, that it raises the
> question of "What if the user actually has a file named '-' ?"

Then they write a path to reference it which doesn't look like "-",
such as "./-".

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Piping to stdin

<ubc63c$3hlul$2@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10829&group=comp.unix.programmer#10829

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 03:12:44 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubc63c$3hlul$2@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com> <20230813200644.979@kylheku.com>
Injection-Date: Mon, 14 Aug 2023 03:12:44 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3725269"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 14 Aug 2023 03:12 UTC

In article <20230813200644.979@kylheku.com>,
Kaz Kylheku <864-117-4973@kylheku.com> wrote:
>On 2023-08-14, Kenny McCormack <gazelle@shell.xmission.com> wrote:
>> In article <LtQSo3SOOU09AXJ1X@bongo-ra.co>,
>> Spiros Bousbouras <spibou@gmail.com> wrote:
>> ...
>>>> So conventionally the file name is "-"?
>>>
>>>Yes.
>>
>> Yes, but, as indicated, it is just that - a convention. The program has to
>> recognize it, and act accordingly. Note, incidentally, that it raises the
>> question of "What if the user actually has a file named '-' ?"
>
>Then they write a path to reference it which doesn't look like "-",
>such as "./-".

You know that - and I know that - but do they know that?

--

First of all, I do not appreciate your playing stupid here at all.

- Thomas 'PointedEars' Lahn -

Re: Piping to stdin

<1b350m483g.fsf@pfeifferfamily.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10830&group=comp.unix.programmer#10830

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pfeif...@cs.nmsu.edu (Joe Pfeiffer)
Newsgroups: comp.unix.programmer
Subject: Re: Piping to stdin
Date: Sun, 13 Aug 2023 21:26:59 -0600
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <1b350m483g.fsf@pfeifferfamily.net>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<U4x2oQwlZ0Kk8WwnO@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="69ea2727247ad116df49500e9b8e1b8c";
logging-data="2285358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BwmWvzGLdIJ1qQ6/mGhpD1/xu/9aQiSk="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:qI05mp8dsWPG7TuQxNdm0oLh84I=
sha1:0drq7sUU1C2eSPDGhIGRGx/cLYY=
 by: Joe Pfeiffer - Mon, 14 Aug 2023 03:26 UTC

Spiros Bousbouras <spibou@gmail.com> writes:

> [ Followup-To: comp.unix.programmer ]
>
> On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
>> On Unix-lke systems, what is the convention for putting a program into a
>> mode where it accepts input from stdin?
>> Where the user invokes it directly, he'll normally want input from a file. So
>> the normal invocation would be
>>
>> myprogram myinput.txt
>>
>> But if he just types "myprogram" it should display brief help text. So we
>> can't omit the filename to make the program read from stdin.
>
> I would use a -h option for help text and with no arguments it should read
> from stdin .

No, the typical user will expect help text from just typing the command
name (notwithstanding ancient programs like cat). I typically treat no
args the same as -h

>> So do you pass an option
>>
>> myprogram -stdin
>>
>> or what is the normal way of solving this?
>
> - (a single dash) as argument. Even if the programme accepts multiple file
> name arguments , a single dash among those means "read from stdin".

Yes, this is what seems common.

Re: Piping to stdin

<ubcpj3$28035$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10832&group=comp.unix.programmer#10832

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nunojsi...@invalid.invalid (Nuno Silva)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 09:45:43 +0100
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <ubcpj3$28035$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<U4x2oQwlZ0Kk8WwnO@bongo-ra.co>
<f2044b26-5a38-493d-9ab9-906bf73b0499n@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="7260ba103602f3698eb550cbf3285551";
logging-data="2359397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187W/5gfE/GfG82hFxL8YXq"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Cancel-Lock: sha1:50FqPq4wQg38CBzZBT9KbIDddMY=
 by: Nuno Silva - Mon, 14 Aug 2023 08:45 UTC

On 2023-08-14, Kenny McCormack wrote:

> In article <LtQSo3SOOU09AXJ1X@bongo-ra.co>,
> Spiros Bousbouras <spibou@gmail.com> wrote:
> ...
>>> So conventionally the file name is "-"?
>>
>>Yes.
>
> Yes, but, as indicated, it is just that - a convention. The program has to
> recognize it, and act accordingly. Note, incidentally, that it raises the
> question of "What if the user actually has a file named '-' ?"
>
> By the way, I wish to point out that, despite all the passion some here
> have argued with, the idea that a program *must* read stdin if no args are
> given, is a) not absolute and b) basically old-fashioned. The newer model
> is, as Malcolm would like it to be, that running a program with no args
> *should* generate a usage message. Among other things, the user should not
> have to guess what the "help" option is. Is it -h, -?, --help, or something
> else???

If you consider acceptable a convention of showing usage when no
arguments are given, then why not a convention on what to call the help
option?

I'd also argue that there's what should be a more uniform way to get
documentation on utilities: the online manual. Or (seeing this was from
comp.lang.c) is this also about running on systems where there might be
no such manual facility?

--
Nuno Silva
(I'm not reading comp.lang.c, so it's possible I'm lacking some context)

Re: Piping to stdin

<0w6WGGu9VBM2TDE0F@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10833&group=comp.unix.programmer#10833

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.programmer
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 09:24:06 -0000 (UTC)
Organization: To protect and to server
Message-ID: <0w6WGGu9VBM2TDE0F@bongo-ra.co>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <U4x2oQwlZ0Kk8WwnO@bongo-ra.co> <1b350m483g.fsf@pfeifferfamily.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 14 Aug 2023 09:24:06 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2566373"; posting-host="9H7U5kayiTdk7VIdYU44Rw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:TyX9ngsFqZjDWbdAr4PqG/ISiXGsH1cDn66TmTgF97I=
X-Notice: Filtered by postfilter v. 0.9.3
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Mon, 14 Aug 2023 09:24 UTC

On Sun, 13 Aug 2023 21:26:59 -0600
Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
> Spiros Bousbouras <spibou@gmail.com> writes:
>
> > [ Followup-To: comp.unix.programmer ]
> >
> > On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
> > Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
> >> On Unix-lke systems, what is the convention for putting a program into a
> >> mode where it accepts input from stdin?
> >> Where the user invokes it directly, he'll normally want input from a file. So
> >> the normal invocation would be
> >>
> >> myprogram myinput.txt
> >>
> >> But if he just types "myprogram" it should display brief help text. So we
> >> can't omit the filename to make the program read from stdin.
> >
> > I would use a -h option for help text and with no arguments it should read
> > from stdin .
>
> No, the typical user will expect help text from just typing the command
> name (notwithstanding ancient programs like cat). I typically treat no
> args the same as -h

Not to mention grep , awk , sed , sort , bc , od , etc. Being "ancient"
means that their conventions are more firmly established so why would a
user expect something else ?

Re: Piping to stdin

<874jl1j4rh.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10836&group=comp.unix.programmer#10836

  copy link   Newsgroups: comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.unix.programmer
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 11:29:54 +0100
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <874jl1j4rh.fsf@bsb.me.uk>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<U4x2oQwlZ0Kk8WwnO@bongo-ra.co> <1b350m483g.fsf@pfeifferfamily.net>
<0w6WGGu9VBM2TDE0F@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="4e833c0d8d6fa2b52032f5fcbebcc039";
logging-data="2392354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Bqquiuj5ij3VlCG9ny6uMdDMwr/rfd4o="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:Ksx9WG+wM4QxK0mEb6ZTKPWalX0=
sha1:SFuWPph6J9fGTkXprDRsPHNPW54=
X-BSB-Auth: 1.60cd981573c2a1d53139.20230814112954BST.874jl1j4rh.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 14 Aug 2023 10:29 UTC

Spiros Bousbouras <spibou@gmail.com> writes:

> On Sun, 13 Aug 2023 21:26:59 -0600
> Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
>> Spiros Bousbouras <spibou@gmail.com> writes:
>>
>> > [ Followup-To: comp.unix.programmer ]
>> >
>> > On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
>> > Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
>> >> On Unix-lke systems, what is the convention for putting a program into a
>> >> mode where it accepts input from stdin?
>> >> Where the user invokes it directly, he'll normally want input from a file. So
>> >> the normal invocation would be
>> >>
>> >> myprogram myinput.txt
>> >>
>> >> But if he just types "myprogram" it should display brief help text. So we
>> >> can't omit the filename to make the program read from stdin.
>> >
>> > I would use a -h option for help text and with no arguments it should read
>> > from stdin .
>>
>> No, the typical user will expect help text from just typing the command
>> name (notwithstanding ancient programs like cat). I typically treat no
>> args the same as -h
>
> Not to mention grep , awk , sed , sort , bc , od , etc. Being "ancient"
> means that their conventions are more firmly established so why would a
> user expect something else ?

Agreed. And newer programs will follow the ancient convention. The
distinction, it seems to me, is not age but purpose. If you can easily
see a program being used in a pipeline, it should silently read stdin,
but if that usage is rare, it should interpret '-' as a convention for
reading stdin.

For example, gcc on it's own complains, but

echo "int f() { return 1; }" | gcc -S -xc - -o -

works as expected.

--
Ben.

Re: Piping to stdin

<ubd359$3i4qq$2@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10837&group=comp.unix.programmer#10837

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 11:28:41 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubd359$3i4qq$2@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co> <874jl1j4rh.fsf@bsb.me.uk>
Injection-Date: Mon, 14 Aug 2023 11:28:41 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3740506"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Mon, 14 Aug 2023 11:28 UTC

In article <874jl1j4rh.fsf@bsb.me.uk>,
Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
....
>Agreed. And newer programs will follow the ancient convention. The
>distinction, it seems to me, is not age but purpose. If you can easily
>see a program being used in a pipeline, it should silently read stdin,

No. As I mentioned earlier, if "cat" (et al) was being designed today, it
wouldn't work like that.

Remember that, in the early days of Unix, typing commands on a 110 baud
teletype, keeping typing to an absolute minimum was a top priority. Today,
not so much.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/FreeCollege

Re: Piping to stdin

<ubdgcv$2carp$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10838&group=comp.unix.programmer#10838

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 15:14:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Sender: <untosten@0.0.0.0>
Message-ID: <ubdgcv$2carp$2@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com> <20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
Injection-Date: Mon, 14 Aug 2023 15:14:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee3ab186f41f9a01d300549a63d9bc21";
logging-data="2501497"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Dyck82bVlms5/IJNKA7WzVHh1f151TM8="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.9-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:EPpeR8K9ZyDnXi9enXNZZhF57LQ=
 by: Kalevi Kolttonen - Mon, 14 Aug 2023 15:14 UTC

In comp.unix.programmer Kenny McCormack <gazelle@shell.xmission.com> wrote:
> You know that - and I know that - but do they know that?

It makes no difference. In the real world nobody has
files named '-'.

br,
KK

Re: Piping to stdin

<sWrCM.59049$m8Ke.15249@fx08.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10839&group=comp.unix.programmer#10839

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx08.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Piping to stdin
Newsgroups: comp.unix.programmer,comp.lang.c
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co> <874jl1j4rh.fsf@bsb.me.uk> <ubd359$3i4qq$2@news.xmission.com>
Lines: 13
Message-ID: <sWrCM.59049$m8Ke.15249@fx08.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 14 Aug 2023 15:41:12 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 14 Aug 2023 15:41:12 GMT
X-Received-Bytes: 1229
 by: Scott Lurndal - Mon, 14 Aug 2023 15:41 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:
>In article <874jl1j4rh.fsf@bsb.me.uk>,
>Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>...
>>Agreed. And newer programs will follow the ancient convention. The
>>distinction, it seems to me, is not age but purpose. If you can easily
>>see a program being used in a pipeline, it should silently read stdin,
>
>No. As I mentioned earlier, if "cat" (et al) was being designed today, it
>wouldn't work like that.

Why do you believe that?

Re: Piping to stdin

<ube4oj$2ffk8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10843&group=comp.unix.programmer#10843

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: richard....@gmail.com (Richard Harnden)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 22:02:11 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ube4oj$2ffk8$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co>
<874jl1j4rh.fsf@bsb.me.uk> <ubd359$3i4qq$2@news.xmission.com>
<sWrCM.59049$m8Ke.15249@fx08.iad>
Reply-To: nospam.harnden@gmail.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Aug 2023 21:02:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2ee7ac9f4e0bbb299b089ffa9a876d89";
logging-data="2604680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183Tq1sE6DXpvHb6+FtOLIEma8hSA3bmfw="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.14.0
Cancel-Lock: sha1:IM95RG1CrfVeXfrVzUnHLmt3V+A=
In-Reply-To: <sWrCM.59049$m8Ke.15249@fx08.iad>
 by: Richard Harnden - Mon, 14 Aug 2023 21:02 UTC

On 14/08/2023 16:41, Scott Lurndal wrote:
> gazelle@shell.xmission.com (Kenny McCormack) writes:
>> In article <874jl1j4rh.fsf@bsb.me.uk>,
>> Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>> ...
>>> Agreed. And newer programs will follow the ancient convention. The
>>> distinction, it seems to me, is not age but purpose. If you can easily
>>> see a program being used in a pipeline, it should silently read stdin,
>>
>> No. As I mentioned earlier, if "cat" (et al) was being designed today, it
>> wouldn't work like that.
>
> Why do you believe that?
>

$ cat a.c b.c - <c.c >abc.c

What's not to love?

Re: Piping to stdin

<OOwCM.87864$RDRe.32841@fx06.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10844&group=comp.unix.programmer#10844

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Piping to stdin
Newsgroups: comp.unix.programmer,comp.lang.c
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co> <874jl1j4rh.fsf@bsb.me.uk> <ubd359$3i4qq$2@news.xmission.com> <sWrCM.59049$m8Ke.15249@fx08.iad> <ube4oj$2ffk8$1@dont-email.me>
Lines: 24
Message-ID: <OOwCM.87864$RDRe.32841@fx06.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 14 Aug 2023 21:14:22 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 14 Aug 2023 21:14:22 GMT
X-Received-Bytes: 1574
 by: Scott Lurndal - Mon, 14 Aug 2023 21:14 UTC

Richard Harnden <richard.nospam@gmail.com> writes:
>On 14/08/2023 16:41, Scott Lurndal wrote:
>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>> In article <874jl1j4rh.fsf@bsb.me.uk>,
>>> Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>> ...
>>>> Agreed. And newer programs will follow the ancient convention. The
>>>> distinction, it seems to me, is not age but purpose. If you can easily
>>>> see a program being used in a pipeline, it should silently read stdin,
>>>
>>> No. As I mentioned earlier, if "cat" (et al) was being designed today, it
>>> wouldn't work like that.
>>
>> Why do you believe that?
>>
>
>$ cat a.c b.c - <c.c >abc.c
>
>What's not to love?

Exactly.

$ nroff -mm docbody.mm | cat docheader.txt - doctrailer.txt > document

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor