Re: split on empty string

2006-01-18 Thread David K Storrs
On Jan 18, 2006, at 1:18 AM, Jonathan Scott Duff wrote: On Tue, Jan 17, 2006 at 12:35:57PM -0500, Mark Reed wrote: On 2006-01-17 12:24 PM, Gaal Yahas [EMAIL PROTECTED] wrote: [split on empty string] doesn's seem to be specced yet. I would prefer the current pugs behavior; it's consistent

Re: split on empty string

2006-01-18 Thread Mark Reed
On 2006-01-18 10:04 AM, David K Storrs [EMAIL PROTECTED] wrote: Just to show opposite, I've always found that behavior (i.e. returning the original string unchanged) confusing. Csplit works based on sequential examination of the target string to locate matching substrings on which to split.

Re: split on empty string

2006-01-18 Thread Jonathan Lang
Mark Reed wrote: Perl6 .split(/whatever/) is equivalent to split(/whatever/,) in Perl5. I'm hoping that the perl 5 syntax will still be valid in perl 6. -- Jonathan Dataweaver Lang

Re: Indeterminate forms for the Num type.

2006-01-18 Thread Doug McNutt
At 09:38 +0800 1/18/06, Audrey Tang wrote: Also, would you be happy with different treatments of Int/Int versus Num/Num? 0/0 # fail illegal division by zero 0.0/0.0 # NaN I plead guilty. I was not aware that perl6 was going to allow types to be defined like int and float.

Re: Indeterminate forms for the Num type.

2006-01-18 Thread Larry Wall
On Wed, Jan 18, 2006 at 09:38:04AM +0800, Audrey Tang wrote: : Also, would you be happy with different treatments of Int/Int versus : Num/Num? : : 0/0 # fail illegal division by zero : 0.0/0.0 # NaN I'd like to point out that there's no reason in principle that a failure undef

Class methods vs. Instance methods

2006-01-18 Thread Rob Kinyon
Today on #perl6, Audrey, Stevan and I were talking about $repr. A tangent arose where Audrey said that the difference between class methods and instance methods was simply whether or not the body contained an attribute access. Is this true? If it is, then I think it violates polymorphism as

Re: split on empty string

2006-01-18 Thread Larry Wall
On Tue, Jan 17, 2006 at 07:24:14PM +0200, Gaal Yahas wrote: : While cleaning up tests for release: : : .split(':')= : :()# Perl 5 :(,) # pugs : : Which is correct? It doesn's seem to be specced yet. This has nothing to do with splitting on the empty

Re: split on empty string

2006-01-18 Thread Juerd
Jonathan Lang skribis 2006-01-18 7:26 (-0800): Mark Reed wrote: Perl6 .split(/whatever/) is equivalent to split(/whatever/,) in Perl5. I'm hoping that the perl 5 syntax will still be valid in perl 6. Don't worry, it is. Juerd -- http://convolution.nl/maak_juerd_blij.html

Re: split on empty string

2006-01-18 Thread Larry Wall
On Wed, Jan 18, 2006 at 09:08:07PM +0100, Juerd wrote: : Jonathan Lang skribis 2006-01-18 7:26 (-0800): : Mark Reed wrote: : Perl6 .split(/whatever/) is equivalent to split(/whatever/,) in Perl5. : I'm hoping that the perl 5 syntax will still be valid in perl 6. : : Don't worry, it is. Yep,

Re: Class methods vs. Instance methods

2006-01-18 Thread Larry Wall
On Wed, Jan 18, 2006 at 01:56:53PM -0500, Rob Kinyon wrote: : Today on #perl6, Audrey, Stevan and I were talking about $repr. A : tangent arose where Audrey said that the difference between class : methods and instance methods was simply whether or not the body : contained an attribute access. :

Um... this week's summary

2006-01-18 Thread The Perl 6 Summarizer
Unless Matt takes pity on me, and writes a summary at disgustingly high speed, there won't be a summary this week. Assorted things got in the way on Monday or Tuesday, and I'm now at my consulting gig 'til the end of the week with no time for summarizing. I'm really, really sorry. -- Piers

Re: Class methods vs. Instance methods

2006-01-18 Thread Matt Fowles
Larry~ On 1/18/06, Larry Wall [EMAIL PROTECTED] wrote: But I have a strong gut-feeling that over the long term it's going to be important to be able to view a given object as either a partially instantiated class or a partially undefined object, and for that we have to break down the false

Perl 6 OO and bless

2006-01-18 Thread Stevan Little
Hello All, In reading over the Synopsis again in hopes of finding more information regarding the different repr types (see the warnocked post entitled Construction and Initialization of repr types other than P6opaque), I stumbled onto some issues with the Perl 6 OO model and bless. In

Re: Perl 6 OO and bless

2006-01-18 Thread chromatic
On Wednesday 18 January 2006 14:13, Stevan Little wrote: Do we really still need to retain the old Perl 5 version of bless? What purpose does it serve that p6opaque does not do in a better/ faster/cleaner way? Interoperability with Perl 5 code. Now if you want to write a p6opaque - Perl 5

Re: Class methods vs. Instance methods

2006-01-18 Thread Rob Kinyon
On 1/18/06, Larry Wall [EMAIL PROTECTED] wrote: On Wed, Jan 18, 2006 at 01:56:53PM -0500, Rob Kinyon wrote: : Today on #perl6, Audrey, Stevan and I were talking about $repr. A : tangent arose where Audrey said that the difference between class : methods and instance methods was simply whether

Re: Perl 6 OO and bless

2006-01-18 Thread Rob Kinyon
On 1/18/06, chromatic [EMAIL PROTECTED] wrote: On Wednesday 18 January 2006 14:13, Stevan Little wrote: Do we really still need to retain the old Perl 5 version of bless? What purpose does it serve that p6opaque does not do in a better/ faster/cleaner way? Interoperability with Perl 5

Do chained comparisons short-circuit?

2006-01-18 Thread Joe Gottman
Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the chained comparison is known to be false after ++$x and ++$y are compared? Joe Gottman

Re: Perl 6 OO and bless

2006-01-18 Thread Stevan Little
On 1/18/06, chromatic [EMAIL PROTECTED] wrote: On Wednesday 18 January 2006 14:13, Stevan Little wrote: Do we really still need to retain the old Perl 5 version of bless? What purpose does it serve that p6opaque does not do in a better/ faster/cleaner way? Interoperability with Perl 5 code.

Re: Perl 6 OO and bless

2006-01-18 Thread chromatic
On Wednesday 18 January 2006 17:57, Rob Kinyon wrote: Well, for one thing, you can't write OO code in P5. I'll play your semantic game if you play my what-if game. I have a fair bit of Perl 5 code. Ponie works. I want to migrate my Perl 5 code to Perl 6 slowly. Everything new is Perl 6

Re: Perl 6 OO and bless

2006-01-18 Thread Rob Kinyon
On 1/18/06, chromatic [EMAIL PROTECTED] wrote: On Wednesday 18 January 2006 17:57, Rob Kinyon wrote: Well, for one thing, you can't write OO code in P5. I'll play your semantic game if you play my what-if game. I have a fair bit of Perl 5 code. Ponie works. I want to migrate my Perl 5

Re: Perl 6 OO and bless

2006-01-18 Thread chromatic
On Wednesday 18 January 2006 19:11, Rob Kinyon wrote: As for how that will be handled, I would think that it would be as follows: - in Perl6, objects created in another language will be treated as p6opaque (unless some other unbox is a more suitable $repr). ... and I specify this exactly

Re: Do chained comparisons short-circuit?

2006-01-18 Thread Luke Palmer
On 1/19/06, Joe Gottman [EMAIL PROTECTED] wrote: Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the chained comparison is known to be false after ++$x and ++$y

Re: Perl 6 OO and bless

2006-01-18 Thread Rob Kinyon
On 1/18/06, chromatic [EMAIL PROTECTED] wrote: On Wednesday 18 January 2006 19:11, Rob Kinyon wrote: As for how that will be handled, I would think that it would be as follows: - in Perl6, objects created in another language will be treated as p6opaque (unless some other unbox is a

Re: Perl 6 OO and bless

2006-01-18 Thread Rob Kinyon
On 1/18/06, chromatic [EMAIL PROTECTED] wrote: 1) by default, your object is opaque 2) if you don't want this, you can always use bless() For interoperability with Perl 5 classes, I don't want to use an opaque object. Ergo, I want to use bless() (or something, but does that explain why I

Re: Perl 6 OO and bless

2006-01-18 Thread Trey Harris
Excuse my ignorance of the finer points, but I thought the reason for bless's continued existence was so that the same sort of brilliant OO experimentation that Damian and others have done with pure Perl 5 can continue to be done in pure Perl 6 without having to hack p6opaque? Trey

Re: Perl 6 OO and bless

2006-01-18 Thread chromatic
On Wednesday 18 January 2006 19:39, Rob Kinyon wrote: No, you want to specify the $repr in CREATE(). But, p6hash will still not be the same as a ref to an HV. Frankly, I think you're better off letting Parrot mediate things the same way it would mediate Ruby and Perl6 or Perl5 and Python.

Re: Perl 6 OO and bless

2006-01-18 Thread Rob Kinyon
On 1/18/06, chromatic [EMAIL PROTECTED] wrote: On Wednesday 18 January 2006 19:39, Rob Kinyon wrote: No, you want to specify the $repr in CREATE(). But, p6hash will still not be the same as a ref to an HV. Frankly, I think you're better off letting Parrot mediate things the same way it

Re: Perl 6 OO and bless

2006-01-18 Thread Rob Kinyon
On 1/18/06, Trey Harris [EMAIL PROTECTED] wrote: Excuse my ignorance of the finer points, but I thought the reason for bless's continued existence was so that the same sort of brilliant OO experimentation that Damian and others have done with pure Perl 5 can continue to be done in pure Perl 6

Re: Perl 6 OO and bless

2006-01-18 Thread John Siracusa
On 1/18/06 11:06 PM, Rob Kinyon wrote: Not to mention that 90% of the hacking done in Class:: and Object:: will handled by the fact that Perl6 has actual OO syntax. (Look Ma, no hands!) You won't need Class::MakeMethods because Perl6 will make your accessors for you. There's more to life than

Re: Perl 6 OO and bless

2006-01-18 Thread Stevan Little
On Jan 18, 2006, at 10:41 PM, Trey Harris wrote: Excuse my ignorance of the finer points, but I thought the reason for bless's continued existence was so that the same sort of brilliant OO experimentation that Damian and others have done with pure Perl 5 can continue to be done in pure

Re: Do chained comparisons short-circuit?

2006-01-18 Thread Ph. Marek
On Thursday 19 January 2006 04:25, Luke Palmer wrote: On 1/19/06, Joe Gottman [EMAIL PROTECTED] wrote: Suppose I have code that looks like this: my ($x, $y, $z) = (1, 2, 3); say sorted backward if ++$x ++$y ++$z; Will $z be incremented even though the