Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x and xx operators are too different #4410

Closed
p6rt opened this issue Jul 16, 2015 · 9 comments
Closed

x and xx operators are too different #4410

p6rt opened this issue Jul 16, 2015 · 9 comments
Labels
RFC Request For Comments

Comments

@p6rt
Copy link

p6rt commented Jul 16, 2015

Migrated from rt.perl.org#125628 (status was 'resolved')

Searchable as RT125628$

@p6rt
Copy link
Author

p6rt commented Jul 16, 2015

From @AlexDaniel

IRC log​: http://irclog.perlgeek.de/perl6/2015-07-16#i_10907791

xx throws an error for Inf, -Inf, NaN, but x does not. I believe that these
operators should behave similarly in such edge cases.

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

From @lizmat

Fixed the “a” x Inf case with 059dac9f0be8c563f1a, tests needed

Did *not* fix the “a” x *, as per discussion at​:
  http://irclog.perlgeek.de/perl6/2015-07-18#i_10918034

On 16 Jul 2015, at 12​:59, Alex Jakimenko (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Alex Jakimenko
# Please include the string​: [perl #​125628]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125628 >

IRC log​: http://irclog.perlgeek.de/perl6/2015-07-16#i_10907791

xx throws an error for Inf, -Inf, NaN, but x does not. I believe that these
operators should behave similarly in such edge cases.

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 19, 2016

From @coke

On Sat Jul 18 09​:58​:45 2015, elizabeth wrote​:

Fixed the “a” x Inf case with 059dac9f0be8c563f1a, tests needed

Did *not* fix the “a” x *, as per discussion at​:
http://irclog.perlgeek.de/perl6/2015-07-18#i_10918034

On 16 Jul 2015, at 12​:59, Alex Jakimenko (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Alex Jakimenko
# Please include the string​: [perl #​125628]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125628 >

IRC log​: http://irclog.perlgeek.de/perl6/2015-07-16#i_10907791

xx throws an error for Inf, -Inf, NaN, but x does not. I believe that
these
operators should behave similarly in such edge cases.

Based on liz's comment, marking closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 5, 2016

From @MasterDuke17

On Fri Aug 19 10​:52​:44 2016, coke wrote​:

On Sat Jul 18 09​:58​:45 2015, elizabeth wrote​:

Fixed the “a” x Inf case with 059dac9f0be8c563f1a, tests needed

Did *not* fix the “a” x *, as per discussion at​:
http://irclog.perlgeek.de/perl6/2015-07-18#i_10918034

On 16 Jul 2015, at 12​:59, Alex Jakimenko (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Alex Jakimenko
# Please include the string​: [perl #​125628]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125628 >

IRC log​: http://irclog.perlgeek.de/perl6/2015-07-16#i_10907791

xx throws an error for Inf, -Inf, NaN, but x does not. I believe that
these
operators should behave similarly in such edge cases.

Based on liz's comment, marking closable with tests.

Tests added in Raku/roast#152

@p6rt
Copy link
Author

p6rt commented Sep 5, 2016

From @AlexDaniel

The problem is that xx behavior has changed.

<AlexDaniel> m​: say (25 xx Inf)[^20]
<camelia> rakudo-moar f49b38​: OUTPUT«(25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25)␤»

<AlexDaniel> m​: say 25 x Inf
<camelia> rakudo-moar f49b38​: OUTPUT«Cat object not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤Actually thrown at​:␤  in block <unit> at <tmp> line 1␤␤»

@p6rt
Copy link
Author

p6rt commented Sep 5, 2016

From @AlexDaniel

On 2016-09-05 08​:53​:37, alex.jakimenko@​gmail.com wrote​:

The problem is that xx behavior has changed.

<AlexDaniel> m​: say (25 xx Inf)[^20]
<camelia> rakudo-moar f49b38​: OUTPUT«(25 25 25 25 25 25 25 25 25 25 25
25 25 25
25 25 25 25 25 25)␤»

<AlexDaniel> m​: say 25 x Inf
<camelia> rakudo-moar f49b38​: OUTPUT«Cat object not yet implemented.
Sorry. ␤
in block <unit> at <tmp> line 1␤␤Actually thrown at​:␤ in block <unit>
at <tmp>
line 1␤␤»

Ah no, it's alright. For anybody else struggling to understand what is going on here​:

“xx (Inf, -Inf, NaN)” were throwing errors. Now “xx Inf” is OK, but “xx (-Inf, NaN)” are still errors.
“x (Inf, -Inf, NaN)” were not throwing errors. Now “x Inf” is NYI, and “x (-Inf, NaN)” error out.

So the issue is fixed indeed. It is now consistent, and half of the tests are there (MasterDuke++).

Before we can close this, we need tests for “xx -Inf” and “xx NaN”.

@p6rt
Copy link
Author

p6rt commented Sep 7, 2016

From @MasterDuke17

On Mon Sep 05 10​:49​:32 2016, alex.jakimenko@​gmail.com wrote​:

On 2016-09-05 08​:53​:37, alex.jakimenko@​gmail.com wrote​:

The problem is that xx behavior has changed.

<AlexDaniel> m​: say (25 xx Inf)[^20]
<camelia> rakudo-moar f49b38​: OUTPUT«(25 25 25 25 25 25 25 25 25 25
25
25 25 25
25 25 25 25 25 25)␤»

<AlexDaniel> m​: say 25 x Inf
<camelia> rakudo-moar f49b38​: OUTPUT«Cat object not yet implemented.
Sorry. ␤
in block <unit> at <tmp> line 1␤␤Actually thrown at​:␤ in block <unit>
at <tmp>
line 1␤␤»

Ah no, it's alright. For anybody else struggling to understand what is
going on
here​:

“xx (Inf, -Inf, NaN)” were throwing errors. Now “xx Inf” is OK, but
“xx (-Inf,
NaN)” are still errors.
“x (Inf, -Inf, NaN)” were not throwing errors. Now “x Inf” is NYI, and
“x
(-Inf, NaN)” error out.

So the issue is fixed indeed. It is now consistent, and half of the
tests are
there (MasterDuke++).

Before we can close this, we need tests for “xx -Inf” and “xx NaN”.

Tests added in Raku/roast@fb22ba6

@p6rt p6rt closed this as completed Sep 7, 2016
@p6rt
Copy link
Author

p6rt commented Sep 7, 2016

@AlexDaniel - Status changed from 'open' to 'resolved'

@p6rt p6rt added the RFC Request For Comments label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

1 participant