Re: Suggested magic for a .. b

2010-07-21 Thread Smylers
Jon Lang writes: Approaching this with the notion firmly in mind that infix:.. is supposed to be used for matching ranges while infix:... should be used to generate series: With series, we want C $LHS ... $RHS to generate a list of items starting with $LHS and ending with $RHS. If $RHS

Re: Suggested magic for a .. b

2010-07-21 Thread Jon Lang
Smylers wrote: Jon Lang writes: Approaching this with the notion firmly in mind that infix:.. is supposed to be used for matching ranges while infix:... should be used to generate series: With series, we want C $LHS ... $RHS to generate a list of items starting with $LHS and ending with

Re: Suggested magic for a .. b

2010-07-21 Thread Mark J. Reed
Ok, I find that surprising (and counter to current Rakudo behavior), but thanks for the correction, and sorry about the misinformation. On Wednesday, July 21, 2010, Larry Wall la...@wall.org wrote: On Tue, Jul 20, 2010 at 11:53:27PM -0400, Mark J. Reed wrote: : In particular, consider that pi

Re: Suggested magic for a .. b

2010-07-21 Thread Mark J. Reed
Strike the counter to current Rakudo behavior bit; Rakudo is behaving as specified in this instance. I must have been hallucinating. On Wed, Jul 21, 2010 at 7:33 AM, Mark J. Reed markjr...@gmail.com wrote: Ok, I find that surprising (and counter to current Rakudo behavior), but thanks for the

Re: Suggested magic for a .. b

2010-07-21 Thread Larry Wall
On Wed, Jul 21, 2010 at 09:23:11AM -0400, Mark J. Reed wrote: : Strike the counter to current Rakudo behavior bit; Rakudo is : behaving as specified in this instance. I must have been : hallucinating. Well, except that we both neglected precedence. Since ... is looser than ~~, it must be

Re: Suggested magic for a .. b

2010-07-21 Thread Aaron Sherman
On Wed, Jul 21, 2010 at 1:28 AM, Aaron Sherman a...@ajs.com wrote: For reference, this is the relevant section of the spec: Character positions are incremented within their natural range for any Unicode range that is deemed to represent the digits 0..9 or that is deemed to be a complete

multi-character ranges

2010-07-21 Thread Aaron Sherman
[changing the subject because it's now clear we have two different discussions on our hands. I think we're at or closing in on a consensus for a .. z, and this discussion is aa .. bb] On Wed, Jul 21, 2010 at 1:56 AM, Darren Duncan dar...@darrenduncan.netwrote: Aaron Sherman wrote: 2) The spec

Re: Suggested magic for a .. b

2010-07-21 Thread Darren Duncan
Larry Wall wrote: On Tue, Jul 20, 2010 at 11:53:27PM -0400, Mark J. Reed wrote: : In particular, consider that pi ~~ 0..4 is true, : because pi is within the range; but pi ~~ 0...4 is false, because pi : is not one of the generated elements. Small point here, it's not because pi is fractional:

Re: Suggested magic for a .. b

2010-07-21 Thread Mark J. Reed
On Wed, Jul 21, 2010 at 3:55 PM, Darren Duncan dar...@darrenduncan.net wrote: Larry Wall wrote: On Tue, Jul 20, 2010 at 11:53:27PM -0400, Mark J. Reed wrote: : In particular, consider that pi ~~ 0..4 is true, :  because pi is within the range; but pi ~~ 0...4 is false, because pi : is not

Re: multi-character ranges

2010-07-21 Thread Jon Lang
Aaron Sherman wrote: Darren Duncan wrote: 3) It seems that there are two competing multi-character approaches and both seem somewhat valid. Should we use a pragma to toggle behavior between A and B:  A: aa .. bb contains az  B: aa .. bb contains ONLY aa, ab, ba and bb I would find A to

Re: multi-character ranges

2010-07-21 Thread yary
On Wed, Jul 21, 2010 at 3:47 PM, Jon Lang datawea...@gmail.com wrote: ... When comparing two strings, establishing an order between them is generally straightforward as long as both are composed of letters from the same alphabet and with the same case; but once you start mixing cases,