Chet Ramey wrote in
<30328892-c16b-5007-fee8-4b29430b7...@case.edu>:
|On 1/4/23 12:21 PM, Steffen Nurpmeso wrote:
|> Chet Ramey wrote in
|> <8a61e01d-65c0-6c91-3575-399022fcb...@case.edu>:
|>|On 12/30/22 3:44 PM, Steffen Nurpmeso wrote:
|>|
|>|> Digital, logical, liberal, yuck :)
|>|
|>|
On 1/4/23 12:21 PM, Steffen Nurpmeso wrote:
Chet Ramey wrote in
<8a61e01d-65c0-6c91-3575-399022fcb...@case.edu>:
|On 12/30/22 3:44 PM, Steffen Nurpmeso wrote:
|
|> Digital, logical, liberal, yuck :)
|
|We channeling Supertramp here?
For a nice Breakfast in America, yes.
(Not really t
Chet Ramey wrote in
<8a61e01d-65c0-6c91-3575-399022fcb...@case.edu>:
|On 12/30/22 3:44 PM, Steffen Nurpmeso wrote:
|
|> Digital, logical, liberal, yuck :)
|
|We channeling Supertramp here?
For a nice Breakfast in America, yes.
(Not really that. But really.)
Ciao,
--steffen
|
|Der Kragenba
On 1/4/23 10:36 AM, G. Branden Robinson wrote:
..and some spend their years watching the moon bear wank himself off.
Or, if you were in Yorkshire last week, a walrus.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet
At 2023-01-04T10:22:15-0500, Chet Ramey wrote:
> On 12/30/22 3:44 PM, Steffen Nurpmeso wrote:
>
> > Digital, logical, liberal, yuck :)
>
> We channeling Supertramp here?
🤣
Some listen to the birds in the trees singing so happily...
..and some spend their years watching the moon bear wank himse
On 12/30/22 4:23 AM, Robert Elz wrote:
For what it is worth, I tested a bunch of shells with the original
expressions, all ksh variants, bosh, and bash evaluate the original
expressions the bash way, all ash variants, plus yash and zsh implement
it the dash way. Neither is incorrect.
It real
On 12/30/22 3:44 PM, Steffen Nurpmeso wrote:
Digital, logical, liberal, yuck :)
We channeling Supertramp here?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwr
On 12/29/22 12:23 PM, Steffen Nurpmeso wrote:
Hello.
Name: bash
Path: /usr/ports/core
Version: 5.2.15
Release: 1 >
$ i=10 j=20;echo $(( i += j += i += j ));echo $i,$j
60
60,50
This has already been beaten pretty much to death, so I'll just explain
Date:Fri, 30 Dec 2022 16:48:15 +0100
From:Steffen Nurpmeso
Message-ID: <20221230154815.7-tqs%stef...@sdaoden.eu>
| Of course i continue to disagree as i continue to
| disagree on much of the sequence point outcome of ISO C, too.
There's a big difference between
Robert Elz wrote in
<10111.1672392...@jacaranda.noi.kre.to>:
...
|The way to make this work is to insert sequence points, of which there
|is only one which is plausible in shell arithmetic expressions, and even
|that isn't required to exist by POSIX.
|
| $(( i += i, j += i, i += j ))
|
|
Greg Wooledge wrote in
:
|On Fri, Dec 30, 2022 at 12:21:52AM +0100, Steffen Nurpmeso wrote:
|> ..i want to reiterate the relation to what "human logic" expects.
|
|I'm a human, so I feel qualified to address this point.
|
|What I expect from a command like
|
|(( i += j += i += j ))
|
|is
Date:Thu, 29 Dec 2022 21:57:00 +
From:Alain D D Williams
Message-ID: <20221229215700.gd16...@phcomp.co.uk>
| So use sub-expressions to 'evaluate first' so you should prolly rewrite:
|
| (( i += j += i += i ))
|
| as:
|
| (( i += (j += (i += i)) ))
On Fri, Dec 30, 2022 at 12:15:38AM +0100, Steffen Nurpmeso wrote:
> Ah, wait..
>
> Alain D D Williams wrote in
> <20221229215700.gd16...@phcomp.co.uk>:
> ...
> |Anyway: back to what the shell should be doing. You cannot put a ';' \
> |into (( ))
> |as a sequence point, but the manual does say
On Fri, Dec 30, 2022 at 12:21:52AM +0100, Steffen Nurpmeso wrote:
> ..i want to reiterate the relation to what "human logic" expects.
I'm a human, so I feel qualified to address this point.
What I expect from a command like
(( i += j += i += j ))
is to get unpredictable results that have no rel
Andreas Schwab wrote in
<87pmc194i6@igel.home>:
|On Dez 30 2022, Steffen Nurpmeso wrote:
...
|There is no right answer.
But, do you know what?
What you advocate contradicts thousands of years of human culture,
religion and philosophie (to the best of my understanding),
including your nativ
On Dez 30 2022, Steffen Nurpmeso wrote:
> Not me!! Bash does it right for x=++x,
There is no right answer.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
On Dez 30 2022, Steffen Nurpmeso wrote:
> Andreas Schwab wrote in
> <87358xambe@igel.home>:
> |On Dez 29 2022, Alain D D Williams wrote:
> |> On Thu, Dec 29, 2022 at 10:30:09PM +0100, Steffen Nurpmeso wrote:
> |>
> |>> only clang warns on sequencing when tested.
> |>
> |> Ah: so only cl
And, lastly (from my side)..
Steffen Nurpmeso wrote in
<20221229231538.pz4j9%stef...@sdaoden.eu>:
...
|Alain D D Williams wrote in
| <20221229215700.gd16...@phcomp.co.uk>:
| ...
||Anyway: back to what the shell should be doing. You cannot put a ';' \
||into (( ))
||as a sequence point, but
Ah, wait..
Alain D D Williams wrote in
<20221229215700.gd16...@phcomp.co.uk>:
...
|Anyway: back to what the shell should be doing. You cannot put a ';' \
|into (( ))
|as a sequence point, but the manual does say:
|
|"Sub-expressions in parentheses are evaluated first and may override the
|
Andreas Schwab wrote in
<87358xambe@igel.home>:
|On Dez 29 2022, Alain D D Williams wrote:
|> On Thu, Dec 29, 2022 at 10:30:09PM +0100, Steffen Nurpmeso wrote:
|>
|>> only clang warns on sequencing when tested.
|>
|> Ah: so only clang gives the warning that the others should probably giv
Alain D D Williams wrote in
<20221229215700.gd16...@phcomp.co.uk>:
|On Thu, Dec 29, 2022 at 10:30:09PM +0100, Steffen Nurpmeso wrote:
|> But then shell "operators and their precedence, associativity,
|> and values are the same as in the C language". There are no
|> sequence points.
|
|Orde
On Dez 29 2022, Alain D D Williams wrote:
> On Thu, Dec 29, 2022 at 10:30:09PM +0100, Steffen Nurpmeso wrote:
>
>> only clang warns on sequencing when tested.
>
> Ah: so only clang gives the warning that the others should probably give.
$ gcc -Wall t.c
t.c: In function ‘main’:
t.c:7:11: warning:
On Thu, Dec 29, 2022 at 10:30:09PM +0100, Steffen Nurpmeso wrote:
> But then shell "operators and their precedence, associativity,
> and values are the same as in the C language". There are no
> sequence points.
Order of evaluation is not the same as precedence/associativity.
> += is right ass
Alain D D Williams wrote in
<20221229204511.gc16...@phcomp.co.uk>:
...
|No. i += j += i += i does not contain a sequence point so there is \
|no guarantee
|that anything is completed (eg storing a value in variable i) before \
|another
|part (getting a value from variable i) is evaluated.
B
On Thu, Dec 29, 2022 at 09:09:25PM +0100, Emanuele Torre wrote:
> On Thu, Dec 29, 2022 at 05:35:48PM +, Alain D D Williams wrote:
> > On Thu, Dec 29, 2022 at 06:23:09PM +0100, Steffen Nurpmeso wrote:
> > > Hello.
> > >
> > > Name: bash
> > > Path: /usr/ports/core
> > > Ve
On Thu, Dec 29, 2022 at 05:35:48PM +, Alain D D Williams wrote:
> On Thu, Dec 29, 2022 at 06:23:09PM +0100, Steffen Nurpmeso wrote:
> > Hello.
> >
> > Name: bash
> > Path: /usr/ports/core
> > Version: 5.2.15
> > Release: 1
> >
> > $ i=10 j=20;echo $(( i +=
Alain D D Williams wrote in
<20221229173548.gw16...@phcomp.co.uk>:
|On Thu, Dec 29, 2022 at 06:23:09PM +0100, Steffen Nurpmeso wrote:
|> Hello.
|>
|> Name: bash
|> Path: /usr/ports/core
|> Version: 5.2.15
|> Release: 1
|>
|> $ i=10 j=20;echo $(( i +=
On Thu, Dec 29, 2022 at 06:23:09PM +0100, Steffen Nurpmeso wrote:
> Hello.
>
> Name: bash
> Path: /usr/ports/core
> Version: 5.2.15
> Release: 1
>
> $ i=10 j=20;echo $(( i += j += i += j ));echo $i,$j
> 60
> 60,50
> $ i=10 j=20;echo $(( i += j += i += i )
Hello.
Name: bash
Path: /usr/ports/core
Version: 5.2.15
Release: 1
$ i=10 j=20;echo $(( i += j += i += j ));echo $i,$j
60
60,50
$ i=10 j=20;echo $(( i += j += i += i ));echo $i,$j
50
50,40
$ cat t.c
#include
int main(void){
int i, j;
29 matches
Mail list logo