[perl6/specs] baec19: Update S27-perl-culture-draft.pod6
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: baec197a059726524d2071062cb29176778a2ae9 https://github.com/perl6/specs/commit/baec197a059726524d2071062cb29176778a2ae9 Author: XliffDate: 2017-08-24 (Thu, 24 Aug 2017) Changed paths: M S27-perl-culture-draft.pod6 Log Message: --- Update S27-perl-culture-draft.pod6 Minor typo fix. Commit: cdca1ad1a9dfd93d326567698c60cfd612c4fdde https://github.com/perl6/specs/commit/cdca1ad1a9dfd93d326567698c60cfd612c4fdde Author: Brad Gilbert Date: 2017-08-24 (Thu, 24 Aug 2017) Changed paths: M S27-perl-culture-draft.pod6 Log Message: --- Merge pull request #122 from Xliff/patch-1 Typo in S27-draft Lost -> Lots Compare: https://github.com/perl6/specs/compare/c2d66a5cb735...cdca1ad1a9df
[perl #131964] Regex anchors ^, ^^, $ and $$ confused in
# New Ticket Created by Moritz Lenz # Please include the string: [perl #131964] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131964 > This is Rakudo version 2017.08-11-g6cec6b7 built on MoarVM version 2017.08.1-19-g151a256 implementing Perl 6.c. Rakudo confuses with in a regex, and the same with ^^ and $$. The following four test cases should all pass (barring a thinko on my part), but instead they all fail: #!/usr/bin/env perl6 use Test; given "abc\ndef" { is S/ /X/, "Xabc\ndef", '^ in '; is S/ /X/, "abc\ndefX", '$ in '; is S:g/ /X/, "Xabc\nXdef", '^^ in '; is S:g/ /X/, "abcX\ndefX", '^^ in '; } done-testing Kudos go to _cronus on #perl6 for asking about a weird behavior, which led to the discovery of this bug. Cheers, Moritz Moritz Lenz Design & Architecture (CDA) noris network Thomas-Mann-Straße 16-20 90471 Nürnberg Deutschland Tel +49 911 9352 1517 Fax +49 911 9352 100 moritz.l...@noris.de https://www.noris.de - Mehr Leistung als Standard Vorstand: Ingo Kraupa (Vorsitzender), Joachim Astel Vorsitzender des Aufsichtsrats: Stefan Schnabel - AG Nürnberg HRB 17689 smime.p7s Description: S/MIME cryptographic signature
Re: [perl #131965] Shaped arrays can't have zero size
> Well, 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? > Only if all dimensions are unindexable. Otherwise you have something with inaccessible slots (and, potentially thereby, not truly leaked but unusable, memory). And an empty unshaped array, in addition to being usable as such (degenerate case of all shaped dimensions being size 0), can be made non-empty. Shaped arrays cannot.
Re: [perl #131965] Shaped arrays can't have zero size
> Well, 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? > Only if all dimensions are unindexable. Otherwise you have something with inaccessible slots (and, potentially thereby, not truly leaked but unusable, memory). And an empty unshaped array, in addition to being usable as such (degenerate case of all shaped dimensions being size 0), can be made non-empty. Shaped arrays cannot.
[perl #131965] Shaped arrays can't have zero size
Well, 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? On 2017-08-26 17:13:02, allber...@gmail.com wrote: > How exactly do you index such an array? > > On Sat, Aug 26, 2017 at 8:11 PM, Aleks-Daniel Jakimenko-Aleksejev via RT < > perl6-bugs-follo...@perl.org> wrote: > > > Indeed. The limit was introduced as a response to this ticket: > > https://rt.perl.org/Ticket/Display.html?id=126800 > > The check is probably too aggressive, and indeed, maybe there's nothing > > wrong > > with 0 sized arrays. I wonder what was the justification for making the > > check > > inclusive. > > On 2017-08-26 16:15:33, david.warring wrote: > > > This 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 > > > 0 > > > in block at -e line 1 > > > > > > % perl6 -v > > > This is Rakudo version 2017.08 built on MoarVM version 2017.08.1 > > > implementing Perl 6.c. > > > > > > Just seems an unreasonable restriction that the major shape size of an > > > array can't be zero. > > > > > >
Re: [perl #131965] Shaped arrays can't have zero size
How exactly do you index such an array? On Sat, Aug 26, 2017 at 8:11 PM, Aleks-Daniel Jakimenko-Aleksejev via RT < perl6-bugs-follo...@perl.org> wrote: > Indeed. The limit was introduced as a response to this ticket: > https://rt.perl.org/Ticket/Display.html?id=126800 > The check is probably too aggressive, and indeed, maybe there's nothing > wrong > with 0 sized arrays. I wonder what was the justification for making the > check > inclusive. > On 2017-08-26 16:15:33, david.warring wrote: > > This 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 > > 0 > > in block at -e line 1 > > > > % perl6 -v > > This is Rakudo version 2017.08 built on MoarVM version 2017.08.1 > > implementing Perl 6.c. > > > > Just seems an unreasonable restriction that the major shape size of an > > array can't be zero. > > -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
Re: [perl #131965] Shaped arrays can't have zero size
How exactly do you index such an array? On Sat, Aug 26, 2017 at 8:11 PM, Aleks-Daniel Jakimenko-Aleksejev via RT < perl6-bugs-follo...@perl.org> wrote: > Indeed. The limit was introduced as a response to this ticket: > https://rt.perl.org/Ticket/Display.html?id=126800 > The check is probably too aggressive, and indeed, maybe there's nothing > wrong > with 0 sized arrays. I wonder what was the justification for making the > check > inclusive. > On 2017-08-26 16:15:33, david.warring wrote: > > This 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 > > 0 > > in block at -e line 1 > > > > % perl6 -v > > This is Rakudo version 2017.08 built on MoarVM version 2017.08.1 > > implementing Perl 6.c. > > > > Just seems an unreasonable restriction that the major shape size of an > > array can't be zero. > > -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
[perl #131965] Shaped arrays can't have zero size
Indeed. The limit was introduced as a response to this ticket: https://rt.perl.org/Ticket/Display.html?id=126800 The check is probably too aggressive, and indeed, maybe there's nothing wrong with 0 sized arrays. I wonder what was the justification for making the check inclusive. On 2017-08-26 16:15:33, david.warring wrote: > This 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 > 0 > in block at -e line 1 > > % perl6 -v > This is Rakudo version 2017.08 built on MoarVM version 2017.08.1 > implementing Perl 6.c. > > Just seems an unreasonable restriction that the major shape size of an > array can't be zero.
[perl #131966] Shaped native arrays with negative sizes (my int @a[-9999999999999999])
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #131966] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131966 > Code: my int @x[-2**63]; say +@x Result: -9223372036854775808 See RT #126800 for exactly the same issue with non-native arrays: https://rt.perl.org/Ticket/Display.html?id=126800
[perl #131965] Shaped arrays can't have zero size
# New Ticket Created by David Warring # Please include the string: [perl #131965] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131965 > This 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 0 in block at -e line 1 % perl6 -v This is Rakudo version 2017.08 built on MoarVM version 2017.08.1 implementing Perl 6.c. Just seems an unreasonable restriction that the major shape size of an array can't be zero.
[perl #129845] [TESTNEEDED] [CONC] `.dir` returns corrupted `IO::Path`s under concurrent load
It is more or less reliable actually. I think writing a stresstest will do. On 2017-08-26 05:33:17, sml...@gmail.com wrote: > Both the demo script (from the top post) and the one-line test case > (2nd post) now pass without error! > > Bisectable identifies a commit from last week as the fix: > > https://gist.github.com/97d96022fdfed416e67ecadf5b2b9353 > https://github.com/rakudo/rakudo/commit/231cb3f > > Is there a way to write a spectest for a probabilistic bug like this?
[perl #130604] [PARSER] Weirdness when mixing `..` and `...` without parens
Indeed, I'm not sure what I was smoking. On 2017-01-20 21:27:50, sml...@gmail.com wrote: > > It numifies ranges so that the number of elements is used. In other > > words, 1..2 > > works like 2 and 1..1 works like 1. > > No, if it worked like that then the first two examples would throw the > same error as the third, instead of exhibiting behaviors that are both > different from that and from each other. > > Here are two more examples, showing the difference in case of an > actual arithmetic series: > > ➜ say 1..1, 3 ... 7; > (1..1 3 4 5 6 7) > > ➜ say 1, 3 ... 7; > (1 3 5 7)
Re: [perl #131962] [REGRESSION] `Pair.kv`/`.keys`/.`values` dies if either the key or the value is `Mu`
Fixed with a5014fd0855545cc083b3590 , tests needed. > On 26 Aug 2017, at 13:10, Sam S. (via RT)> wrote: > > # New Ticket Created by Sam S. > # Please include the string: [perl #131962] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=131962 > > > > ➜ say (4 => Mu).kv; > Type check failed in binding to parameter 'val2'; > expected Any but got Mu (Mu) > > ➜ say ((Mu) => 4).kv; > Type check failed in binding to parameter 'val1'; > expected Any but got Mu (Mu) > > ➜ say ((Mu) => Mu).kv; > Type check failed in binding to parameter 'val1'; > expected Any but got Mu (Mu) > > `Pair` methods that are affected: > .kv > .keys > .values > > `Pair` methods that NOT are affected: > .key > .value > .pairs > .antipairs > .Str > .gist > .perl > > bisectable finds that this was broken two weeks ago: > > https://gist.github.com/Whateverable/03a10377df0b3e0409eaa69330750868 > > https://github.com/rakudo/rakudo/commit/30584dac2fe231038c5bea557946a41310e9fd0f
Re: [perl #131962] [REGRESSION] `Pair.kv`/`.keys`/.`values` dies if either the key or the value is `Mu`
Fixed with a5014fd0855545cc083b3590 , tests needed. > On 26 Aug 2017, at 13:10, Sam S. (via RT)> wrote: > > # New Ticket Created by Sam S. > # Please include the string: [perl #131962] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=131962 > > > > ➜ say (4 => Mu).kv; > Type check failed in binding to parameter 'val2'; > expected Any but got Mu (Mu) > > ➜ say ((Mu) => 4).kv; > Type check failed in binding to parameter 'val1'; > expected Any but got Mu (Mu) > > ➜ say ((Mu) => Mu).kv; > Type check failed in binding to parameter 'val1'; > expected Any but got Mu (Mu) > > `Pair` methods that are affected: > .kv > .keys > .values > > `Pair` methods that NOT are affected: > .key > .value > .pairs > .antipairs > .Str > .gist > .perl > > bisectable finds that this was broken two weeks ago: > > https://gist.github.com/Whateverable/03a10377df0b3e0409eaa69330750868 > > https://github.com/rakudo/rakudo/commit/30584dac2fe231038c5bea557946a41310e9fd0f
[perl #129845] [CONC] `.dir` returns corrupted `IO::Path`s under concurrent load
Both the demo script (from the top post) and the one-line test case (2nd post) now pass without error! Bisectable identifies a commit from last week as the fix: https://gist.github.com/97d96022fdfed416e67ecadf5b2b9353 https://github.com/rakudo/rakudo/commit/231cb3f Is there a way to write a spectest for a probabilistic bug like this?
[perl #130773] [BUG] Bogus "Useless use" warning for WhateverCode in EVAL
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.
[perl #130711] [REGEX] `**` quantifier with dynamic count, misbehaves under `:exhaustive` matching
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.
[perl #130602] [BUG] `1, 2 Xand "ab".ords` fails with "Cannot invoke this object (REPR: Uninstantiable; Callable)"
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.
[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.
[perl #130604] [PARSER] Weirdness when mixing `..` and `...` without parens
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.
[perl #131962] [REGRESSION] `Pair.kv`/`.keys`/.`values` dies if either the key or the value is `Mu`
# New Ticket Created by Sam S. # Please include the string: [perl #131962] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131962 > ➜ say (4 => Mu).kv; Type check failed in binding to parameter 'val2'; expected Any but got Mu (Mu) ➜ say ((Mu) => 4).kv; Type check failed in binding to parameter 'val1'; expected Any but got Mu (Mu) ➜ say ((Mu) => Mu).kv; Type check failed in binding to parameter 'val1'; expected Any but got Mu (Mu) `Pair` methods that are affected: .kv .keys .values `Pair` methods that NOT are affected: .key .value .pairs .antipairs .Str .gist .perl bisectable finds that this was broken two weeks ago: https://gist.github.com/Whateverable/03a10377df0b3e0409eaa69330750868 https://github.com/rakudo/rakudo/commit/30584dac2fe231038c5bea557946a41310e9fd0f
Re: [perl #126951] [BUG] Interpolating a typed hash into an argument list produces wrong keys
Fixed with 6cec6b7218650aff1780a4dd , tests needed > On 26 Aug 2017, at 10:35, Sam S. via RTwrote: > > Shorter test-case: > >➜ say :{ a => 1, b => 2 }.FLATTENABLE_HASH; >{Str|a => a => 1, Str|b => b => 2} > > Compare to a normal Hash which works fine: > >➜ say { a => 1, b => 2 }.FLATTENABLE_HASH; >{a => 1, b => 2}
Re: [perl #126951] [BUG] Interpolating a typed hash into an argument list produces wrong keys
Fixed with 6cec6b7218650aff1780a4dd , tests needed > On 26 Aug 2017, at 10:35, Sam S. via RTwrote: > > Shorter test-case: > >➜ say :{ a => 1, b => 2 }.FLATTENABLE_HASH; >{Str|a => a => 1, Str|b => b => 2} > > Compare to a normal Hash which works fine: > >➜ say { a => 1, b => 2 }.FLATTENABLE_HASH; >{a => 1, b => 2}
[perl #126951] [BUG] Interpolating a typed hash into an argument list produces wrong keys
Shorter test-case: ➜ say :{ a => 1, b => 2 }.FLATTENABLE_HASH; {Str|a => a => 1, Str|b => b => 2} Compare to a normal Hash which works fine: ➜ say { a => 1, b => 2 }.FLATTENABLE_HASH; {a => 1, b => 2}
[perl #126951] [BUG] Interpolating a typed hash into an argument list produces wrong keys
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.
Re: User defined infix operators and whitespace
It seems to work without spaces if you choose a symbol that is not letter-like. # U+1F3B2 Game Die sub infix:<> ( Int $num, Int $size ) { [+] (1..$size).roll($num) }; sub prefix:<> ( Int $size ) { 1$size } say 10; say 46; # ⛏ U+26CF Pick sub infix:<⛏> ( Int $num, Int $size ) { [+] (1..$size).roll($num) }; sub prefix:<⛏> ( Int $size ) { 1⛏$size } say ⛏10; say 4⛏6; # Not working # ⅆ U+2146 Double-Struck Italic Small D #sub infix:<ⅆ> ( Int $num, Int $size ) { [+] (1..$size).roll($num) }; #sub prefix:<ⅆ> ( Int $size ) { 1ⅆ$size } #say ⅆ10; #say 4ⅆ6; On 10 August 2017 at 21:16, Simon Proctorwrote: > So I had a crazy little idea. I've played the odd bit of roleplaying in my > time and wanted to created a 'd' operator. > > Quite simple really. > > sub infix: ( Int $num, Int $size ) { [+] (1..$size).roll($num) }; > > sub prefix: ( Int $size ) { 1 d $size } > > Gives us 3 d 6 to roll 3 six sided dice or a prefix d 10 for a single 10 > sided dice. > > Except... I'd really like to write 3d6 or d10 but the parser barfs. > > Am I going to just have to live with that? Or did I miss something > obvious? > > Obviously it's possible to have operators that ignore whitespace (1+1 > works just fine) but is it possibly for user defined ones? > > Possibly more serious ones. > > Simon > -- Norman Gaywood, Computer Systems Officer School of Science and Technology University of New England Armidale NSW 2351, Australia ngayw...@une.edu.au http://turing.une.edu.au/~ngaywood Phone: +61 (0)2 6773 2412 Mobile: +61 (0)4 7862 0062 Please avoid sending me Word or Power Point attachments. See http://www.gnu.org/philosophy/no-word-attachments.html