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

2009-07-10 Thread chromatic
On Wednesday 08 July 2009 17:24:47 yary wrote: > On Wed, Jul 8, 2009 at 3:28 PM, Carl Mäsak wrote: > > Maybe, but the problem as described in the original ticket was the > > inconsistency of '1' and 'params' with an 's'. > There's also the inconsistency of "arguments" vs "params"! Drop the > "pa

Re: Re-thinking file test operations

2009-07-10 Thread Jonathan Scott Duff
On Thu, Jul 9, 2009 at 7:50 PM, Aristotle Pagaltzis wrote: > * Moritz Lenz [2009-07-10 00:25]: > > stat($str, :e)# let multi dispatch handle it for us > > This gets my vote. Me too. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: Is there a way to bulky feed?

2009-07-10 Thread Xiao Yafeng
On Fri, Jul 10, 2009 at 12:29 AM, yary wrote: > > > On Wed, Jul 8, 2009 at 8:45 PM, Xiao Yafeng wrote: > >> Any thoughts? >> > > First let's fix the whitespace in your post so it's easier to read- > > My question is: could I write below code in perl6: > > # 2 loops like for @a -> $b[0],$b[1] {;}

[Invitation] July Dallas.p6m Meeting @ Tue Jul 14 7p m – 9pm (perl6-us...@perl.org)

2009-07-10 Thread jason switzer
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20090715T00Z DTEND:20090715T02Z DTSTAMP:20090710T030514Z ORGANIZER;CN=Dallas.p6m:mailto:nef8d24mak0j3ped8s58kav...@group.calendar.go ogle.com UID:b08f2qete3o

Re: Reusing code: "Everything but the kitchen sink"

2009-07-10 Thread David Green
On 2009-Jul-7, at 5:28 am, Jonathan Worthington wrote: The spec is right in that you need to write a method in the class that decides what to do. This will look something like: method fuse() { self.Bomb::fuse() } That makes sense for using the combined role on its own, but can we still

Re: Is there a way to bulky feed?

2009-07-10 Thread yary
I understand now. Given a large list, you'd like to assign chunks of the list to an array, easily, while looping. In other words, you're looking for a way to abbreviate this: my $chunk_size=10_000; my @big=''..'mnop'; for ^...@big :by $chunk_size { my @chu...@big[$_..($_+$chunk_size,@big.end

Huffman's Log: svndate r27485

2009-07-10 Thread David Green
On 2009-Jul-8, at 3:41 pm, pugs-comm...@feather.perl6.nl wrote: =item log + our Num multi method log ( Num $x: Num $base = Num::e ) is export Logarithm of base C<$base>, default Natural. Calling with C<$x == 0> is an error. It occurs to me that "log" is a pretty short name for a function I

Re: Re-thinking file test operations

2009-07-10 Thread Daniel Ruoso
Em Qui, 2009-07-09 às 22:50 -0400, Buddha Buck escreveu: > Both the separate pathname type and the stat($str, :e) proposal > salvage the purity of Str, so either would be acceptable to your > argument. The bigger problem of using a different type is that "/etc/passwd" ~~ :e Would dispatch to S

Re: YAPC::EU and Perl 6 Roles

2009-07-10 Thread David Green
On 2009-Jul-8, at 1:49 pm, Ovid wrote: That being said, roles also have two competing uses (though they don't conflict as badly). As units of behavior, they provide the functionality your code needs. However, they can also serve as an interface. Maybe there are Interfaces, which are, we

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Darren Duncan
David Green wrote: On 2009-Jul-8, at 3:41 pm, pugs-comm...@feather.perl6.nl wrote: =item log + our Num multi method log ( Num $x: Num $base = Num::e ) is export Logarithm of base C<$base>, default Natural. Calling with C<$x == 0> is an error. It occurs to me that "log" is a pretty short name

Re: Huffman's Log: svndate r27485

2009-07-10 Thread yary
+1 on using ln() instead of log() Also, systems I know of that implement both log() and ln() default ln() with base e, as perl6 does, log() uses base 10.

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Mark J. Reed
ln() for log(:base(e)) is fine. ln() for log to any other base is Just Plain Wrong. The clash between 'log' for 'logarithm' and 'log' for 'write to log file' is unfortunate, but since you have to define logging parameters somewhere anyway, I'm OK with having to call that sort of log as a method o

[perl #61108] tests available

2009-07-10 Thread kyleha
This is an automatically generated mail to inform you that tests are now available in b/t/spec/S12-class/lexical.t

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Aaron Sherman
On Fri, Jul 10, 2009 at 3:32 PM, Mark J. Reed wrote: > The clash between 'log' for 'logarithm' and 'log' for 'write to log > file' is unfortunate, but since you have to define logging parameters > somewhere anyway, I'm OK with having to call that sort of log as a > method on a logger object inst

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Austin Hastings
David Green wrote: It occurs to me that "log" is a pretty short name for a function I rarely use. (In fact, I'm not sure I've ever used it in perl.) On the other hand, I -- and a thousand or so CPAN modules -- are always logging stuff in that other popular computer sense. (All right, that n

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Mark J. Reed
I'm all for not having any variety of log() in the default namespace. Regardless, mathematical functions should follow mathematical norms. Changing Perl tradition is one thing, but we have centuries, sometimes millennia, of tradition to deal with in the mathematical realm. It should not be violate

Re: Re-thinking file test operations

2009-07-10 Thread Aaron Sherman
On Thu, Jul 9, 2009 at 6:22 PM, Moritz Lenz wrote: > > $str.File.e # same, different names Brainstorming a bit here Str is a class that describes collections of characters (among some other typographical constructs, yadda, yadda, Unicode, yadda). There is a commonly used speci

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Austin Hastings
Mark J. Reed wrote: I'm all for not having any variety of log() in the default namespace. Regardless, mathematical functions should follow mathematical norms. Changing Perl tradition is one thing, but we have centuries, sometimes millennia, of tradition to deal with in the mathematical realm. It

Re: Reusing code: "Everything but the kitchen sink"

2009-07-10 Thread Jon Lang
The key to understanding roles is to note that roles don't implement methods; classes implement methods. Roles define which methods must be implemented, and suggest ways that they might be implemented; classes decide which implementation to use. Anything that breaks this paradigm is a Bad Thing.

Re: Reusing code: "Everything but the kitchen sink"

2009-07-10 Thread Jon Lang
The key to understanding roles is to note that roles don't implement methods; classes implement methods. Roles define which methods must be implemented, and suggest ways that they might be implemented; classes decide which implementation to use. Anything that breaks this paradigm is a Bad Thing.

r27503 - docs/Perl6/Spec

2009-07-10 Thread pugs-commits
Author: lwall Date: 2009-07-11 01:11:48 +0200 (Sat, 11 Jul 2009) New Revision: 27503 Modified: docs/Perl6/Spec/S03-operators.pod Log: [S03] Reduce power of Pair.ACCEPTS to work only on booleans, moritz++ (but we keep the pair forms for ease-of-use via switches and junctions as well as for "does

Fwd: Re-thinking file test operations

2009-07-10 Thread Aaron Sherman
Sorry, I sent this just to Mark. Wasn't my intention. -- Forwarded message -- From: Aaron Sherman Date: Fri, Jul 10, 2009 at 6:58 PM Subject: Re: Re-thinking file test operations To: "Mark J. Reed" On Fri, Jul 10, 2009 at 5:31 PM, Mark J. Reed wrote: > I'd rather see all t

Fwd: Re-thinking file test operations

2009-07-10 Thread Mark J. Reed
My reply to the message Aaron sent directly to me by mistake... -- Forwarded message -- From: Mark J. Reed Date: Fri, Jul 10, 2009 at 7:23 PM Subject: Re: Re-thinking file test operations To: Aaron Sherman You replied just to me, you know. > In re-thinking it, we don't need t

Re: YAPC::EU and Perl 6 Roles

2009-07-10 Thread Jon Lang
Larry Wall wrote: > 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 "overrides" tells Pe

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Jon Lang
On Fri, Jul 10, 2009 at 2:22 PM, Austin Hastings wrote: > Mark J. Reed wrote: >> >> I'm all for not having any variety of log() in the default namespace. >> Regardless, mathematical functions should follow mathematical norms. >> Changing Perl tradition is one thing, but we have centuries, sometimes

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Hinrik Örn Sigurðsson
It occurs to me that ln() is even shorter than log(), leaving the Huffmanization issue unresolved. :)

Re: YAPC::EU and Perl 6 Roles

2009-07-10 Thread Jon Lang
Jon Lang wrote: > "supersede" already has a meaning with respect to classes; and what > I'm thinking of would apply to classes as well as roles; so I'm going > to suggest another keyword. > > How about this: in role composition, "mandate" causes methods to take > precedence over other methods with