Re: How to call a super class method?

2015-10-27 Thread Lloyd Fournier
Hi Emiliano, You could do this: class Person { has $.name; method new($name) { # do some things self.bless(:$name); } } class Employee is Person { my $counter = 1; method new () { # Employees don't have individual identities so we give them a name :(

[perl6/specs] a99182: More formal conjectural mention of typed slurpies.

2015-10-27 Thread GitHub
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: a99182a649ca8eae8bc89dacdeeba9349d2bcead https://github.com/perl6/specs/commit/a99182a649ca8eae8bc89dacdeeba9349d2bcead Author: jnthn Date: 2015-10-27 (Tue, 27 Oct 2015) Changed paths: M S06-routines

Re: How to call a super class method?

2015-10-27 Thread Lloyd Fournier
I just re-read your question and saw your emphasis on "non-static" context. I'm not 100% sure what you are looking for, but take a look at *BUILD:* http://docs.perl6.org/language/objects#Submethods LL On Wed, Oct 28, 2015 at 2:31 PM, TS xx wrote: > Hello fellow perl users, > > I have been tryi

How to call a super class method?

2015-10-27 Thread TS xx
Hello fellow perl users, I have been trying to understand perl 6 oop implementation, and one thing I still can't figure out is how to call super class methods from lower classes. Let's say we have two classes, Person and Employee, and the method I am trying to access is the object constructor:

[perl #120874] Configure.pl: undescriptive/misleading message if wrong nqp is found.

2015-10-27 Thread Will Coleda via RT
On Thu Dec 26 05:27:54 2013, rotw...@crux.org.pl wrote: > Hi, > > perl5: v5.16.3 > parrot: 5.9.0 > nqp: 2013.12 > > today I've tried to build rakudo star 2013.12 with nqp 2013.12 (not > realizing that it is wrong version for this rakudo release), and got this > error message: > > $ perl ./Config

[perl #115326] [BUG] [WEIRD] Internal error when parsing 'say (:::[])' in Rakudo

2015-10-27 Thread Will Coleda via RT
On Wed Oct 17 12:40:44 2012, masak wrote: > r: say (:::[]) > rakudo 2fca74: OUTPUT«===SORRY!===␤ResizablePMCArray: index > out of bounds!␤» > diakopter: It's an internal error of some kind > My motivation to fix these things, or have them clutter RT, is > relatively low, fwiw. > * masak submits

[perl #125573] [BUG] [Test] A failing exit phaser after passing all tests appears OK to prove

2015-10-27 Thread Tobias Leich via RT
Patch: https://github.com/rakudo/rakudo/commit/6063886343 Test: https://github.com/perl6/roast/commit/2dfcd85181 Closing ticket.

[perl #120480] recursion_limit bad assumption

2015-10-27 Thread Will Coleda via RT
On Sun Dec 08 17:40:36 2013, zef...@fysh.org wrote: > Will Coleda via RT wrote: > >It's dealing with a specific behavior needed of the VM by rakudo which > >isn't appropriate to push into nqp > ... > >At which point the limit on each backend will no doubt need to be > >different, > > Interesting:

[perl #119999] [BUG] LTA internal Parrot error when doing '&::{}' in Rakudo

2015-10-27 Thread Will Coleda via RT
On Mon Feb 16 22:09:55 2015, coke wrote: > On Wed Sep 25 00:52:40 2013, masak wrote: > > current instr.: 'variable_components' pc 26971 > > (src/gen/perl6- > > symboltable.pir:10438) (src/Perl6/World.nqp:1858) > > if you run it with --ll-exception > > * masak adds that to the ticket > > moritz++

[perl #120831] [BUG] LTA error message when declaring 'my Int a' in Rakudo

2015-10-27 Thread Tobias Leich via RT
Patch by bartolin++: https://github.com/rakudo/rakudo/commit/4bdc88046ad0289f2708e3195e59df9edc83c258 Another test: https://github.com/perl6/roast/commit/1145029340 Closing ticket.

[perl #116613] Parent types augmented at run time no longer make augmented methods available to sub types

2015-10-27 Thread Will Coleda via RT
On Thu Jun 27 00:36:55 2013, FROGGS.de wrote: > Here is a workaround that might imply a fix: > > r: use MONKEY_TYPING; augment class Cool { method foo (*@) { "foo" } }; > say Int.foo; > rakudo 5c0dae: OUTPUT«No such method 'foo' for invocant of type 'Int'␤ > in block at /tmp/hBLEJlttbt:1␤␤» > >

[perl #117683] Several unicode char (nick)names unrecognized

2015-10-27 Thread Will Coleda via RT
On Mon Mar 02 21:56:43 2015, coke wrote: > On Sun Jul 20 10:16:40 2014, coke wrote: > > On Sat Apr 20 19:12:48 2013, pmichaud wrote: > > > On Sat, Apr 20, 2013 at 07:05:25PM -0700, Will Coleda wrote: > > > > This seems to be an OS X only error: > > > > > > > > ./perl6 -e 'say "\c[LINE FEED (LF)]"'

[perl #124120] Fwd: [libdigest-perl6] Issue with σ in expressions (#7)

2015-10-27 Thread Will Coleda via RT
On Sat Jul 11 00:17:28 2015, coke wrote: > On Thu Mar 19 16:25:39 2015, noel.sharr...@gmail.com wrote: > > Hi, > > I have a compile error using panda to install Digest module on a > > windows 8 > > with latest (rakudo-star-2015.02.msi > > )

[perl #124043] Debugging dies for certain script

2015-10-27 Thread Will Coleda via RT
On Wed Mar 11 02:25:22 2015, wbi...@gmx.at wrote: > Hi, > > I always get an unhandled exception stacktrace if I try to debug a > perl6 > script. With Hello World scripts it works but with my certain one it > dies > every time with: > > C:\scripts>perl6-debug-m conf_test.p6 > >>> LOADING conf_test

[perl #124148] random hash order in .perl method on Moar and JVM

2015-10-27 Thread Will Coleda via RT
On Sun May 10 13:20:24 2015, david.warring wrote: > The .perl method on Hashes has been reworked in the latest rakudo. > Looks good! (Looks Good!!). > > % perl6-m --version > This is perl6 version 2015.04-204-ga040b1a built on MoarVM version > 2015.04-62-g052aca0 > % perl6-m -e'say { :a(10), :b(20

[perl #123741] Rat.perl does not round-trip

2015-10-27 Thread Will Coleda via RT
On Mon Sep 14 12:42:34 2015, barto...@gmx.de wrote: > I don't grasp everything of the quoted discussion, but the original > evaluation works now as expected: > > $ perl6 -e 'say (2/6).WHAT; say (2/6).perl.EVAL.WHAT' > (Rat) > (Rat) > > A test was added to S32-scalar/perl.t with commit df84392d05.

[perl #126461] [JVM] build broken

2015-10-27 Thread Will Coleda via RT
On Mon Oct 26 10:50:52 2015, coke wrote: > Attempting to compile the core now dies with: > > Stage classfile : java.lang.RuntimeException: > java.lang.RuntimeException: Class file too large! > in classfile (gen/jvm/stage2/NQPHLL.nqp:93) > in compile (gen/jvm/stage2/NQPHLL.nqp:1423) > in eva

[perl #77334] [BUG] For loops fail to decontainerize in Rakudo

2015-10-27 Thread jn...@jnthn.net via RT
On Fri Aug 22 13:46:45 2014, coke wrote: > On Fri Aug 22 09:52:24 2014, coke wrote: > > On Fri Aug 20 04:39:00 2010, masak wrote: > > > perl6: sub foo { my $s; for 1..3 { $s += $_ } } ; say > > > foo() > > > rakudo e45bf6: OUTPUT«666␤» > > > what is the rationale for this returning '666' > > >

[perl #115384] [BUG] 'when' and 'default' clauses decontainerize stuff in Rakudo

2015-10-27 Thread jn...@jnthn.net via RT
On Sat Oct 20 13:23:21 2012, masak wrote: > r: .say for { a => 1, b => 2 } > rakudo b86628: OUTPUT«("a" => 1, "b" => 2).hash␤» > shouldn't flatten, right? > r: .say for gather take do given 1 { default { { a => 1, b => > 2 } } } > rakudo b86628: OUTPUT«"a" => 1␤"b" => 2␤» > also shouldn't fla

[perl #120994] Typed slurpy hashes aren't supported either

2015-10-27 Thread jn...@jnthn.net via RT
On Mon Jan 13 18:00:36 2014, m...@kli.org wrote: > Rakudo explicitly fails with a message when someone tries to use a > typed > slurpy positional argument, e.g. Int *@_, but not for a typed slurpy > named > argument, like Int *%_. But those aren't supported either: the > argument creates > a parame

[perl #113964] [BUG] LTA error message when passing to a typed slurpy array parameter in Rakudo

2015-10-27 Thread jn...@jnthn.net via RT
On Wed Oct 08 12:36:34 2014, barto...@gmx.de wrote: > The error message looks adequate now: > > $ perl6 -e 'sub foo(Int *@ints) {}' > ===SORRY!=== Error while compiling -e > Slurpy positionals with type constraints are not supported. > at -e:1 > --> sub foo(Int *@ints⏏) {} > expecting any

[perl #126462] Bug returning objects directly from called methods using some form of named arguments

2015-10-27 Thread via RT
# New Ticket Created by mt1957 # Please include the string: [perl #126462] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126462 > Two samples of code for which the problem is closely related The first problem; return

Re: [perl #126417] [BUG] proto signature default values don't work (NYI?)

2015-10-27 Thread Lloyd Fournier
Welcome back jnthn :) That makes sense. I thought that proto was a magic way to set defaults for all parameters for all the sigs in a multi dispatch ie don't repeat yourself. Mostly because: perl6 -e 'proto sub test(Str $x){*}; multi sub test($x) { $x.say }; test(Int);' fails. But it looks like

[perl #118031] Cannot .new / .clone TypedHash without losing typing

2015-10-27 Thread jn...@jnthn.net via RT
On Wed Mar 11 20:54:04 2015, Mouq wrote: > Not sure if this worked before, but these examples work fine if one > uses binding instead of assignment. > > On Fri May 17 03:45:49 2013, elizabeth wrote: > > [12:36:12] r: my %h{Any}; my %i=%h.new; say %h.WHAT; > > say > > %i.WHAT # did we agree

[perl #123581] Infinite lists match [] signature

2015-10-27 Thread jn...@jnthn.net via RT
On Mon Jan 12 05:49:02 2015, masak wrote: > m: (1..*).Capture.perl.say > rakudo-moar 6a3fc3: OUTPUT«Capture.new(hash => {"excludes- > max" => Bool::False, "excludes-min" => Bool::False, "min" => 1, "max" > => Inf})␤» > ah > m: (my @a = 1..*).Capture.perl.say > rakudo-moar 6a3fc3: OUTPUT«Captur

[perl #125210] [BUG] Preincrement prefix:<++> and postincrement postfix:<++> should be non-associative in Rakudo

2015-10-27 Thread jn...@jnthn.net via RT
On Sun May 17 12:11:16 2015, masak wrote: > lizmat++ > lizmat++ > ++lizmat++ > m: my $lizmat = 42; ++$lizmat++ > rakudo-moar 550b8c: OUTPUT«Cannot assign to an immutable > value [...] > I *think* that should actually be a parse error. > std: my $lizmat = 42; ++$lizmat++ > 19:08 <+camelia> st

[perl #126438] [BUG] regex match hang up

2015-10-27 Thread jn...@jnthn.net via RT
On Fri Oct 23 10:26:30 2015, blackcatoverw...@gmail.com wrote: > The below code will hang up. > > > > source: > > say '+0877' ~~ /^+/; > > > > I think it should be /^\+/ Yes, you need to quote of backslash the +. The hang is because ^ never matches any chars, so doesn't make progress, so q

[perl #126417] [BUG] proto signature default values don't work (NYI?)

2015-10-27 Thread jn...@jnthn.net via RT
On Wed Oct 21 06:34:47 2015, lloyd.fo...@gmail.com wrote: > lizmat++ > Fail is a good word. I didn't want to have to write throws an > exception :o| > > I don't totally get the concept of { * } so I won't comment whether > defaults working makes sense or not but it's interesting to note that > coe

[perl #116699] [BUG] qx[tput] gives surprising results in Rakudo

2015-10-27 Thread Christian Bartolomaeus via RT
This gives the expected result now -- both on Moar and JVM, both for REPL and command line execution via '-e': $ perl6-m -e 'my $lines = +qx[tput lines]; my $cols = +qx[tput cols]; say "$lines $cols";' 65 199 $ perl6-j -e 'my $lines = +qx[tput lines]; my $cols = +qx[tput cols]; say "$lines $co