YAPC::EU and Perl 6 Roles

2009-07-07 Thread Ovid
Giving a talk about roles at YAPC::EU in Lisbon and I'm a bit stuck on how to translate a Perl 5 example into Perl 6. Basically, Imagine a "PracticalJoke" class which has fuse() and explode methods(). It needs the timed fuse() from a Bomb role and a non-lethal explode() from a Spouse role, th

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jon Lang
On Tue, Jul 7, 2009 at 2:48 AM, Ovid wrote: > > Giving a talk about roles at YAPC::EU in Lisbon and I'm a bit stuck on how to > translate a Perl 5 example into Perl 6.  Basically, Imagine a "PracticalJoke" > class which has fuse() and explode methods().  It needs the timed fuse() from > a Bomb r

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Ovid wrote: Giving a talk about roles at YAPC::EU in Lisbon Hey, me too! :-) and I'm a bit stuck on how to translate a Perl 5 example into Perl 6. Basically, Imagine a "PracticalJoke" class which has fuse() and explode methods(). It needs the timed fuse() from a Bomb role and a non-lethal

[perl #67278] non-awesome error message on 'class NewClass does OldClass'

2009-07-07 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #67278] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67278 > 08:53 <@moritz_> rakudo: class A { }; class B does A { }; say "alive" 08:53 < p6eval> rak

[perl #67268] [PATCH]

2009-07-07 Thread via RT
# New Ticket Created by Kevan Benson # Please include the string: [perl #67268] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67268 > -- -Kevan Benson -A-1 Networks >From e74a445184e0d503e80a59e2d99732596a0a284e Mon S

[perl #67272] [PATCH] change to behavior of push and unshift so they return array not .elems.

2009-07-07 Thread via RT
# New Ticket Created by Kevan Benson # Please include the string: [perl #67272] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67272 > Sorry to be spammy, forgot to add useful subject to previous two patch emails. As suc

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, because: * It's doing a sub call to something that's a method * The lookup won't wor

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Brandon S. Allbery KF8NH
On Jul 7, 2009, at 07:34 , Jonathan Worthington wrote: Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, because: * It's doing a sub call t

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Brandon S. Allbery KF8NH wrote: On Jul 7, 2009, at 07:34 , Jonathan Worthington wrote: Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, be

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Brandon S. Allbery KF8NH
On Jul 7, 2009, at 08:13 , Jonathan Worthington wrote: Brandon S. Allbery KF8NH wrote: I was trying to figure out how to do it with nextsame, but that's not looking very simple. On the other hand, if they were multis then they get added to the multi candidate list and therefore you can next

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Brandon S. Allbery KF8NH wrote: On Jul 7, 2009, at 08:13 , Jonathan Worthington wrote: Brandon S. Allbery KF8NH wrote: I was trying to figure out how to do it with nextsame, but that's not looking very simple. On the other hand, if they were multis then they get added to the multi candidate

[perl #67270] [PATCH]

2009-07-07 Thread via RT
# New Ticket Created by Kevan Benson # Please include the string: [perl #67270] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67270 > Forgot to also fix .unshift in previous patch... -- -Kevan Benson -A-1 Networks >Fro

r27468 - docs/Perl6/Spec/S32-setting-library

2009-07-07 Thread pugs-commits
Author: skids Date: 2009-07-07 15:51:58 +0200 (Tue, 07 Jul 2009) New Revision: 27468 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32/Numeric] correct parameter name in atan2 method form Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod

Re: [perl #67278] non-awesome error message on 'class NewClass does OldClass'

2009-07-07 Thread chromatic
On Monday 06 July 2009 23:55:28 Moritz Lenz wrote: > I think abusing a class as a role is forbidden I hope it's not! -- c

Re: [perl #67278] non-awesome error message on 'class NewClass does OldClass'

2009-07-07 Thread Moritz Lenz
chromatic wrote: > On Monday 06 July 2009 23:55:28 Moritz Lenz wrote: > >> I think abusing a class as a role is forbidden > > I hope it's not! Well, it surely depends on context. You can "pun" a role into a class by instantiating it, but the correct way to apply it to another class seems to be w

Re: [perl #67278] non-awesome error message on 'class NewClass does OldClass'

2009-07-07 Thread Jonathan Worthington
Moritz Lenz wrote: chromatic wrote: On Monday 06 July 2009 23:55:28 Moritz Lenz wrote: I think abusing a class as a role is forbidden I hope it's not! Well, it surely depends on context. You can "pun" a role into a class by instantiating it, but the correct way to apply

[perl #66978] [BUG] nextsame in method dispatch doesn't pass on self

2009-07-07 Thread jn...@jnthn.net via RT
On Thu Jun 25 15:43:59 2009, viklund wrote: > -- code -- > class A { > method a(*...@a) { > say "A self={self.perl} ar...@a.perl}" > } > } > > class B is A { > method a(*...@a) { > nextwith("FIRST ARG", "SECOND ARG")} > } > > B.new.a() > > -- output -- > > A self="FI

Testing Perl 6 analog to Perl 5's tie.

2009-07-07 Thread Kyle Hasselbacher
My patchwork readings lead me to believe I could test Perl 6's tie-like feature with something like the below code, which I don't expect to even compile, what with '???' in places. My question is: am I on the right track? Obviously there are details I haven't nailed down, and any guidance would b

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Timothy S. Nelson
On Tue, 7 Jul 2009, Ovid wrote: role Bomb { method fuse (){ say '3 .. 2 .. 1 ..' } method explode () { say 'Rock falls. Everybody dies!' } } role Spouse { method fuse (){ sleep rand(20); say "Now!" } method explode () { say 'You worthless piece of junk! Why I should ...'

Re: [perl #66978] [BUG] nextsame in method dispatch doesn't pass on self

2009-07-07 Thread Moritz Lenz
jn...@jnthn.net via RT wrote: > On Thu Jun 25 15:43:59 2009, viklund wrote: >> -- code -- >> class A { >> method a(*...@a) { >> say "A self={self.perl} ar...@a.perl}" >> } >> } >> >> class B is A { >> method a(*...@a) { >> nextwith("FIRST ARG", "SECOND ARG")} >> } >> >