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
Shaped arrays can't have zero size #6469
Comments
From @dwarringThis is OK: % perl6 -e'my $size = 2; my @xref[$size,3] = ([1,2,3], [4,5,6]); say @xref' [[1 2 3] [4 5 6]] But this isn't: % perl6 -e'my $size = 0; my @xref[$size,3] = (); say @xref' Illegal dimension in shape: 0. All dimensions must be integers bigger than % perl6 -v Just seems an unreasonable restriction that the major shape size of an |
From @AlexDanielIndeed. The limit was introduced as a response to this ticket: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126800
|
The RT System itself - Status changed from 'new' to 'open' |
From @geekosaurHow exactly do you index such an array? On Sat, Aug 26, 2017 at 8:11 PM, Aleks-Daniel Jakimenko-Aleksejev via RT <
-- |
From @AlexDanielWell, what do you mean? Of course you can't put anything into it, and any attempt to index it will throw. It may seem useless, however, if you can have an empty array, why can't you have a shaped empty array?
|
From @geekosaur
Only if all dimensions are unindexable. Otherwise you have something with And an empty unshaped array, in addition to being usable as such |
From @dwarringAttached is my use case which is parsing of PDF cross reference indices. xref Which populates nicely into an array of 'n' lines of shape 3. There's the rare, but possible case of an xref section with zero entries xref (I've encountered real-world PDF's like this). The attached grammar/actions attempted to handle it as an array of shape Just my preferred solution for the above case. On Sun, Aug 27, 2017 at 12:38 PM, Brandon Allbery via RT <
|
LTA in some cases anyway:
But:
|
Migrated from rt.perl.org#131965 (status was 'open')
Searchable as RT131965$
The text was updated successfully, but these errors were encountered: