Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Chris Fields
On Jul 28, 2010, at 1:27 PM, Mark J. Reed wrote: > On Wednesday, July 28, 2010, Jon Lang wrote: >> Keep it simple, folks! There are enough corner cases in Perl 6 as >> things stand; we don't need to be introducing more of them if we can >> help it. > > Can I get an Amen? Amen! > -- > Mark J.

Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Chris Fields
On Jul 28, 2010, at 1:37 PM, Mark J. Reed wrote: > On Wed, Jul 28, 2010 at 2:30 PM, Chris Fields wrote: >> On Jul 28, 2010, at 1:27 PM, Mark J. Reed wrote: >>> Can I get an Amen? Amen! >>> -- >>> Mark J. Reed >> >> +1. I'm agnosti

Str.trans implementation

2010-06-01 Thread Chris Fields
Moritz, Funny, went to IRC after seeing this brought up to respond, and didn't even notice you made this the weekly contribution to perl6! I have a Str.trans implementation on my rakudo github fork that's working and passes 20 tests: http://github.com/cjfields/rakudo A few caveats: 1) It'

Re: Counting characters

2010-01-28 Thread Chris Fields
Would you want to use something else for that, maybe .comb? From the spec: 'The comb function looks through a string for the interesting bits, ignoring the parts that don't match. In other words, it's a version of split where you specify what you want, not what you don't want.' chris On Jan 2

Re: Module naming conventions

2009-06-03 Thread Chris Fields
On Jun 2, 2009, at 5:11 PM, Daniel Carrera wrote: John M. Dlugosz wrote: So CPAN6 is basically only going to be for Parrot? What are you talking about? Did you even read my email? I said that a module might be implemented in multiple languages (see Digest::SHA VS Digest::SHA::PurePerl) an

Re: References to parts of declared packages

2009-02-12 Thread Chris Fields
On Feb 11, 2009, at 2:46 PM, Carl Mäsak wrote: Jon (>), Jonasthan (>>): If we declared, for example: role A::B {}; Then what should a reference to A be here? At the moment, Rakudo treats it as a post-declared listop, however I suspect we should be doing something a bit smarter? If so, w

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-18 Thread Chris Fields
On Jul 18, 2008, at 5:18 PM, Jonathan Worthington wrote: Hi, Chris Fields wrote: The PGE::Match appears to be converted to a Str, regardless of the invoking object type. The following is .match (in any-str.pir, with the builtins). Also, .ACCEPTS now uses .match to retrieve the Match

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-18 Thread Chris Fields
On Jul 17, 2008, at 9:41 PM, Patrick R. Michaud wrote: On Thu, Jul 17, 2008 at 02:20:33PM -0500, Chris Fields wrote: Okay, I'll set it up so "$foo = 'abcd'.match(/+/)" returns a Match object, and $/ would remain unset. Makes sense to me. Right now the match object i

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-17 Thread Chris Fields
On Jul 17, 2008, at 1:56 AM, Moritz Lenz wrote: Essentially the difference is that smart-match sets $/, while a simple call to .match probably should not. Pm I can have .match not set $/ for now and simply return matches based on context IMHO that's the wrong approach. Perl 6 tries not to

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-16 Thread Chris Fields
On Jul 16, 2008, at 5:45 PM, Chris Fields wrote: On Jul 16, 2008, at 1:28 PM, Patrick R. Michaud wrote: On Wed, Jul 16, 2008 at 11:20:28AM -0500, Chris Fields wrote: I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-16 Thread Chris Fields
On Jul 16, 2008, at 1:28 PM, Patrick R. Michaud wrote: On Wed, Jul 16, 2008 at 11:20:28AM -0500, Chris Fields wrote: I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue. The current version of match which works u

odd (lexical?) issue with Rakudo/Parrot

2008-07-16 Thread Chris Fields
I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue. The current version of match which works uses a tail call: .sub 'match' :method .param pmc x .return x.ACCEPTS(self) .end If I try the following: .sub 'match' :m

spaces and transliteration

2008-07-07 Thread Chris Fields
I am working on the transliteration method operator (trans()) for Rakudo and wanted to get some input on how character ranges are to be used. Should spaces be ignored in ranges like 'A .. Z'? Currently the implementation I have ignores those spaces but counts any other spaces as importan

spaces and transliteration

2008-07-07 Thread Chris Fields
I am working on the transliteration method operator (trans()) for Rakudo and wanted to get some input on how character ranges are to be used. Should spaces be ignored in ranges like 'A .. Z'? Currently the implementation I have ignores those spaces but counts any other spaces as importan

Re: Possible GC bug in Rakudo (parrot r27449, r27451)

2008-05-16 Thread Chris Fields
That also fixes the bus error I reported in rt: http://rt.perl.org/rt3/Public/Bug/Display.html?id=54004 I went ahead and closed that ticket out. jonathan++ Thanks! chris On May 16, 2008, at 7:01 AM, Jonathan Worthington wrote: Chris Fields wrote: There appears to be a possible GC-related

Possible GC bug in Rakudo (parrot r27449, r27451)

2008-05-12 Thread Chris Fields
There appears to be a possible GC-related bug introduced to Parrot prior to r27449 which is showing up in Rakudo. Using the following script (courtesy of Jonathan W): class Foo { has $.x; method boo { say $.x } } class Bar is Foo { method set($v) {