Re: Default args in custom constructor

2015-09-04 Thread Timo Paulssen
Have you considered hash flattening into argument lists yet? method new(Int $a) { my %args; with $a { %args<$a> = $a } self.bless(|%args); } Does that help you forward at all? - Timo

Default args in custom constructor

2015-09-04 Thread Philip Hazelden
Suppose I have a class with a default attribute class Foo { has Int $.a = 1; } Now I want to write a custom constructor for it, with either `Foo.new()` or `Foo.new(3)` doing the obvious thing. Here's one way to do it: multi method new(Int $a = 1) { self.new(:$a); } but this duplicates t

Re: [perl #125978] [BUG] Segfault (and other crashes) when using .hyper

2015-09-04 Thread perl6
Another way to produce such this issue: perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).all.so" Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-

[perl #125978] [BUG] Segfault (and other crashes) when using .hyper

2015-09-04 Thread cdc
Another way to produce such this issue: perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).all.so" Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-

[perl #125973] [BUG][GLR] 't' ~~ /<{'a'...'z'}>/ This Seq has already been iterated

2015-09-04 Thread via RT
# New Ticket Created by # Please include the string: [perl #125973] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125973 > How to reproduce: perl6 -e "'t' ~~ /<{'a'...'z'}>/" Current result: This Seq has already b

[perl #125987] [BUG] Unexpected "Useless use of emit in react"

2015-09-04 Thread via RT
# New Ticket Created by # Please include the string: [perl #125987] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125987 > 13:46 cdc m: react { whenever supply { for "/etc/os-release".IO.lines { emit $_ }; done } { .s

[perl #125975] [BUG] INIT-time constants are awkward

2015-09-04 Thread via RT
# New Ticket Created by dakkar # Please include the string: [perl #125975] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125975 > Consider this snippet: constant NOW = DateTime.now; That is a BEGIN-time declaration + init

[perl6/specs] a71e37: Add "list to remember" to glossary

2015-09-04 Thread GitHub
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: a71e3792116c9705b94c5a0879fa01e54e9b4f1d https://github.com/perl6/specs/commit/a71e3792116c9705b94c5a0879fa01e54e9b4f1d Author: skids Date: 2015-09-04 (Fri, 04 Sep 2015) Changed paths: M S99-glossary

[perl #125978] [BUG] Segfault (and other crashes) when using .hyper

2015-09-04 Thread via RT
# New Ticket Created by # Please include the string: [perl #125978] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125978 > * How to reproduce (where ip is the attached file): perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /

[perl #125974] [Perf] Closures in regex cost a lot of CPU cycles.

2015-09-04 Thread via RT
# New Ticket Created by # Please include the string: [perl #125974] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125974 > How to reproduce: time perl6 -e "say 'abcdef' ~~ /<{('a' ... 'z').list}>+/" 「abcdef」 Curren

[perl #125988] [BUG] Redeclaration of return type in nested signature insufficiently forbidden in Rakudo

2015-09-04 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #125988] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125988 > m: sub foo( Str &b:(Bool --> Int) ) { say "alive" }; foo( sub (Bool) { 42 } ) rakudo-mo

[perl #125985] [BUG] Internal error when a constant, unspace, and a map are involved in Rakudo

2015-09-04 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #125985] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125985 > hey, #perl6, I wrote this: https://gist.github.com/masak/b84a87a694217c9508d6 constant