r27487 - docs/Perl6/Spec

2009-07-08 Thread pugs-commits
Author: lwall Date: 2009-07-09 02:36:00 +0200 (Thu, 09 Jul 2009) New Revision: 27487 Modified: docs/Perl6/Spec/S14-roles-and-parametric-types.pod Log: [S14] a slightly closer approximation to eventual reality Modified: docs/Perl6/Spec/S14-roles-and-parametric-types.pod ===

Re: [perl #67358] [BUG] less than awesome error message for 1 param expected in Rakudo

2009-07-08 Thread yary
On Wed, Jul 8, 2009 at 3:28 PM, Carl Mäsak wrote: >> It's Parrot behavior.  It's trivial to change to "Too many params passed" or >> "Too many results passed".  Would that be clearer? > > Maybe, but the problem as described in the original ticket was the > inconsistency of '1' and 'params' with an

Re: [perl #67358] [BUG] less than awesome error message for 1 param expected in Rakudo

2009-07-08 Thread Carl Mäsak
chromatic (>), Kyle (>>): >> In this case, it might be easiest to leave the word out: >> >> Too many arguments passed (2) - 1 expected. >> >> Even this looks not too bad to me: >> >> Too many arguments passed (1) - 0 expected. > > It's Parrot behavior.  It's trivial to change to "Too many params pa

Roles discussion

2009-07-08 Thread Jonathan Worthington
Hi all, It's been interesting to participate in the roles discussion so far, and I'm happy to see there's a lot of interest in getting the right options and the right defaults. I'm leaving tomorrow morning on vacation, and will be mostly offline for a week or so (the alps are quite a distract

Re: [perl #67356] [TODO] implement two-arg &log in Rakudo

2009-07-08 Thread Moritz Lenz
Patrick R. Michaud wrote: > On Wed, Jul 08, 2009 at 02:44:24PM -0700, Carl Mäsak wrote: >> rakudo 70bfd5: OUTPUT«1.48547529722733␤» >> our Num multi method log ( Num $x: Num :$base = Num::e ) is export >> it *should* work. > > Please please please don't constrain the arguments to Num when > you

Re: [perl #67358] [BUG] less than awesome error message for 1 param expected in Rakudo

2009-07-08 Thread chromatic
On Wednesday 08 July 2009 14:56:11 Kyle Hasselbacher wrote: > In this case, it might be easiest to leave the word out: > > Too many arguments passed (2) - 1 expected. > > Even this looks not too bad to me: > > Too many arguments passed (1) - 0 expected. It's Parrot behavior. It's trivial to chan

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Larry Wall
On Wed, Jul 08, 2009 at 01:59:53PM -0700, Dave Whipp wrote: > Ovid wrote: > >> I'd like to see something like this (or whatever the equivalent Perl 6 >> syntax would be): >> >> class PracticalJoke does Bomb does SomeThingElse { >> method fuse() but overrides { ... } >> } >> >> The "overrid

Re: [perl #67356] [TODO] implement two-arg &log in Rakudo

2009-07-08 Thread Patrick R. Michaud
On Wed, Jul 08, 2009 at 02:44:24PM -0700, Carl Mäsak wrote: > rakudo 70bfd5: OUTPUT«1.48547529722733␤» > our Num multi method log ( Num $x: Num :$base = Num::e ) is export > it *should* work. Please please please don't constrain the arguments to Num when you actually write this. Pm

Re: [perl #67358] [BUG] less than awesome error message for 1 param expected in Rakudo

2009-07-08 Thread Kyle Hasselbacher
On Wed, Jul 8, 2009 at 4:50 PM, Carl Mäsak wrote: > rakudo 70bfd5: OUTPUT«too many arguments passed (2) - 1 > params expected [...] In this case, it might be easiest to leave the word out: Too many arguments passed (2) - 1 expected. Even this looks not too bad to me: Too many arguments passed

[perl #67358] [BUG] less than awesome error message for 1 param expected in Rakudo

2009-07-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #67358] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67358 > actually, I see another bug there... :) rakudo: say log(1, 10) rakudo 70bfd5: OUTPUT«

[perl #67356] [TODO] implement two-arg &log in Rakudo

2009-07-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #67356] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67356 > rakudo: my @P = 0.2, 0.5, 0.3; say -[+] @P.map: { $^p * log($^p, 2) } rakudo 70bfd5: O

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

2009-07-08 Thread pugs-commits
Author: moritz Date: 2009-07-08 23:41:43 +0200 (Wed, 08 Jul 2009) New Revision: 27485 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32/Num] log's base is positional Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Dave Whipp
Ovid wrote: I'd like to see something like this (or whatever the equivalent Perl 6 syntax would be): class PracticalJoke does Bomb does SomeThingElse { method fuse() but overrides { ... } } The "overrides" tells Perl 6 that we're overriding the fuse() method > from either Bomb or Som

Private methods in Roles (Was: Re: YAPC::EU and Perl 6 Roles)

2009-07-08 Thread Daniel Ruoso
Em Qua, 2009-07-08 às 12:49 -0700, Ovid escreveu: > Behavioral: if you are primarily relying on roles to provide behavior > (as we do at the BBC), then silently discarding the role's behavior by > providing a method of the same name in your class can lead to very > confusing bugs. I've lost a lot

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Ovid
- Original Message > From: Jonathan Worthington > Ovid wrote: > > It needs the timed fuse() from a Bomb role and a non-lethal explode() from > > a > Spouse role, though each role provides both methods. > I'm curious... > > 1) How often do you in real life find yourself needing to do

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Kyle Hasselbacher
On Tue, Jul 7, 2009 at 7:13 AM, Jonathan Worthington wrote: > (Note to the bored: feel free to beat me to adding something like these last > two to the spectests...I'm away for the afternoon/evening.) In r27483, I added these tests to S12-methods/multi.t: http://dev.pugscode.org/changeset/27483

Reusing code: "Everything but the kitchen sink"

2009-07-08 Thread Jon Lang
Jonathan Worthington wrote in "YAPC::EU and Perl 6 Roles": > More fitting to me would be an adverb to the does trait modifier... > > class C does R1 :without does R2 :without { ... } > > The thing is that in this case, does the class actually do R1 and R2? If you > are going to derive an anonymous

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jonathan Worthington
Hi, Going back to the original question... Ovid wrote: It needs the timed fuse() from a Bomb role and a non-lethal explode() from a Spouse role, though each role provides both methods. I'm curious... 1) How often do you in real life find yourself needing to do things like this in real life?

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jonathan Worthington
Jon Lang wrote: Jonathan Worthington wrote: Ovid wrote: Though I have issues with Jonathan's approach (I don't like classes silently discarding role methods as this has caused us many bugs at the BBC), it's much cleaner that what I see here. s/Jonathan's approach/Perl 6's approa

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jon Lang
Jonathan Worthington wrote: > Ovid wrote: >> Though I have issues with Jonathan's approach (I don't like classes >> silently discarding role methods as this has caused us many bugs at the >> BBC), it's much cleaner that what I see here. > > s/Jonathan's approach/Perl 6's approach/ # at least, so fa

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jonathan Worthington
Ovid wrote: - Original Message From: Timothy S. Nelson class PracticalJoke { has Bomb $bomb handles ; has Spouse $spouse handles ; } Note that I have no idea where (if anywhere) the type goes in this. Hopefully someone will correct me here. Note that this does not us

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Timothy S. Nelson
On Wed, 8 Jul 2009, Ovid wrote: Note that I have no idea where (if anywhere) the type goes in this. Hopefully someone will correct me here. Note that this does not use the roles as roles; it uses them punned as classes. But it does what you asked :). Though I have issues with Jonathan'

[perl #67324] [BUG] 'handles' delegation doesn't quite work when calling type objects in Rakudo

2009-07-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #67324] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=67324 > rakudo: class A { method foo {"A.foo"} }; class C { has A $.a handles *; }; my C $c .=

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Ovid
- Original Message > From: Timothy S. Nelson > > class PracticalJoke { > has Bomb $bomb handles ; > has Spouse $spouse handles ; > } > > Note that I have no idea where (if anywhere) the type goes in this. > Hopefully someone will correct me here. Note that this does not us