Re: Scalability of Devel::Cover

2005-06-16 Thread Kevin Scaldeferri
On Jun 14, 2005, at 1:32 PM, Kevin Scaldeferri wrote: A little more interesting information. I ran a coverage test for the full code base. Then I did this: [kevin]% time perl -MDevel::Cover -e 1 ... perl -MDevel::Cover -e 1 14.19s user 0.88s system 79% cpu 18.997 total After spending a

Re: Adding methods to (existing) classes

2005-06-16 Thread Leopold Toetsch
Patrick R. Michaud wrote: ... I.e., I'd like to be able to do something along the lines of: .sub main @MAIN $P99 = newclass "Foo" $S0 = ".sub h @ANON\nprint \"Hello\"\n.end\n" $P0 = compreg "PIR" $P1 = compile $P0, $S0 store_global "Foo", "hello",

Re: new mailing list: perl6-general?

2005-06-16 Thread BÁRTHÁZI András
Hi, I think, that David's version is matches with my opinion. I don't think, that "beginners" would be a better name for it, but maybe more practical, as it's a more evident name. Bye, Andras David Storrs wrote: On Jun 15, 2005, at 3:33 PM, Patrick R. Michaud wrote: And here they are...

Re: new mailing list: perl6-general?

2005-06-16 Thread Fagyal Csongor
Hi, Hi, I think, that David's version is matches with my opinion. I don't think, that "beginners" would be a better name for it, but maybe more practical, as it's a more evident name. Hmmm, I think "beginner" is a little negative. What about professional Perl5 programmers, who wish to lear

Re: new mailing list: perl6-general?

2005-06-16 Thread BÁRTHÁZI András
Hi, Fagyal Csongor wrote: I think, that David's version is matches with my opinion. I don't think, that "beginners" would be a better name for it, but maybe more practical, as it's a more evident name. Hmmm, I think "beginner" is a little negative. What about professional Perl5 programmers,

sub my_zip (...?) {}

2005-06-16 Thread Autrijus Tang
Currently in Pugs &*zip has no signature -- it simply rewrites its arguments into the listfix ¥ (i.e. Y) function. That is bad because it can't be introspected, and you can't define something like that yourself. It also makes it uncompilable to Parrot as I don't control the runloop there. :) Als

Re: New generational GC Scheme

2005-06-16 Thread Alexandre Buisse
Sorry for answering so late... On 6/8/05, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > jerry gay wrote: > > i'm no gc expert, but here's my comments after discussions with > > alexandre on #parrot. > > > > On 6/8/05, Alexandre Buisse <[EMAIL PROTECTED]> wrote: > > > since threading issues haven't

Hackathon days 4+5

2005-06-16 Thread Chip Salzenberg
Share & Enjoy: http://use.perl.org/~chip/journal/25234 If only use.perl didn't make me compose my HTML in a window about two inches square, it'd be great. OK, I could compose and cut&paste, but where's the fun in that? -- Chip Salzenberg <[EMAIL PROTECTED]>

Re: sub my_zip (...?) {}

2005-06-16 Thread Larry Wall
On Thu, Jun 16, 2005 at 05:40:31PM +0800, Autrijus Tang wrote: : Currently in Pugs &*zip has no signature -- it simply rewrites its : arguments into the listfix ¥ (i.e. Y) function. : : That is bad because it can't be introspected, and you can't define : something like that yourself. It also make

Ignoring parameters

2005-06-16 Thread Gaal Yahas
Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say "Hello, FooClass!"; } AFAIK, this is the only signature that would work for making &greet a class method; but note that I'm not using $class, and I'd expect the compiler to is

Re: sub my_zip (...?) {}

2005-06-16 Thread Gaal Yahas
[Sent off-group by mistake. On #perl6 the impression was that now Pipe is becoming a Role for things that can lazily be read from; and thus any filehandle or lazy list fulfills them. Larry, please help us understand if this is the case.] On Thu, Jun 16, 2005 at 08:53:41AM -0700, Larry Wall wrote:

Re: sub my_zip (...?) {}

2005-06-16 Thread Smylers
Larry Wall writes: > This does imply that we can pipe into a subscript somehow. Why? Or rather, why is that desirable? > If we choose something like () for our placeholder meaning "pipe into > this location", then > > @[EMAIL PROTECTED]; @b; @c] > > is the same as > > @foo[()] <== @a

Re: sub my_zip (...?) {}

2005-06-16 Thread Larry Wall
On Thu, Jun 16, 2005 at 07:24:42PM +0300, Gaal Yahas wrote: : [Sent off-group by mistake. On #perl6 the impression was that now Pipe : is becoming a Role for things that can lazily be read from; and thus any : filehandle or lazy list fulfills them. Larry, please help us understand : if this is the

Re: Ignoring parameters

2005-06-16 Thread Luke Palmer
On 6/16/05, Gaal Yahas <[EMAIL PROTECTED]> wrote: > Say I have a class method in FooClass, callable as FooClass.greet(): > > method greet(Class $class: ) { > say "Hello, FooClass!"; > } Aside from the fact that I don't think this is the right way to specify class methods... > A

scalar dereferencing.

2005-06-16 Thread Autrijus Tang
my $x = 3; my $y = \$x; say $y + 10; $y++; say $y; say $x; Currently in Pugs they print: 13 4 3 Is this sane? What is the scalar reference's semantics in face of a stringification and numification? I assume that array/hash references simply pass on to the t

Re: Ignoring parameters

2005-06-16 Thread Gaal Yahas
On Thu, Jun 16, 2005 at 01:26:31PM -0600, Luke Palmer wrote: > > Say I have a class method in FooClass, callable as FooClass.greet(): > > > > method greet(Class $class: ) { > > say "Hello, FooClass!"; > > } > > Aside from the fact that I don't think this is the right way to > sp

Re: sub my_zip (...?) {}

2005-06-16 Thread Dave Whipp
Larry Wall wrote: You must specify @foo[[;[EMAIL PROTECTED] or @foo[()] <== @bar to get the special mark. I'm uncomfortable with the specific syntax of @a[()] because generated code might sometimes want to generate an empty list, and special-casing that sort of thing is always a pain (and f

Re: Ignoring parameters

2005-06-16 Thread Damian Conway
Gaal Yahas wrote: On Thu, Jun 16, 2005 at 01:26:31PM -0600, Luke Palmer wrote: Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say "Hello, FooClass!"; } Aside from the fact that I don't think this is the right way to specify

Re: sub my_zip (...?) {}

2005-06-16 Thread Larry Wall
On Thu, Jun 16, 2005 at 01:05:22PM -0700, Dave Whipp wrote: : Larry Wall wrote: : > You must : >specify @foo[[;[EMAIL PROTECTED] or @foo[()] <== @bar to get the special mark. : : I'm uncomfortable with the specific syntax of @a[()] because generated : code might sometimes want to generate an em

Re: Ignoring parameters

2005-06-16 Thread John Siracusa
On 6/16/05, Damian Conway <[EMAIL PROTECTED]> wrote: > And I think that subs and methods *should* complain about all unused > non-optional parameters *except* invocants. This brings up something I've been thinking about. I sometimes write a method in Perl 5 that does something or other and then c

Re: Ignoring parameters

2005-06-16 Thread Patrick R. Michaud
On Fri, Jun 17, 2005 at 07:05:11AM +1000, Damian Conway wrote: > Gaal Yahas wrote: > >On Thu, Jun 16, 2005 at 01:26:31PM -0600, Luke Palmer wrote: > >>>Say I have a class method in FooClass, callable as FooClass.greet(): > >>>method greet(Class $class: ) { > >>> say "Hello, FooClass!"; >

Re: Ignoring parameters

2005-06-16 Thread Damian Conway
Patrick wrote: Somehow I read these as though the original poster was correct -- i.e., one creates a class method for FooClass as either method greet(Class $class:) { say "Hello!"; } Yes. That will work, but it's not the recommended solution. or method greet(FooClass $class:) { sa

nested subs

2005-06-16 Thread Piers Cawley
So, I was about to write the following test for Pugs: sub factorial (Int $n) { my sub factn (Int $acc, $i) { return $acc if $i > $n; factn( $acc * $i, $i+1); } factn(1, 1); } When I thought to check the apocalypses and exegeses and, what do you know, I couldn't find an

Re: nested subs

2005-06-16 Thread Luke Palmer
On 6/16/05, Piers Cawley <[EMAIL PROTECTED]> wrote: > So, I was about to write the following test for Pugs: > > sub factorial (Int $n) { > my sub factn (Int $acc, $i) { > return $acc if $i > $n; > factn( $acc * $i, $i+1); > } > factn(1, 1); > } > > When I thought to ch

Re: nested subs

2005-06-16 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/16/05, Piers Cawley <[EMAIL PROTECTED]> wrote: >> So, I was about to write the following test for Pugs: >> >> sub factorial (Int $n) { >> my sub factn (Int $acc, $i) { >> return $acc if $i > $n; >> factn( $acc * $i, $i+1); >> }

Re: sub my_zip (...?) {}

2005-06-16 Thread Luke Palmer
On 6/16/05, Larry Wall <[EMAIL PROTECTED]> wrote: > Or maybe a splat > > @foo[*] > > Or go with the parens with something in them to indicate the positive > absence of something. > > @foo[(*)] > > Anyone else want to have a go at this bikeshed? You know, before I read this part of the

When can I take given as read?

2005-06-16 Thread Piers Cawley
Suppose I have a simple, single argument recursive function: sub factorial (Int $n) { return 1 if $n == 0; return $n * factorial $n; } Can I write that as: sub factorial (Int $n:) { return 1 when 0; return $n * factorial $n; } NB. Yes, I know it's a pathological example.

Re: reduce metaoperator on an empty list

2005-06-16 Thread Edward Cherlin
On Thursday 09 June 2005 12:21, John Macdonald wrote: > On Thu, Jun 09, 2005 at 06:41:55PM +0200, "TSa (Thomas Sandla �" wrote: > > Edward Cherlin wrote: > > >That means that we have to straighten out the functions > > > that can return either a Boolean or an item of the > > > argument type. Compar