[perl #132128] [LTA] .new of subclasses of Int returns an Int

2017-09-19 Thread Brian S. Julin via RT
On Tue, 19 Sep 2017 11:12:23 -0700, c...@zoffix.com wrote: > On Tue, 19 Sep 2017 08:23:07 -0700, c...@zoffix.com wrote: > > m: class Foo is Int {}; my Foo $x .= new: 42; say $x; say $x.WHAT; > > rakudo-moar bb4579: OUTPUT: «Type check failed in assignment to $x; > > expected Foo but got Int (42)␤

[perl #132133] [LTA] Nameless @/% sigils with `is rw` don't get complained about

2017-09-19 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132133] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132133 > IRC finding: https://irclog.perlgeek.de/perl6/2017-09-19#i_15189180 If you use `is rw`

can't adverb and infix

2017-09-19 Thread Luca Ferrari
Hi all, this will sound trivial, but the following piece of code that in my mind should work does not: $mode = 'csv' if ( ! $mode.defined || %available_modes{ $mode }:!exists ); and the compiler says: You can't adverb :<||> at /home/luca/tmp/am/folken.p6:16 --> ined || %available_modes{

[perl #132114] [ANNOYING] t\04-nativecall\21-callback-other-thread.t is flapping on appveyor and travis

2017-09-19 Thread jn...@jnthn.net via RT
On Sun, 17 Sep 2017 14:04:02 -0700, alex.jakime...@gmail.com wrote: > It happens often and that's why we sometimes get false-red CI status. > See > https://ci.appveyor.com/project/rakudo/rakudo/build/1.0.130/job/yqmgs4uo0yim1bxx Fixed the MoarVM bug that caused this, and the revision bump took

[perl #132114] [ANNOYING] t\04-nativecall\21-callback-other-thread.t is flapping on appveyor and travis

2017-09-19 Thread jn...@jnthn.net via RT
On Sun, 17 Sep 2017 14:04:02 -0700, alex.jakime...@gmail.com wrote: > It happens often and that's why we sometimes get false-red CI status. > See > https://ci.appveyor.com/project/rakudo/rakudo/build/1.0.130/job/yqmgs4uo0yim1bxx Fixed the MoarVM bug that caused this, and the revision bump took

help with map and regexp

2017-09-19 Thread Luca Ferrari
Hi all, I'm trying to understand how to use map correctly to apply several regexps at once, something like: my @fields = $line.split( ',' ).map: { s:g/\'//; s:g/^\"|\"$//; $_ }; while the first regexp works, the second fails with "Cannot modify an immutable Str", but the topic variable should

Re: can't adverb and infix

2017-09-19 Thread Brandon Allbery
On Tue, Sep 19, 2017 at 3:44 AM, Luca Ferrari wrote: > this will sound trivial, but the following piece of code that in my > mind should work does not: > > $mode = 'csv' if ( ! $mode.defined || %available_modes{ $mode }:!exists ); > > and the compiler says: > > You can't

[perl #132117] [LTA] Error on `eqv` with lazy Lists

2017-09-19 Thread Zoffix Znet via RT
On Mon, 18 Sep 2017 09:22:44 -0700, c...@zoffix.com wrote: > Another commit shipped out for this ticket: > https://github.com/rakudo/rakudo/commit/48a84d6aff Made it throw typed exceptions in https://github.com/rakudo/rakudo/commit/bb45791c5d Tests for the whole thing in

[perl #132117] [LTA] Error on `eqv` with lazy Lists

2017-09-19 Thread Zoffix Znet via RT
On Mon, 18 Sep 2017 09:22:44 -0700, c...@zoffix.com wrote: > Another commit shipped out for this ticket: > https://github.com/rakudo/rakudo/commit/48a84d6aff Made it throw typed exceptions in https://github.com/rakudo/rakudo/commit/bb45791c5d Tests for the whole thing in

Re: help with map and regexp

2017-09-19 Thread Timo Paulssen
You'll have to type the $_ of the block as "is copy" if you want to do this. Another way would be to have "is rw" but that can of course only work if a container is present in what you map over; there isn't in this case.     perl6 -e '.perl.say for "hello, how, are, you".split(",").map: -> $_ is

[perl #127772] [IO] mkdir($file) succeeds if $file exists and is a regular file

2017-09-19 Thread Norman Gaywood via RT
I'd like to see the same behavior that occurs in perl5. That is: DB<3> mkdir "existingfile" or warn "$!\n" File exists DB<4> mkdir "/" or warn "$!\n" File exists DB<5> mkdir "/root/noway" or warn "$!\n" Permission denied DB<6> mkdir "newdir" or warn "$!\n" DB<7> mkdir "newdir" or warn

DateTime.Str default formatter with sprintf is pretty slow

2017-09-19 Thread Thor Michael Støre
Hey, When I profiled my "read CSV, munge, write CSV" script to see why it is a bit on the slow side DateTime.Str stood out. I saw the default formatter eventually reached sprintf, which consumed a lot of time. Each output line from my script has one date and time in ISO 8601 format, and when I

[perl #132126] [SEGV] When raking through Int guts

2017-09-19 Thread Zoffix Znet via RT
On Tue, 19 Sep 2017 08:15:15 -0700, c...@zoffix.com wrote: > m: use nqp; class Foo is Int { method new ($v) { > nqp::p6bindattrinvres(self.bless, Int, q|$!value|, > nqp::getattr(nqp::decont($v), Int, q|$!value|)) } }; my Foo $x .= > new: 42; say $x; say $x.WHAT; > rakudo-moar bb4579: OUTPUT:

[perl #132126] [SEGV] When raking through Int guts

2017-09-19 Thread Zoffix Znet via RT
On Tue, 19 Sep 2017 08:15:15 -0700, c...@zoffix.com wrote: > m: use nqp; class Foo is Int { method new ($v) { > nqp::p6bindattrinvres(self.bless, Int, q|$!value|, > nqp::getattr(nqp::decont($v), Int, q|$!value|)) } }; my Foo $x .= > new: 42; say $x; say $x.WHAT; > rakudo-moar bb4579: OUTPUT:

[perl #132128] [LTA] .new of subclasses of Int returns an Int

2017-09-19 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132128] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132128 > m: class Foo is Int {}; my Foo $x .= new: 42; say $x; say $x.WHAT; rakudo-moar

[perl #127019] [LTA] inconsistent coercions for Bool

2017-09-19 Thread Brian S. Julin via RT
On Wed, 17 Aug 2016 09:03:15 -0700, c...@zoffix.com wrote: > Tests added in > https://github.com/perl6/roast/commit/d0f819872953d08cd9732fef50f2567264fcf41b There is still the matter of Numeric() in a signature. However since: $ perl6 -e 'my Numeric() $a;' ===SORRY!=== Error while compiling -e

[perl #130969] [LTA] more inconsistent coercions for Bool

2017-09-19 Thread Brian S. Julin via RT
On Fri, 10 Mar 2017 00:31:58 -0800, sidhe...@gmail.com wrote: > On Thu, Mar 9, 2017 at 9:17 PM, Brandon Allbery > wrote: > > > On Thu, Mar 9, 2017 at 2:55 PM, Zefram > > wrote: > > > >> The same goes for coercions from other enum types. > > > >

[perl #132126] [SEGV] When raking through Int guts

2017-09-19 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132126] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132126 > m: use nqp; class Foo is Int { method new ($v) { nqp::p6bindattrinvres(self.bless, Int,

[perl #132128] [LTA] .new of subclasses of Int returns an Int

2017-09-19 Thread Zoffix Znet via RT
On Tue, 19 Sep 2017 08:23:07 -0700, c...@zoffix.com wrote: > m: class Foo is Int {}; my Foo $x .= new: 42; say $x; say $x.WHAT; > rakudo-moar bb4579: OUTPUT: «Type check failed in assignment to $x; > expected Foo but got Int (42)␤ in block at line 1␤␤» > > This was broken by the fix to make

[perl #132128] [LTA] .new of subclasses of Int returns an Int

2017-09-19 Thread Zoffix Znet via RT
On Tue, 19 Sep 2017 08:23:07 -0700, c...@zoffix.com wrote: > m: class Foo is Int {}; my Foo $x .= new: 42; say $x; say $x.WHAT; > rakudo-moar bb4579: OUTPUT: «Type check failed in assignment to $x; > expected Foo but got Int (42)␤ in block at line 1␤␤» > > This was broken by the fix to make