[ANNOUNCE] Test::Simple/More/Builder 0.59_01

2005-04-26 Thread Michael G Schwern
http://www.pobox.com/~schwern/src/Test-Simple-0.59_01.tar.gz or http://svn.schwern.org/svn/CPAN/Test-Simple/trunk or a CPAN near you Why an alpha release? The internal structure of the Test::Builder object has changed from a pile of file scoped lexicals to an actual object. The change was rote bu

Adding Complexity

2005-04-26 Thread Jonathan Lang
As an exercise, I've been looking into what could be done in terms of creating a complex numbers package that takes advantage of perl 6 technology. A couple of thoughts that I ran across: When you take the square root of a number, you actually get one of two possible answers (for instance, sqrt(

Re: LABELS: block

2005-04-26 Thread Dave Whipp
Juerd wrote: ... Or just add quotes (yes, please) and keep the colon: "foo": for 1... { next "foo"; } Given that "next" throws a control-exception that is handled by the looping construct, perhaps we sohuld think of the label as an optional parameter to the looping statement funct

Re: [perl #35116] [PATCH] Fix segfault when load_bytecode cannot find pbc file

2005-04-26 Thread Jens Rieks
On Tuesday 26 April 2005 23:41, chromatic wrote: > Looks good to me. Â To me too, except... > Before I apply it, I think it needs a test case. ÂI'll write it from > this example. ÂHow about t/stress/internal_exceptions.t? > > Any other feedback? This should be a real_exception, not an internal one

Re: [perl #35116] [PATCH] Fix segfault when load_bytecode cannot find pbc file

2005-04-26 Thread chromatic
On Tue, 2005-04-26 at 11:55 -0700, Nick Glencross wrote: > This patch fixes a segfault in r7928 when load_bytecode cannot find the > pbc file. e.g. > > .sub test > # (Assumes hello.pbc doesn't exist) > load_bytecode "hello.pbc" > end > .end Looks good to me. Before I apply it, I

[perl #35116] [PATCH] Fix segfault when load_bytecode cannot find pbc file

2005-04-26 Thread via RT
# New Ticket Created by Nick Glencross # Please include the string: [perl #35116] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=35116 > This patch fixes a segfault in r7928 when load_bytecode cannot find the pbc file. e.

parrot and refcounting semantics

2005-04-26 Thread Robin Redeker
Hello! The last weeks i've been in joy to implement a small vm for a special runtime enviroment. As i'm a regular reader of the perl.perl6.* mailing lists and know about parrot. I wondered how easy it would be to throw away my own vm solution and use parrot. There are currently only two things th

Formal Parameters To While Block

2005-04-26 Thread Joshua Gatcomb
All: Please forgive me, but I have only recently started following the language side of p6 after spending a fair amount of time with Parrot. Last night I installed Pugs and wrote my first p6 code: http://perlmonks.org/index.pl?node_id=451398 Reading S04, it seems that there are no implicit block

Re: LABELS: block

2005-04-26 Thread Juerd
Aaron Sherman skribis 2005-04-26 16:40 (-0400): > Is there ever a reason for a leading adverb in a statement or control > structure? List of pairs and left-to-right writing: :foo, :quux ==> map { ... } ==> my @baz; > or you could have a keyword that introduces the label: > rx/label +

Re: LABELS: block

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 13:24, Luke Palmer wrote: > [we'll] redo label syntax later if we must. Well, of course you run the danger of making it hard for people to recognize labels which are otherwise common across many languages, but here's a few ways you could do labels if you need to: The real

Re: LABELS: block

2005-04-26 Thread Luke Palmer
Juerd writes: > Luke Palmer skribis 2005-04-26 9:28 (-0600): > > Labels are pretty easy to pick out. I don't believe there is any other > > thing in the language that, at the beginning of a statement, matches > > /\w+\:/ . They are certainly available in Perl 6 (as are plain old line > > labels;

Re: LABELS: block

2005-04-26 Thread Juerd
Luke Palmer skribis 2005-04-26 9:28 (-0600): > Labels are pretty easy to pick out. I don't believe there is any other > thing in the language that, at the beginning of a statement, matches > /\w+\:/ . They are certainly available in Perl 6 (as are plain old line > labels; we're not getting rid o

Re: Formal Parameters To While Block

2005-04-26 Thread Luke Palmer
Joshua Gatcomb writes: > The solution is formal parameters. The trouble is I > can't seem to find a good example in S04 that matches > what I am trying to do. > > while $ref() -> @array { ... } We're thinking at the moment that `while` will probably look like this: sub statement: (&cond is

Re: LABELS: block

2005-04-26 Thread Luke Palmer
Stevan Little writes: > Hello all, > > I have been going over the Synopsis, and I cannot find block labels > mentioned anywhere. I was under the impression that if it is not > mentioned, then it can be assumed to be the same as perl5. However, I > wonder if this is the case with labels given th

Re: Roles as anonymous and/or closures

2005-04-26 Thread Luke Palmer
Juerd writes: > (And write classes ucfirst, please) > > > return $self but role { > > does role { ... } Nope, Aaron was right here, since you're not trying to mutate $self; you're just trying to return a new $self with other capabilities. > > It certainly seems very

Re: Deletion of members by mixin

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 12:44, Abhijit Mahabal wrote: > On Tue, 26 Apr 2005, Aaron Sherman wrote: > > So, as you can see, in the case of mixins, the hypothetical: > > > > role z { > > has not mymeth; > > } Sorry, my bad. I wandered sideways into talking about methods. "has", of

Re: Deletion of members by mixin

2005-04-26 Thread Abhijit Mahabal
On Tue, 26 Apr 2005, Aaron Sherman wrote: On Tue, 2005-04-26 at 09:58, Abhijit Mahabal wrote: On Tue, 26 Apr 2005, Aaron Sherman wrote: It also might be useful for roles to be able to delete members and methods from a class like so: role foo { has $.x; has no

Re: map { $_ => $_ } @foo

2005-04-26 Thread Thomas Sandlaß
Autrijus Tang wrote: map { $_ => $_; } @foo; This works too: map { ;$_ => $_ } @foo; But () is still only a grouper, so this won't do: map { ($_ => $_) } @foo; Does this make sense? A lot! BTW, is it possible to distinguish methods and subs from the toplevel, too? That little inference

Re: use English

2005-04-26 Thread Luke Palmer
Aaron Sherman writes: > On Mon, 2005-04-25 at 22:24 -0500, Rod Adams wrote: > > > Not exactly a fair comparison, since it's common to not "use English" > > due to the $& issue. > > > > I suspect that if that was not the case, it would be used more. > > The reasons I don't "use English" in P5: >

Re: State of ParTcl [r7928]

2005-04-26 Thread Leopold Toetsch
William Coleda <[EMAIL PROTECTED]> wrote: > The garbage collection issues that were stopping ParTcl's test suite > (FYI, *not* Tcl's test suite) from working seem to be gone now! I'm sorry to say that, but no GC bugs have gone, nor have any more been fixed. As a DOD run isn't triggered at a repro

LABELS: block

2005-04-26 Thread Stevan Little
Hello all, I have been going over the Synopsis, and I cannot find block labels mentioned anywhere. I was under the impression that if it is not mentioned, then it can be assumed to be the same as perl5. However, I wonder if this is the case with labels given that "everybody wants the colon". C

Formal Parameters To While Block

2005-04-26 Thread Joshua Gatcomb
All: Please forgive me, but I have only recently started following the language side of p6 after spending a fair amount of time with Parrot. Last night I installed Pugs and wrote my first p6 code: http://perlmonks.org/index.pl?node_id=451398 Reading S04, it seems that there are no implicit blo

Re: Deletion of members by mixin

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 10:49, Aaron Sherman wrote: > Quoting S12: > > A class's method definition hides any role definition of the > same name, so role methods are second-class citizens. On the > other hand, role methods are still part of the class itself, so > they

Deletion of members by mixin

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 09:58, Abhijit Mahabal wrote: > On Tue, 26 Apr 2005, Aaron Sherman wrote: > > > It also might be useful for roles to be able to delete members and > > methods from a class like so: > > > > role foo { > > has $.x; > > has not $.y; > > } > > But

Re: invocant vs. topic (was: Re: -X's auto-(un)quoting?)

2005-04-26 Thread Mark Reed
I¹m only an amateur linguist, but from a linguistic point of view, there are several related terms in this space. The term ³subject² has many meanings in English, including ³topic². But from a grammatical and linguistic standpoint, there are only two meanings of ³subject², and ³topic² is a distin

Re: Roles as anonymous and/or closures

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 09:49, Juerd wrote: > > return $self but role { > > does role { ... } As I understood (please correct me if I'm wrong), the difference between "does" and "but" was that does modifies the existing object in-place, and does creates a copy with the new

Re: Roles as anonymous and/or closures

2005-04-26 Thread Abhijit Mahabal
On Tue, 26 Apr 2005, Aaron Sherman wrote: It also might be useful for roles to be able to delete members and methods from a class like so: role foo { has $.x; has not $.y; } But that brings up the issue of who has the final authority. In class compos

Re: Roles as anonymous and/or closures

2005-04-26 Thread Juerd
All IIRC/AFAIK: Aaron Sherman skribis 2005-04-26 9:25 (-0400): > method make ($self: $make, [EMAIL PROTECTED]) returns(car) { returns car; (And write classes ucfirst, please) > return $self but role { does role { ... } > It certainly seems very

invocant vs. topic (was: Re: -X's auto-(un)quoting?)

2005-04-26 Thread Thomas Sandlaß
Luke Palmer wrote: My brother asked me to take out the trash. I asked him to do it. I believe that the subject there is "my brother" in the first sentence and "I" in the second. The topic is either "to take out the trash" or just "the trash" throughout (English speakers wouldn't have any trou

Roles as anonymous and/or closures

2005-04-26 Thread Aaron Sherman
Is any of this legal? class car { ... method make ($self: $make, [EMAIL PROTECTED]) returns(car) { return $self but role { has $.make = $make; method model($self: $model)

Re: Is this the correct behaviour

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 13:46 +0530, Kiran Kumar wrote: > I Dont think this is fixed , Im still getting this Error . > > for (0 .. 8) -> $tmp > { > say " tmp is $tmp Spcl is $_ \n"; > } Interesting. Now, it's dependent on the use of $_. Take out that $_ and it works fine... cool bug ;-)

use English

2005-04-26 Thread Aaron Sherman
On Mon, 2005-04-25 at 22:24 -0500, Rod Adams wrote: > Not exactly a fair comparison, since it's common to not "use English" > due to the $& issue. > > I suspect that if that was not the case, it would be used more. The reasons I don't "use English" in P5: * Variable access is slower

Re: [perl #35083] t/op/debuginfo.t fails

2005-04-26 Thread François PERRAD
Now, I think my patch is consistent. internal_exception and real_exception have the same problem, both write in stderr. internal_exception directly, real_exception via find_exception_handler. In both case, I add a fflush(stderr) after fprintf(stderr, ...). Francois Perrrad debuginfo.patch Descri

Monthly Release Schedule

2005-04-26 Thread Jared Rhine
[Chip == [EMAIL PROTECTED] on Wed, 6 Apr 2005 18:24:49 -0400] Chip> * On the third to last day of the month, someone (me, by Chip> default) will create a release document... Chip> * Starting on the first of the month, there will be a code Chip> freeze... Is it on? Chip> No changes sho

Re: Is this the correct behaviour

2005-04-26 Thread Kiran Kumar
I Dont think this is fixed , Im still getting this Error . for (0 .. 8) -> $tmp { say " tmp is $tmp Spcl is $_ \n"; } On 4/26/05, Aaron Sherman <[EMAIL PROTECTED]> wrote: > On Mon, 2005-04-25 at 08:43, Luke Palmer wrote: > > > Nope. It seems that pugs is considering $tmp and the implic

Re: Test::Tutorial needs updated

2005-04-26 Thread Steve Peters
On Mon, Apr 25, 2005 at 04:30:12PM -0700, Michael G Schwern wrote: > And I just can't seem to get up the enthusiasm to do it. The primary > problem is its testing against a very old version of Date::ICal and a lot > of the examples no longer work. There's lots of secondary problems > resulting

Re: morph()ing

2005-04-26 Thread Leopold Toetsch
Bob Rogers <[EMAIL PROTECTED]> wrote: >From: Leopold Toetsch <[EMAIL PROTECTED]> >But it isn't known, if the last reference to that PMC is reused or not. >If it is the last reference then the finalizer has to run, else not. >As we don't have reference counts, an assign to an object