[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-11 Thread jn...@jnthn.net via RT
On Sat, 09 Sep 2017 19:53:53 -0700, tomentiru...@gmail.com wrote: > > my @h is default([]) > [] > > @h[0].push: 3 > [3] > > @h > [] > > @h[0] > [3] > > > my %h is default({}) > {} > > %h = 3 > 3 > > %h > {} > > %h > {b => 3} > > The array/hash variable's default is an empty array/hash literal. If

[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-11 Thread jn...@jnthn.net via RT
On Sat, 09 Sep 2017 19:53:53 -0700, tomentiru...@gmail.com wrote: > > my @h is default([]) > [] > > @h[0].push: 3 > [3] > > @h > [] > > @h[0] > [3] > > > my %h is default({}) > {} > > %h = 3 > 3 > > %h > {} > > %h > {b => 3} > > The array/hash variable's default is an empty array/hash literal. If

Re: [perl #132030] [REGRESSION] Broken Text::CSV tests and possibly other ecosystem fallout

2017-09-11 Thread Elizabeth Mattijsen
Fixed with 3c9cfdba88287e23e0ced8 (and further refined by later commits), tests needed. > On 6 Sep 2017, at 15:38, jn...@jnthn.net via RT > wrote: > > On Tue, 05 Sep 2017 09:11:19 -0700, allber...@gmail.com wrote: >> On Tue, Sep 5, 2017 at 5:40 AM, jn...@jnthn.net via RT < >> perl6-bugs-follo

Re: [perl #132030] [REGRESSION] Broken Text::CSV tests and possibly other ecosystem fallout

2017-09-11 Thread Elizabeth Mattijsen via RT
Fixed with 3c9cfdba88287e23e0ced8 (and further refined by later commits), tests needed. > On 6 Sep 2017, at 15:38, jn...@jnthn.net via RT > wrote: > > On Tue, 05 Sep 2017 09:11:19 -0700, allber...@gmail.com wrote: >> On Tue, Sep 5, 2017 at 5:40 AM, jn...@jnthn.net via RT < >> perl6-bugs-follo

[perl #126269] [BUG] unexpected behavior for reduced composition

2017-09-11 Thread Sam S. via RT
On Mon, 05 Oct 2015 09:10:42 -0700, grond...@yahoo.fr wrote: > The following two expressions should give the same result: > > $ perl6 -e 'say ([o] (1 + 1/*), (2 + 1/*))(Inf);' > 1.5 > > $ perl6 -e 'say ([o] (++$ + 1/*) xx 2)(Inf);' > 3 What's happening is that the `++$` operation isn't evaluated

[perl #126125] [LTA] malformed "my" spuriously claims lack of type declaration

2017-09-11 Thread Sam S. via RT
On Sun, 20 Sep 2015 14:00:53 -0700, zef...@fysh.org wrote: > Presumably the "malformed my" error is correct, but the preceding "type > 'Any' is not declared" is bogus. It now no longer prints the bogus "type 'Any' is not declared" error, only the correct "malformed my" error: ➜ my Any⏏ :D $

[perl #126117] [BUG] defined value as type constraint is accepted and doesn't work

2017-09-11 Thread Sam S. via RT
On Sun, 20 Sep 2015 09:17:21 -0700, zef...@fysh.org wrote: > Presumably using a defined value (anything other than a type object) > as a type constraint should be a semantic error. It does throw a compile-time error for the `my` declaration now, however the error message is not appropriate:

[perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread Sam S. via RT
On Mon, 11 Sep 2017 09:48:01 -0700, dzw...@gmail.com wrote: > `|` matches the longest input: > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > 「ab」 > > If the regex contains empty code blocks, backtracking fails: > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > Nil Not a bug. As the S05 design document expla

[perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread Sam S. via RT
PS: This *really* needs to be properly documented on http://docs.perl6.org though - I've submitted a ticket for that here: https://github.com/perl6/doc/issues/1550

[perl #130612] [BUG] LTM doesn't use text order for tie break as expected

2017-09-11 Thread Sam S. via RT
This bug is still present in Rakudo version 2017.08-104-g76f1d8970 built on MoarVM version 2017.08.1-148-g1059eed1 implementing Perl 6.c. --- However, there's also a design question to be answered here: On Sat, 21 Jan 2017 10:32:39 -0800, ronaldxs wrote: > https://design.perl6.org/S

[perl #129008] [TESTNEEDED] Pair.perl confused by some type objects

2017-09-11 Thread Brian S. Julin via RT
On Fri, 19 Aug 2016 19:00:53 -0700, zef...@fysh.org wrote: > Pair.perl produces incorrect output for some type objects: > > > ((Int) => 2).perl > Int => 2 > > ((Int) => 2).perl.EVAL.perl > :Int(2) > > Following the fix for [perl #126890] it's correct for most type > objects: > > > ((Pair) => 2).

lats rakudo version from rakudobrew ?

2017-09-11 Thread Marc Chantreux
hello people, since rakudo 2017.05, i ditched my own perl6 update/install script to use rakudobrew. as rakudo 2017.07 is out, i would like to update so i typed rakudo self-upgrade && rakudo build moar as written in the "Upgrading your Perl 6 implementation" section. it actually built stuff b

[perl #130657] [LTA] Error when forgetting a colon on a colonpair in extended routine names

2017-09-11 Thread Brian S. Julin via RT
On Fri, 27 Jan 2017 16:11:28 -0800, c...@zoffix.com wrote: > Another related one (the first colonpair has empty key): > > m: sub infix:bar {} > rakudo-moar cfae23: OUTPUT«===SORRY!===␤Cannot find method > 'has_compile_time_value' on object of type NQPMu␤» Current behavior: $ perl6 -e 'sub inf

[perl #131791] Custom class :D coersers don't work

2017-09-11 Thread Brian S. Julin via RT
On Sun, 10 Sep 2017 11:44:09 -0700, b...@abrij.org wrote: > On Fri, 08 Sep 2017 21:13:59 -0700, b...@abrij.org wrote: > > On Wed, 23 Aug 2017 06:20:49 -0700, b...@abrij.org wrote: > > > On Mon, 24 Jul 2017 10:04:54 -0700, c...@zoffix.com wrote: > > > > The coercion works fine here: > > > > > > > >

takeWhile ?

2017-09-11 Thread Marc Chantreux
hello, doing maths with my kid, i just translated his spreadsheet with those lines of haskell: rebonds height loss = height : rebonds (height - height * loss) loss main = print $ takeWhile (> 2) $ rebonds 116 0.6 then i wanted to make it as short as possible in perl6, i'm almost

Re: takeWhile ?

2017-09-11 Thread Timo Paulssen
If I understand your problem correctly, you can simply use ...^ to leave out the last element :) On 09/11/2017 10:01 PM, Marc Chantreux wrote: > hello, > > doing maths with my kid, i just translated his spreadsheet with those > lines of haskell: > > rebonds height loss = height : rebonds (h

Re: takeWhile ?

2017-09-11 Thread The Sidhekin
On Mon, Sep 11, 2017 at 10:01 PM, Marc Chantreux wrote: > hello, > > doing maths with my kid, i just translated his spreadsheet with those > lines of haskell: > > rebonds height loss = height : rebonds (height - height * loss) > loss > main = print $ takeWhile (> 2) $ rebonds 116

Re: takeWhile ?

2017-09-11 Thread Marc Chantreux
On Mon, Sep 11, 2017 at 10:07:32PM +0200, Timo Paulssen wrote: > If I understand your problem correctly, you can simply use ...^ to leave > out the last element :) wow ... i tried it once but failed. and now i just spotted the error: i wrote (116, * * .6 ... ^ * < 2 ).say instead of

Re: takeWhile ?

2017-09-11 Thread Timo Paulssen
the first expression uses ^ as a prefix operator on *, so it gives you "a list of numbers 0 through * - 1" instead of "the number *" to compare against *, so it's as if you had rounded the value up before comparing to 2.

Re: takeWhile ?

2017-09-11 Thread Marc Chantreux
On Mon, Sep 11, 2017 at 10:16:50PM +0200, Timo Paulssen wrote: > the first expression uses ^ as a prefix operator on *, so it gives you > "a list of numbers 0 through * - 1" instead of "the number *" to compare > against *, so it's as if you had rounded the value up before comparing to 2. and now

[perl #128927] [BUG] coercions don't ensure result type

2017-09-11 Thread Brian S. Julin via RT
On Sun, 14 Aug 2016 08:01:48 -0700, zef...@fysh.org wrote: > The description of coercion in S02 says: > > # The type outside the parens indicates the desired end result, and > # subsequent code may depend on it being that type. > > Rakudo does not actually ensure that the result of a coercion is

Re: [perl #129008] [TESTNEEDED] Pair.perl confused by some type objects

2017-09-11 Thread Zefram
Brian S. Julin via RT wrote: >Fixed in 2017.6 or thereabouts. Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated 2017-06-15. -zefram

Re: [perl #129008] [TESTNEEDED] Pair.perl confused by some type objects

2017-09-11 Thread Zefram via RT
Brian S. Julin via RT wrote: >Fixed in 2017.6 or thereabouts. Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated 2017-06-15. -zefram

[perl #130612] [BUG] LTM doesn't use text order for tie break as expected

2017-09-11 Thread Sam S. via RT
Actually... Rakudo *does* generally follow interpretation (b): ➜ 'x' ~~ / .* { say '*' } | .? { say '?' } /; # * ➜ 'x' ~~ / .? { say '?' } | .* { say '*' } /; # ? The observed bug is specifically with character classes: ➜ '1' ~~ / { say 'digit' } | <[0..9]> { say '0..9' }

Re: lats rakudo version from rakudobrew ?

2017-09-11 Thread Brandon Allbery
On Mon, Sep 11, 2017 at 3:40 PM, Marc Chantreux wrote: > it actually built stuff but at the end, perl6 -v still gives me 2017.05. > This is one of the gotchas of rakudobrew. It determines the version from the most recent release tag... but it uses git in default fetch mode, which only pulls the

Re: Thread example from evanmiller

2017-09-11 Thread Elizabeth Mattijsen
> On 8 Sep 2017, at 05:16, Norman Gaywood wrote: > > Several weeks ago there was this post: > http://www.evanmiller.org/why-im-learning-perl-6.html > > That gave this example of perl6 N:M threads in action: > > use v6.d.PREVIEW; > > my $channel = Channel.new; > > my @ten_tasks = (^10).map: {

[perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread via RT
# New Ticket Created by Dan Zwell # Please include the string: [perl #132066] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132066 > `|` matches the longest input: > 'ab' ~~ / ^:ratchet [ . | .. ] $ / 「ab」 If the regex conta

[perl #129008] [BUG] Pair.perl confused by some type objects

2017-09-11 Thread Brian S. Julin via RT
On Mon, 11 Sep 2017 13:35:54 -0700, zef...@fysh.org wrote: > Brian S. Julin via RT wrote: > >Fixed in 2017.6 or thereabouts. > > Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated > 2017-06-15. > > -zefram Tests added in roast 9a09b4ee, resolving this ticket.

[perl #129008] [BUG] Pair.perl confused by some type objects

2017-09-11 Thread Brian S. Julin via RT
On Mon, 11 Sep 2017 16:53:15 -0700, b...@abrij.org wrote: > On Mon, 11 Sep 2017 13:35:54 -0700, zef...@fysh.org wrote: > > Brian S. Julin via RT wrote: > > >Fixed in 2017.6 or thereabouts. > > > > Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated > > 2017-06-15. > > > > -zefram

Re: [perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread Patrick R. Michaud
On Mon, Sep 11, 2017 at 09:48:01AM -0700, Dan Zwell wrote: > > `|` matches the longest input: > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > 「ab」 > > If the regex contains empty code blocks, backtracking fails: > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > Nil Isn't the whole point of :ratchet to turn

Re: [perl #132066] [BUG] Code blocks cause backtracking fail in `|` alternation with ratcheting

2017-09-11 Thread Patrick R. Michaud via RT
On Mon, Sep 11, 2017 at 09:48:01AM -0700, Dan Zwell wrote: > > `|` matches the longest input: > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > 「ab」 > > If the regex contains empty code blocks, backtracking fails: > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > Nil Isn't the whole point of :ratchet to turn