Re: Gripes about Pod6 (S26)

2010-02-13 Thread David Brunton
On Feb 10, 4:38 pm, dam...@conway.org (Damian Conway) wrote: I sincerely hope that the future community of designers of Perl 6 's documentation format will find a way to honour and support the very different needs of *all* the creators and users of Perl, not just the needs of the most

KeyWeight and KeyBag

2010-01-20 Thread David Brunton
I notice that CKeyWeight returns False and deletes the key for a key whose value goes to zero or less than zero, issuing a warning in the latter case. Is it the case that CFatRat always evaluates to False in Boolean context when negative?

Concurrency

2007-12-06 Thread David Brunton
This last SOTO re-reminded me of what an inveterate fan I am of Perl 6. Wow. My question today is about concurrency. I can imagine how things like IPC Mailboxes (e.g. RFC 86) happen in modules. I can also imagine why Threads (e.g. RFC 1) should be in modules- given the obvious dependence on

Re: Concurrency

2007-12-06 Thread David Brunton
Inadvertently replied to this off-list... Moritz wrote: There's no need for any keyword to be in STD.pm. STD.pm just defines the grammar. Syntactically fork will be like just another sub, so it can safely be handled in the compiler's runtime. * Where will Cfork, Cwait, and possible friends

Re: Error calling bless in non-default constructor

2007-05-15 Thread David Brunton
Is this what you're looking for? class MattTest { has Str $.string; submethod BUILD (:$string) { ## submethod BUILD is the constructor ## :$string is a named argument string say passed $string; } } my $test =

Re: Error calling bless in non-default constructor

2007-05-15 Thread David Brunton
I think so (after fixing a couple of minor typos). Does this mean that you can only pass defined attributes to a constructor ? What if you want to pass parameters that are used during build but don't actually need to be stored in the object ? Hopefully you don't mind my cc'ing the list- that

Re: Operator overloading/Inheritance from built-in types?

2006-10-05 Thread David Brunton
Hopefully the following will help. If I've missed the thrust of your questions, feel free to disregard while someone else improves on my answer :) I only overloaded the infix:+ operator, but it should give you an idea. I would write the class comme ça: use v6-alpha; class Register { has

Re: Operator overloading/Inheritance from built-in types?

2006-10-05 Thread David Brunton
Haha, that will teach me for trying to golf on public mailing lists. It should actually read: sub int2vec ($n) { +(sprintf(%b,$n).split('')); # now I'm just golfing :-D } unless you only ever want to use it with the number 7. -db. - Original Message From: David

special named assertions

2006-09-27 Thread David Brunton
From an IRC conversation earlier today: A quick scan of S05 reveals definitions for these seven special named assertions: before pattern after pattern sp ws null '...' at($pos) Twenty-four more are listed in docs/Perl6/Overview/Rule.pod (some of which are used in S05, but I don't

Re: META vs meta

2006-09-14 Thread David Brunton
Aaron Sherman wrote: replies snipped / Is the goal to avoid namespace pollution? If so, shouldn't there be a truly metaish way of getting at the internal namespace so that someone doesn't accidentally render an object unusable by defining the wrong method name (which you can prevent with an

META vs meta

2006-09-11 Thread David Brunton
Hi all, There is currently a mismatch between S12 and Pugs. The former specifies $obj.META, the latter has implemented $obj.meta. Is there any reason I shouldn't change the tests from meta to META, make the corresponding changes in Pugs.Prim, and then fix any other examples or modules it