Revisiting lexicals, part 1

2008-09-23 Thread Patrick R. Michaud
I've put together a draft with my ideas and design for (re-)implementing lexicals in Parrot -- now available at http://www.pmichaud.com/perl6/lexical.txt . It's a first draft and might be a bit confusing in places, but overall I think it's a far cleaner design than the current implementation but

[perl #59202] [BUG] [PATCH] Perl 6 code "class A::A {}; class A::A {}" crashes parrot

2008-09-23 Thread via RT
# New Ticket Created by Stephane Payrard # Please include the string: [perl #59202] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59202 > class names is now (always) a ResizableStringArray so we get a crash instead of prin

[perl #59222] [PATCH] string to number radix support

2008-09-23 Thread jason switzer
# New Ticket Created by "jason switzer" # Please include the string: [perl #59222] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59222 > This patch adds radix notation (:\d<...>) to the string-to-number conversion routine

Split with negative limits, and other weirdnesses

2008-09-23 Thread Moritz Lenz
Today a patch to rakudo brought up the question what split() should do if the $limit argument is either zero or negative. In Perl 5 a negative limit means "unlimited", which we don't have to do because we have the Whatever star. A limit of 0 is basically ignored. Here are a few solution I could t

[perl #40392] [CAGE] convert C to a catchable exception

2008-09-23 Thread Andrew Whitworth via RT
On Mon Aug 04 20:49:25 2008, coke wrote: > On Mon Jun 09 16:49:46 2008, [EMAIL PROTECTED] wrote: > > On Thu Sep 21 14:38:40 2006, particle wrote: > > > parrot's source is littered with internal_exception() calls, the > bulk > > > (all?) of which should be converted to real_exception() calls. > > >

Re: [perl #59222] [PATCH] string to number radix support

2008-09-23 Thread Moritz Lenz
jason switzer (via RT) wrote: > # New Ticket Created by "jason switzer" > # Please include the string: [perl #59222] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=59222 > > > > This patch adds radix notation (:\d<...>)

Another split() question - when is there a capture?

2008-09-23 Thread Moritz Lenz
split seems to be a suprisingly tricky beast ;-) To quote S29: : As with Perl 5's split, if there is a capture in the pattern it : is returned in alternation with the split values. Unlike with : Perl 5, multiple such captures are returned in a single Match object. Unlike in Perl 5, it is not det

Re: [perl #59222] [PATCH] string to number radix support

2008-09-23 Thread Patrick R. Michaud
On Tue, Sep 23, 2008 at 12:05:18PM +0200, Moritz Lenz wrote: > jason switzer (via RT) wrote: > > Not all radix constructs are supported yet (in the works). Currently does > > not support nested notation, such as :10<12*23**3> or functional forms such > > as :10('1234'). > > If such things are to b

[perl #59240] Automate publishing of docs/*

2008-09-23 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59240] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59240 > I suggest we automate the publishing of everything under docs/* and putting it under pa

[perl #59242] [PATCH] ord and chr functions

2008-09-23 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #59242] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59242 > The attached patch makes t/spec/S29-conversions/ord_and_chr.t pass. ord-and-chr.patch

Re: [perl #59240] Automate publishing of docs/*

2008-09-23 Thread Will Coleda
On Tue, Sep 23, 2008 at 9:04 AM, via RT Chris Davaz <[EMAIL PROTECTED]> wrote: > # New Ticket Created by "Chris Davaz" > # Please include the string: [perl #59240] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=59240 > > >

Re: Split with negative limits, and other weirdnesses

2008-09-23 Thread TSa
HaloO, Moritz Lenz wrote: In Perl 5 a negative limit means "unlimited", which we don't have to do because we have the Whatever star. I like the notion of negative numbers as the other end of infinity. Where infinity here is the length of the split list which can be infinite if split is called

Re: [perl #59202] [BUG] [PATCH] Perl 6 code "class A::A {}; class A::A {}" crashes parrot

2008-09-23 Thread chromatic
On Monday 22 September 2008 08:28:26 Stephane Payrard wrote: > --- src/oo.c.orig   2008-09-22 16:59:06.0 +0200 > +++ src/oo.c2008-09-22 17:12:36.0 +0200 > @@ -603,10 +603,12 @@ >  static void >  fail_if_type_exists(PARROT_INTERP, ARGIN(PMC *name)) >  { > -    INTVAL      ty

Re: [svn:parrot] r31324 - trunk/src/pmc

2008-09-23 Thread NotFound
>> Will be better to change FixedIntegerArray to implement elements by >> calling get_integer? And then use get_integer in all relevant places >> in ResizableIntegerArray? Looks more clear to me to get the value with >> get_integer and set it with set_integer_native. > > Yes, that's definitely bett

Re: Subroutine parameter with trait and default.

2008-09-23 Thread John M. Dlugosz
PS Incidentally, it seems silly to have "is rw" but not "is ro". I keep writing "is ro". The synopses says "readonly". But now that it is possible, I nominate changing a hyphen. I'm not opposed to having it be "ro", but wonder why he didn't call it that in the first place, so there mu

Re: [perl #56468] [TODO] use more VTABLE to avoid subclassing errors.

2008-09-23 Thread NotFound
Patches to bigint, complex, float and string applied in r31370, thanks. -- Salu2

Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread Michael G Schwern
John M. Dlugosz wrote: > I'm not opposed to having it be "ro", but wonder why he didn't call it that > in the first place, so there must be a reason. Nobody's perfect? My other thought is that since parameters are read-only by default it's not thought you'd have to write it much so clarity wins o

[perl #59250] [BUG] FixedPMCArray.sort(cmp) fails on MultiSub PMC comparators

2008-09-23 Thread Patrick R. Michaud (via RT)
# New Ticket Created by Patrick R. Michaud # Please include the string: [perl #59250] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59250 > The .sort method on FixedPMCArray fails with "no applicable methods" when given a

Re: Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread David Green
On 2008-Sep-23, at 2:32 pm, Michael G Schwern wrote: My other thought is that since parameters are read-only by default it's not thought you'd have to write it much so clarity wins out over brevity, the flip side of Huffamn encoding. But that doesn't work out so good for normal variable de

Re: Split with negative limits, and other weirdnesses

2008-09-23 Thread David Green
On 2008-Sep-23, at 8:38 am, TSa wrote: Moritz Lenz wrote: In Perl 5 a negative limit means "unlimited", which we don't have to do because we have the Whatever star. I like the notion of negative numbers as the other end of infinity. I think positive values and zero make sense. But I don't

Re: Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread Michael G Schwern
David Green wrote: > On 2008-Sep-23, at 2:32 pm, Michael G Schwern wrote: >> My other thought is that since parameters are read-only by default >> it's not >> thought you'd have to write it much so clarity wins out over brevity, >> the flip >> side of Huffamn encoding. But that doesn't work out so

Re: [perl #59006] stringifying Floats into PIR literals loses (a lot of) precision

2008-09-23 Thread chromatic
On Thursday 18 September 2008 06:13:30 Patrick R. Michaud (via RT) wrote: > When generating PIR output (e.g., from the compiler tools), we > often need to convert a Float value into an equivalent representation > for PIR. Unfortunately, all of the mechanisms I've looked at for > doing this lose a

Re: [perl #59006] stringifying Floats into PIR literals loses (a lot of) precision

2008-09-23 Thread Patrick R. Michaud
On Tue, Sep 23, 2008 at 08:47:15PM -0700, chromatic wrote: > On Thursday 18 September 2008 06:13:30 Patrick R. Michaud (via RT) wrote: > > When generating PIR output (e.g., from the compiler tools), we > > often need to convert a Float value into an equivalent representation > > for PIR. Unfortuna

Re: Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread John M. Dlugosz
Michael G Schwern schwern-at-pobox.com |Perl 6| wrote: It should be possible to alias it in your own scope easily. Every time someone replies to a Perl 6 language design nit with "but you can change the grammar" *I* kill a kitten. *meowmmmf* That would not be a change in the gramma

Re: Why no "is ro"? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread John M. Dlugosz
Michael G Schwern schwern-at-pobox.com |Perl 6| wrote: John M. Dlugosz wrote: I'm not opposed to having it be "ro", but wonder why he didn't call it that in the first place, so there must be a reason. Nobody's perfect? My other thought is that since parameters are read-only by default