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

gist missing for non-native typed array that doesn't get initialized #4963

Open
p6rt opened this issue Dec 30, 2015 · 6 comments
Open

gist missing for non-native typed array that doesn't get initialized #4963

p6rt opened this issue Dec 30, 2015 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Dec 30, 2015

Migrated from rt.perl.org#127093 (status was 'open')

Searchable as RT127093$

@p6rt
Copy link
Author

p6rt commented Dec 30, 2015

From softdev@leandrohermida.com

my @​a[4]
[(Any) (Any) (Any) (Any)]
my Int @​a[4] = 0..3
[0 1 2 3]
my Int @​a[4]
Method 'gist' not found for invocant of class 'NQPMu'

I expected​:
[(Int) (Int) (Int) (Int)]

By defining native typed arrays do have a gist​:

my int @​a[4]
[0 0 0 0]

@p6rt
Copy link
Author

p6rt commented Jan 2, 2016

From @lizmat

On 30 Dec 2015, at 19​:41, Leandro Hermida (via RT) <perl6-bugs-followup@​perl.org> wrote​:

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

my @​a[4]
[(Any) (Any) (Any) (Any)]
my Int @​a[4] = 0..3
[0 1 2 3]
my Int @​a[4]
Method 'gist' not found for invocant of class 'NQPMu'

I expected​:
[(Int) (Int) (Int) (Int)]

By defining native typed arrays do have a gist​:

my int @​a[4]
[0 0 0 0]

Thanks for reporting!

This was fixed, at least temporarily, with 42326d1b72f658f6dc5 . No tests have been added yet, in lieu of finding out how we’re going to do this post 6.c .

Liz

@p6rt
Copy link
Author

p6rt commented Jan 2, 2016

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

@p6rt
Copy link
Author

p6rt commented Jan 2, 2016

From softdev@leandrohermida.com

On Sat Jan 02 04​:14​:47 2016, elizabeth wrote​:

On 30 Dec 2015, at 19​:41, Leandro Hermida (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

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

my @​a[4]
[(Any) (Any) (Any) (Any)]
my Int @​a[4] = 0..3
[0 1 2 3]
my Int @​a[4]
Method 'gist' not found for invocant of class 'NQPMu'

I expected​:
[(Int) (Int) (Int) (Int)]

By defining native typed arrays do have a gist​:

my int @​a[4]
[0 0 0 0]

Thanks for reporting!

This was fixed, at least temporarily, with 42326d1b72f658f6dc5 . No
tests have been added yet, in lieu of finding out how we’re going to
do this post 6.c .

Liz

Thanks Liz, another thing I forgot to ask about in the ticket, the other unexpected behavior for me at least is when a native typed array is declared but not initialized each element of the array has a zero where I would've expected it to be sized but not initialized and have no value within each element. Is this part of spec?

my int @​a[4]
[0 0 0 0]

@p6rt
Copy link
Author

p6rt commented Jan 2, 2016

From softdev@leandrohermida.com

On Sat Jan 02 06​:31​:40 2016, lhermida wrote​:

On Sat Jan 02 04​:14​:47 2016, elizabeth wrote​:

On 30 Dec 2015, at 19​:41, Leandro Hermida (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

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

my @​a[4]
[(Any) (Any) (Any) (Any)]
my Int @​a[4] = 0..3
[0 1 2 3]
my Int @​a[4]
Method 'gist' not found for invocant of class 'NQPMu'

I expected​:
[(Int) (Int) (Int) (Int)]

By defining native typed arrays do have a gist​:

my int @​a[4]
[0 0 0 0]

Thanks for reporting!

This was fixed, at least temporarily, with 42326d1b72f658f6dc5 . No
tests have been added yet, in lieu of finding out how we’re going to
do this post 6.c .

Liz

Thanks Liz, another thing I forgot to ask about in the ticket, the
other unexpected behavior for me at least is when a native typed array
is declared but not initialized each element of the array has a zero
where I would've expected it to be sized but not initialized and have
no value within each element. Is this part of spec?

my int @​a[4]
[0 0 0 0]

Sorry sent too fast, from what I read Perl 6 has no undef value I would expect the declaration of a native-typed numeric or integer array to be this​:

my int @​a[4]
[NaN NaN NaN NaN]

@p6rt
Copy link
Author

p6rt commented Mar 13, 2018

From @AlexDaniel

OK this issue is resolved with the commit mentioned above. Tests needed.

As for *int* native array having NaNs in it, that's not going to happen. It's an array of native ints, it just can't and won't ever store any other type of a value. A native int can't be NaN.

On 2016-01-02 06​:34​:50, lhermida wrote​:

On Sat Jan 02 06​:31​:40 2016, lhermida wrote​:

On Sat Jan 02 04​:14​:47 2016, elizabeth wrote​:

On 30 Dec 2015, at 19​:41, Leandro Hermida (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

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

my @​a[4]
[(Any) (Any) (Any) (Any)]
my Int @​a[4] = 0..3
[0 1 2 3]
my Int @​a[4]
Method 'gist' not found for invocant of class 'NQPMu'

I expected​:
[(Int) (Int) (Int) (Int)]

By defining native typed arrays do have a gist​:

my int @​a[4]
[0 0 0 0]

Thanks for reporting!

This was fixed, at least temporarily, with 42326d1b72f658f6dc5 .
No
tests have been added yet, in lieu of finding out how we’re going
to
do this post 6.c .

Liz

Thanks Liz, another thing I forgot to ask about in the ticket, the
other unexpected behavior for me at least is when a native typed
array
is declared but not initialized each element of the array has a zero
where I would've expected it to be sized but not initialized and have
no value within each element. Is this part of spec?

my int @​a[4]
[0 0 0 0]

Sorry sent too fast, from what I read Perl 6 has no undef value I
would expect the declaration of a native-typed numeric or integer
array to be this​:

my int @​a[4]
[NaN NaN NaN NaN]

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

No branches or pull requests

1 participant