Skip Menu |
Report information
Id: 127093
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: lhermida <softdev [at] leandrohermida.com>
Cc:
AdminCc:

Severity: (no value)
Tag: testneeded
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: gist missing for non-native typed array that doesn't get initialized
Download (untitled) / with headers
text/plain 252b
Show quoted text
> my @a[4]
[(Any) (Any) (Any) (Any)] Show quoted text
> my Int @a[4] = 0..3
[0 1 2 3] Show quoted text
> 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: Show quoted text
> my int @a[4]
[0 0 0 0]
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: "Leandro Hermida (via RT)" <perl6-bugs-followup [...] perl.org>
Date: Sat, 2 Jan 2016 13:14:09 +0100
Subject: Re: [perl #127093] gist missing for non-native typed array that doesn't get initialized
Download (untitled) / with headers
text/plain 791b
Show quoted text
> 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.perl.org/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
Download (untitled) / with headers
text/plain 1.2k
On Sat Jan 02 04:14:47 2016, elizabeth wrote: Show quoted text
> > 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.perl.org/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? Show quoted text
> my int @a[4]
[0 0 0 0]
Download (untitled) / with headers
text/plain 1.5k
On Sat Jan 02 06:31:40 2016, lhermida wrote: Show quoted text
> 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.perl.org/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: Show quoted text
> my int @a[4]
[NaN NaN NaN NaN]
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:
Show quoted text
> 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.
> > > >
> > > >
> > > >> 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]




This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org