Re: Suggested magic for a .. b

2010-07-30 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/29/10 08:15 , Leon Timmermans wrote: On Thu, Jul 29, 2010 at 3:24 AM, Darren Duncan dar...@darrenduncan.net wrote: $foo ~~ $a..$b :QuuxNationality # just affects this one test I like that $bar = 'hello' :QuuxNationality # applies

Re: Suggested magic for a .. b

2010-07-30 Thread Leon Timmermans
On Thu, Jul 29, 2010 at 9:51 PM, Aaron Sherman a...@ajs.com wrote: My only strongly held belief, here, is that you should not try to answer any of these questions for the default range operator on unadorned, context-less strings. For that case, you must do something that makes sense for all

r31869 -[S26] corrected minor typos and inconsistencies

2010-07-30 Thread pugs-commits
Author: masak Date: 2010-07-30 18:15:01 +0200 (Fri, 30 Jul 2010) New Revision: 31869 Modified: docs/Perl6/Spec/S26-documentation.pod Log: [S26] corrected minor typos and inconsistencies Nothing that changes the meaning of the spec, really. Modified: docs/Perl6/Spec/S26-documentation.pod

r31878 -[S02, S32] kill off .notdef

2010-07-30 Thread pugs-commits
Author: masak Date: 2010-07-30 21:46:36 +0200 (Fri, 30 Jul 2010) New Revision: 31878 Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S32-setting-library/Basics.pod Log: [S02, S32] kill off .notdef Not cute with methods that do negatively defined things. And !*.defined covers the

Re: Array membership test?

2010-07-30 Thread Aaron Sherman
I may be misunderstanding something. I haven't really looked into list searching much, but there seem to be some very odd and unexpected results, here. On Thu, Jul 29, 2010 at 7:52 PM, Jonathan Worthington jonat...@jnthn.net wrote: my @x = 1,2,3; say ?...@x.grep(2); say ?...@x.grep(4); 1 0

Re: Array membership test?

2010-07-30 Thread yary
On Fri, Jul 30, 2010 at 2:22 PM, Aaron Sherman a...@ajs.com wrote: If you really want odd, try:  say [1,2,3].first: * === True; Result: 1 and  say [5,2,3].first: * === True; Result: Rakudo exits silently with no newline Looks like a side effect of True being implemented as an enum with

Re: Suggested magic for a .. b

2010-07-30 Thread Doug McNutt
Please pardon intrusion by a novice who is anything but object oriented. I consider myself a long time user of perl 5. I love it and it has completely replaced FORTRAN as my compiler of choice. Programming Perl is so dog-eared that I may need a replacement. I joined this list when I thought the

Smart match isn't on Bool

2010-07-30 Thread Aaron Sherman
In this code: given False { when True { say True } when False { Say False } default { say Dairy } } I don't think it's unreasonable to expect the output to be False. However, it actually outputs True. Why? Well, because it's in the spec that way. So... why is it in the spec that way? I

Re: Suggested magic for a .. b

2010-07-30 Thread Aaron Sherman
On Fri, Jul 30, 2010 at 6:45 PM, Doug McNutt dougl...@macnauchtan.com wrote: Please pardon intrusion by a novice who is anything but object oriented. No problem. Sometimes a fresh perspective helps to illuminate things. Skipping ahead... Are you guise sure that the ... and .. operators in

Re: Suggested magic for a .. b

2010-07-30 Thread Jon Lang
Aaron Sherman wrote: In the end, I'm now questioning the difference between a junction and a Range... which is not where I thought this would go. Conceptually, they're closely related. In particular, a range behaves a lot like an any() junction. Some differences: 1. An any() junction always