[perl #58952] Implemented second argument to comb

2008-09-17 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #58952] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=58952 > Here is the implementation of the second argument to the comb method as

Questions about :multi in Method Signatures

2008-09-17 Thread Chris Davaz
ion surrounding the use of :multi would help a lot. Best Regards, -Chris Davaz

Re: Questions about :multi in Method Signatures

2008-09-17 Thread Chris Davaz
That's a great response, thanks. Clears things up. One question, should be always be using _ for the invocant or should we try to restrict it? On Wed, Sep 17, 2008 at 10:52 PM, Patrick R. Michaud <[EMAIL PROTECTED]>wrote: > On Wed, Sep 17, 2008 at 08:37:36PM +0800, Chris Davaz w

[perl #58970] Initial implementation of Str.split(Regex)

2008-09-17 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #58970] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=58970 > I say "initial" because it didn't pass one of my tests.

[perl #58970] Initial implementation of Str.split(Regex)

2008-09-17 Thread Chris Davaz
;wrote: > Chris Davaz (via RT) wrote: > > # New Ticket Created by "Chris Davaz" > > # Please include the string: [perl #58970] > > # in the subject line of all future correspondence about this issue. > > # http://rt.perl.org/rt3/Ticket/Display.html?id=58970

Re: [perl #58970] Initial implementation of Str.split(Regex)

2008-09-18 Thread Chris Davaz
hmm I see I'll work it out ;-) Thanks On Thu, Sep 18, 2008 at 3:33 PM, Moritz Lenz <[EMAIL PROTECTED]>wrote: > >> Chris Davaz wrote: >> > Ok, here it is without the change to "split on a string", and the test >> > passes. >> >> Yes, but

Expected behavior of match?

2008-09-18 Thread Chris Davaz
The attached split.diff file is just for demonstration, not a patch submittal. I made a method on Str called "match" that returns a List of all matches: # returns all matches on a regex .sub 'match' :method :multi(_, 'Sub') .param pmc regex .local pmc match .local pmc tmpstr .loca

S05 and S29 may conflict on behavior of $string.match(/pat/)

2008-09-18 Thread Chris Davaz
roups/) should return a List of Match. I expected the S29 definition when first approaching $string.match I feel it is more intuitive than what happens with S05. Could someone clarify what the behavior should be? Best Regards, -Chris Davaz

Re: [perl #58970] Initial implementation of Str.split(Regex)

2008-09-18 Thread Chris Davaz
t;, "bang", "for", "the", "buck"] ["ab", "cd", "ef", "gh"] ["", "char", "", "soup", ""] I'll upload a test to pugs later. On Thu, Sep 18, 2008 at 3:33 PM, Moritz

Made some fixes to split on a regex and moved from Str.pir to any-str.pir

2008-09-18 Thread Chris Davaz
Got rid of "tempstr" and now returns the entire string on a non-match. Index: src/builtins/any-str.pir === --- src/builtins/any-str.pir (revision 31220) +++ src/builtins/any-str.pir (working copy) @@ -71,7 +71,42 @@ .return(retv)

Re: Made some fixes to split on a regex and moved from Str.pir to any-str.pir

2008-09-18 Thread Chris Davaz
Sorry forgot to put the method in alphabetical order, here you go. On Fri, Sep 19, 2008 at 12:36 AM, Chris Davaz <[EMAIL PROTECTED]> wrote: > Got rid of "tempstr" and now returns the entire string on a non-match. > Index: sr

Re: S05 and S29 may conflict on behavior of $string.match(/pat/)

2008-09-18 Thread Chris Davaz
this correct? I ask because in the current Rakudo implementation it returns the Match object (what I would expect from the "one low-level run of the regex engine"). Best Regards, -Chris On Thu, Sep 18, 2008 at 11:52 PM, Larry Wall <[EMAIL PROTECTED]> wrote: > On Thu, Sep 18, 2008

[perl #59014] Made some fixes to split on a regex and moved from Str.pir to any-str.pir

2008-09-19 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59014] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59014 > Got rid of "tempstr" and now returns the entire string on

[perl #59016] Re: Made some fixes to split on a regex and moved from Str.pir to any-str.pir

2008-09-19 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59016] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59016 > Sorry forgot to put the method in alphabetical order, here you go. O

Patch for split(thing, delimiter) function

2008-09-19 Thread Chris Davaz
Moved the split function from Str.pir to any-str.pm and removed the Perl6Str coercion. Index: src/builtins/any-str.pir === --- src/builtins/any-str.pir (revision 31254) +++ src/builtins/any-str.pir (working copy) @@ -172,6 +172,31 @@

[perl #59074] Patch for split(thing, delimiter) function

2008-09-19 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59074] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59074 > Moved the split function from Str.pir to any-str.pm and removed the Perl

method signature issues

2008-09-19 Thread Chris Davaz
In any-str.pir we need to figure out how to change .sub 'split' :method :multi('String') into .sub 'split' :method :multi(_, 'String') since the former method signature is causing problems for me as I'm trying to implement .sub 'split' :method :multi(_, 'Sub') with an additional optional argu

method signature issues

2008-09-20 Thread Chris Davaz
If it is the case that :method and :multi are incompatible, I am a bit surprised to see that in the Rakudo src directory: $ grep -rHI ':method :multi' . | grep -v '.svn' | wc -l 94 On Sun, Sep 21, 2008 at 11:30 AM, chromatic <[EMAIL PROTECTED]> wrote: > On Friday 19

Re: method signature issues

2008-09-21 Thread Chris Davaz
y 20 September 2008 22:24:52 Chris Davaz wrote: >> >> > If it is the case that :method and :multi are incompatible, I am a bit >> > surprised to see that in the Rakudo src directory: >> >> I said they're incompatible -- meant in terms of their semantics

Re: method signature issues

2008-09-21 Thread Chris Davaz
Awesome Patrick, you totally nailed it ;-) I'll be submitting a patch soon. Do you know if there is a Parrot bug logged for the problem you described? On Mon, Sep 22, 2008 at 12:27 AM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Sat, Sep 20, 2008 at 12:46:53PM +0800, Chr

Some fixes to split methods

2008-09-21 Thread Chris Davaz
I have implemented the limit parameter on both Str.split(String, Integer) and Str.split(Regex, Integer). In doing so I had to change the method signature of Str.split(String) to ".sub 'split' :method :multi(_, _)" from ".sub 'split' :method :multi('String')". The former method signature is the corr

[perl #59184] Some fixes to split methods

2008-09-22 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59184] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59184 > I have implemented the limit parameter on both Str.split(String,

more fixes to split

2008-09-22 Thread Chris Davaz
please see http://rt.perl.org/rt3/Ticket/Display.html?id=59184 for more info and for the patch

[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 put

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

2008-09-24 Thread Chris Davaz
Ahh, cool I didn't even know we had parrot.org. Publishing docs/book/* would be nice. On Tue, Sep 23, 2008 at 10:27 PM, Will Coleda via RT <[EMAIL PROTECTED]> wrote: > On Tue, Sep 23, 2008 at 9:04 AM, via RT Chris Davaz > <[EMAIL PROTECTED]> wrote: >> # New Ti

Re: Split with negative limits, and other weirdnesses

2008-09-25 Thread Chris Davaz
If someone wants to make the final word on what the behavior should be I can go ahead and implement it. On Tue, Sep 23, 2008 at 11:41 PM, Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Tue, Sep 23, 2008 at 9:38 AM, TSa <[EMAIL PROTECTED]> wrote: > >> HaloO, >> Moritz Lenz wrote: >> >>> In Per

Re: [perl #59184] Some fixes to split methods

2008-09-25 Thread Chris Davaz
Nope, that last one was it. Still waiting on a decision for how edge cases on limit are to be handled. On Thu, Sep 25, 2008 at 10:49 PM, Moritz Lenz via RT <[EMAIL PROTECTED]> wrote: > On Mon Sep 22 22:55:29 2008, cdavaz wrote: >> Grr.. wrong again sorry!! Forgot to remove the handle_count label.

[perl #59366] small fix to pod doc and interactive prompt

2008-09-26 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59366] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59366 > Fixed a bug in the doc where the method name and doc where mismatched.

Re: Split with negative limits, and other weirdnesses

2008-09-28 Thread Chris Davaz
Ok, so 0 returns the empty list and -1 violates the signature? In PIR can we have such signatures that put a constraint on the range of values for a given parameter? On Sun, Sep 28, 2008 at 7:25 PM, Carl Mäsak <[EMAIL PROTECTED]> wrote: > Jason (>): >> It makes sense to me to go with option 1; you

[perl #59642] Return the empty list on non-positive LIMIT

2008-10-06 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #59642] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=59642 > Here is a small patch to make split return the empty list on non-p

[perl #60228] fix for split on zero-width

2008-10-30 Thread Chris Davaz
# New Ticket Created by "Chris Davaz" # Please include the string: [perl #60228] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60228 > This is a fix for splitting strings on regular expressions that conta