Re: Dallas.p6m

2009-03-19 Thread Graham Barr
On Mar 18, 2009, at 5:26 PM, fREW Schmidt wrote: s1n and I decided that we would start Dallas.p6m as we are close to each other geographically speaking. We are meeting tomorrow (Thursday, March 19, 7:00PM) at a coffee shop with free wifi. The address is 985 W Bethany Dr Allen, TX 75013.

Re: Temporal changes

2009-02-24 Thread Graham Barr
On Feb 23, 2009, at 3:56 PM, mark.a.big...@comcast.net wrote: Instant Moment Point PointInTime Timestamp Event Jiffy Time Juncture

Re: WTF? - Re: method calls on $self

2005-07-15 Thread Graham Barr
On Thu, July 14, 2005 10:47 am, Autrijus Tang said: > If this were a straw poll, I'd say... > > 1. Meaning of $_ > > .method should mean $_.method always. Making it into a runtime > error is extremely awkward; a compile-time error with detailed > explanataion is acceptable but suboptim

Re: Open and pipe

2005-05-05 Thread Graham Barr
On May 4, 2005, at 8:13 AM, Uri Guttman wrote: AS> Why? Because IO::Socket.new takes parameters that are built out of its AS> entire inheritance tree, so a change to IO::Handle might radically AS> modify the signature of the constructor. makes sense. we should look at the p5 IO:: tree and

Re: use English

2005-04-28 Thread Graham Barr
On Apr 27, 2005, at 6:39 AM, Aaron Sherman wrote: On Tue, 2005-04-26 at 10:48, Luke Palmer wrote: Aaron Sherman writes: The reasons I don't "use English" in P5: * Variable access is slower Hmm, looks to me like $INPUT_RECORD_SEPARATOR is faster. (Actually they're the same: on each run a di

Re: Return with no expression

2004-08-24 Thread Graham Barr
On 24 Aug 2004, at 22:14, Aaron Sherman wrote: You don't HAVE to use auto-topicalization. You CAN always write it long-hand if you find that confusing: for @words -> $word { given ($chars($word) > 70) -> $toolong { say abbreviate($word) ?? $word;

Re: Multimethod dispatch?

2003-06-03 Thread Graham Barr
On Mon, Jun 02, 2003 at 10:34:14AM -0600, Luke Palmer wrote: > What it seems you're wanting is it to be in the core. And I'm saying > that's irrelavent. There are thousands of great ideas out there, and > they can't all fit into Perl's core. That's why there's thousands of > modules on CPAN. H

Re: L2R/R2L syntax

2003-01-21 Thread Graham Barr
On Tue, Jan 21, 2003 at 09:20:04AM -0800, Michael Lazzaro wrote: > > On Tuesday, January 21, 2003, at 02:04 AM, Graham Barr wrote: > > If the function form of map/grep were to be removed, which has been > > suggested, > > and the <~ form maps to methods. How wo

Re: L2R/R2L syntax

2003-01-21 Thread Graham Barr
On Mon, Jan 20, 2003 at 07:27:56PM -0700, Luke Palmer wrote: > > What benefit does C<< <~ >> bring to the language? > > Again, it provides not just a "null operator" between to calls, but > rather a rewrite of method call syntax. So: > > map {...} <~ grep {...} <~ @boing; > > is not: > > m

Re: L2R/R2L syntax

2003-01-17 Thread Graham Barr
On Fri, Jan 17, 2003 at 06:21:43PM +, Simon Cozens wrote: > [EMAIL PROTECTED] (Mr. Nobody) writes: > > I have to wonder how many people actually like this syntax, and how many only > > say they do because it's Damian Conway who proposed it. And map/grep aren't > > "specialized syntax", you coul

Re: purge: opposite of grep

2002-12-06 Thread Graham Barr
On Fri, Dec 06, 2002 at 09:33:14AM -0500, Miko O'Sullivan wrote: > For example, suppose I want to separate a list of people into people who > have never donated money and those who have. Assuming that each person > object has a donations property which is an array reference, I would want > to clas

Re: [RFC] Perl6 HyperOperator List

2002-10-31 Thread Graham Barr
On Thu, Oct 31, 2002 at 12:16:34PM +, [EMAIL PROTECTED] wrote: > Yesterday Aaron Crane wrote: > > > Jonathan Scott Duff writes: > > > > > @a `+ @b > > > > In my experience, many people actually don't get the backtick > > character at all. > > Yes. I think that might be a good reason _for_

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:57:00PM -0800, Dave Storrs wrote: > *shrug* You may not like the aesthetics, but my point still > stands: "is rw" is too long for something we're going to do fairly often. I am not so sure. If I look back through a lot of my code, there are more cases where I use

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: > --- Larry Wall <[EMAIL PROTECTED]> wrote: > > > Do these French quotes come through? > > > > @a «+» @b Odd, I see them in this message. But In the message from Larry I see ?'s Graham.

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > unary (prefix) operators: > >\ - reference to >* - list flattening >? - force to bool context >! - force to bool context, negate >not - force to bool context, negate >+ - force to numer

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Graham Barr
On Mon, Oct 28, 2002 at 03:30:54PM -0600, Jonathan Scott Duff wrote: > On Mon, Oct 28, 2002 at 01:19:05PM -0800, Michael Lazzaro wrote: > > > > On Monday, October 28, 2002, at 01:09 PM, Larry Wall wrote: > > > No. "unless" reads well in English. How do your read $a ! $b ! $c? > > > > "nor"? M

Re: Private contracts?

2002-10-12 Thread Graham Barr
On Fri, Oct 11, 2002 at 05:50:55PM -0700, Larry Wall wrote: > On Sat, 5 Oct 2002, Allison Randal wrote: > : use Acme::N-1_0; # or whatever the format of the name is > > I don't see why it couldn't just be: > > use Acme::1.0; I agree thats better. But why not separate the version more by

Re: auto deserialization

2002-09-02 Thread Graham Barr
On Sat, Aug 31, 2002 at 01:52:18PM +, Damian Conway wrote: > I'd suggest that redundancy in syntax is often a good thing and > that there's nothing actually wrong with: > > my Date $date = Date.new('June 25, 2002'); I would say it is not always redundant to specify the type on both sid

Re: perl6-language@perl.org

2002-08-01 Thread Graham Barr
On Thu, Aug 01, 2002 at 06:02:14PM -0400, Miko O'Sullivan wrote: > This is a small collection of ideas for the Perl6 language. Think of this > posting as a light and refreshing summer fruit salad, composed of three > ideas to while away the time during this August lull in perl6-language. > > >

Re: [PRE-RELEASE] Release of 0.0.7 tomorrow evening

2002-07-22 Thread Graham Barr
On Mon, Jul 22, 2002 at 11:14:15AM +0100, Sam Vilain wrote: > "Sean O'Rourke" <[EMAIL PROTECTED]> wrote: > > > languages/perl6/README sort of hides it, but it does say that "If you have > > Perl <= 5.005_03, "$a += 3" may fail to parse." I guess we can upgrade > > that to "if you have < 5.6, you

Re: FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-07 Thread Graham Barr
On Tue, May 07, 2002 at 12:27:08PM -0500, Allison Randal wrote: > On Tue, May 07, 2002 at 03:15:48PM +0100, Graham Barr wrote: > > > > LAST Executes on implicit loop exit or call to last() > > Loop variables may be unknown > > Not exactly "unknown".

FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-07 Thread Graham Barr
I have been following this thread, but I would just like to inject a summary of the various related UPPERCASE blocks PREExecutes on block entry. Loop variables are in a known state POST Executes on block exit. Loop variables are in a known state NEXT Executes on impli

Re: // in Perl 5.8?

2002-05-01 Thread Graham Barr
On Wed, May 01, 2002 at 01:53:24PM -0700, Brent Dax wrote: > Graham Barr: > # On Wed, May 01, 2002 at 12:17:52PM -0700, David Wheeler wrote: > # > On 5/1/02 12:11 PM, "Brent Dax" <[EMAIL PROTECTED]> claimed: > # > > # > > It's far too late to make

Re: // in Perl 5.8?

2002-05-01 Thread Graham Barr
On Wed, May 01, 2002 at 12:17:52PM -0700, David Wheeler wrote: > On 5/1/02 12:11 PM, "Brent Dax" <[EMAIL PROTECTED]> claimed: > > > It's far too late to make it into 5.8, but it looks like it'll be in > > 5.10 when that comes out (in a year or two). > > I figured. Too bad. ;-) A year or two is l

Re: // in Perl 5.8?

2002-04-17 Thread Graham Barr
On Wed, Apr 17, 2002 at 01:09:43PM -0700, David Wheeler wrote: > Anyone know what the chances are that some enterprising C hacker > can/will/did get the // and //= operator into Perl 5.8? Seems like it > wouldn't be a huge deal to add, and I'd love to have it sooner rather than > later. It is not

Re: How to default? (was Unary dot)

2002-04-12 Thread Graham Barr
On Fri, Apr 12, 2002 at 09:26:45AM +0100, Piers Cawley wrote: > Trey Harris <[EMAIL PROTECTED]> writes: > > > I think I've missed something, even after poring over the archives for > > some hours looking for the answer. How does one write defaulting > > subroutines a la builtins like print() and

Re: Unary dot

2002-04-10 Thread Graham Barr
On Wed, Apr 10, 2002 at 01:35:22PM -0400, Mark J. Reed wrote: > On Wed, Apr 10, 2002 at 10:30:25AM -0700, Glenn Linderman wrote: > > method m1 > > { > >m2; # calls method m2 in the same class > Yes, but does it call it as an instance method on the current invocant > or as a class method with

Re: Some Apocalypse 4 exception handling questions.

2002-01-23 Thread Graham Barr
On Wed, Jan 23, 2002 at 02:25:35PM -0800, Glenn Linderman wrote: > I think you just said the same thing I did. To be more explicit, using > the terminology you seem to want to use, I'll point out that I was only > talking about the case of an inherited method, not a _replacement_ > method. In ot

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 01:38:39PM -0800, Larry Wall wrote: > Graham Barr writes: > : On Mon, Jan 21, 2002 at 01:01:09PM -0800, Larry Wall wrote: > : > Graham Barr writes: > : > : But are we not at risk of introducing another form of > : > : > : > : my

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 01:01:09PM -0800, Larry Wall wrote: > Graham Barr writes: > : But are we not at risk of introducing another form of > : > : my $x if 0; > : > : with > : > : if my $one = { > : ... > : } > : elsif my $two

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 03:58:49PM -0500, Michael G Schwern wrote: > On Mon, Jan 21, 2002 at 03:43:07PM -0500, Damian Conway wrote: > > Casey wrote: > > > > > So you're suggesting that we fake lexical scoping? That sounds more > > > icky than sticking to true lexical scoping. A block dictates s

Re: Apoc4: The loop keyword

2002-01-21 Thread Graham Barr
On Mon, Jan 21, 2002 at 12:50:38PM -0800, Larry Wall wrote: > : What's the chance that it could be considered so? > > In most other languages, you wouldn't even have the opportunity to put > a declaration into the conditional. You'd have to say something like: > > my $line = <$in>; >

Re: [A-Z]+\s*\{

2002-01-20 Thread Graham Barr
On Sun, Jan 20, 2002 at 05:29:39AM -0800, Damian Conway wrote: > On Saturday 19 January 2002 22:05, Brent Dax wrote: > > > Is this list of special blocks complete and correct? > > Close and close. As of two days ago, Larry's thinking was: > > BEGIN Executes at the beginning of co

Re: Apropos of nothing...

2001-12-13 Thread Graham Barr
On Fri, Dec 14, 2001 at 06:39:02AM +1100, Damian Conway wrote: > >> In the following code fragment, what context is foo() in? >> >> @ary[0] = foo() > > Scalar context. @ary[0] is a single element of @ary. > > To call foo() in list context use any of the following: > > (@

Re: flex perl mess

2001-10-24 Thread Graham Barr
On Wed, Oct 24, 2001 at 09:06:14AM -0400, Aaron Sherman wrote: > On Tue, Oct 23, 2001 at 02:53:19PM +0200, Nadim Khemir wrote: > > > > Don't we already have that in Perl 5? > > > > > > if ( /\G\s+/gc ) {# whitespaces } > > >elsif ( /\G[*/+-]/gc ) { # operator } > > >elsif (

Re: NaN semantics

2001-10-09 Thread Graham Barr
On Tue, Oct 09, 2001 at 04:39:47PM +1000, Damian Conway wrote: > Sigh. I *do* see your point of view (Laziness), but I still have immense > difficulty with the notion that: > > $x == NaN > > doesn't return true if $x contains NaN. I agree. The difficulty I have is that it is the compari

Re: A3, the ';' operator, and hyper-operators

2001-10-04 Thread Graham Barr
On Wed, Oct 03, 2001 at 11:26:17PM -0500, Jonathan Scott Duff wrote: > On Thu, Oct 04, 2001 at 01:24:13PM +1000, Damian Conway wrote: > > >From E3: > > > > The doubling also helps it stand out better in code, in part > > because it forces you to put space around the C<::> so that

Re: explicitly declare closures???

2001-08-21 Thread Graham Barr
On Tue, Aug 21, 2001 at 09:21:35AM -0400, Eric Roode wrote: > John Porter wrote: > > > >Dave Mitchell wrote: > >> ie by default lexicals are only in scope in their own sub, not within > >> nested subs - and you have to explicitly 'import' them to use them. > > > >No. People who write closures kno

Re: Per-object inheritance in core a red herring?

2001-07-02 Thread Graham Barr
On Fri, Jun 29, 2001 at 08:59:59AM -0400, John Porter wrote: > Michael G Schwern wrote: > > Second, and perhaps more importantly, we can do this perfectly well > > with a module. No hacks, no tricks, no filters. > > Class::Object uses the mini-class technique (ie. auto-generated > > classes > >

Re: Coupla Questions

2001-06-12 Thread Graham Barr
On Mon, Jun 11, 2001 at 10:39:51PM -0500, David L. Nicol wrote: > Hopefully, we'll get a "with" operator and everything: > > with %database.$accountnumber { > > .interestearned += $interestrate * .balance > > } > > anything short of that, in my opinion, is merely trad

Re: suggested properties of operator results

2001-06-11 Thread Graham Barr
On Mon, Jun 11, 2001 at 01:42:53PM +0100, Simon Cozens wrote: > On Mon, Jun 11, 2001 at 01:31:36PM +0100, Graham Barr wrote: > > On Mon, Jun 11, 2001 at 01:34:49AM -0700, Chris Hostetter wrote: > > >$input = 4; > > >$bool = $input < 22;# $bool = 1 is

Re: suggested properties of operator results

2001-06-11 Thread Graham Barr
On Mon, Jun 11, 2001 at 01:34:49AM -0700, Chris Hostetter wrote: > > For the record, bwarnock pointed out to me that damian allready proposed > this behavior in RFC 25... > > http://dev.perl.org/rfc/25.html > > That RFC doesn't suggest having the comparison operators set properties > on t

Re: Coupla Questions

2001-06-07 Thread Graham Barr
On Thu, Jun 07, 2001 at 08:15:46AM +0100, Simon Cozens wrote: > On Wed, Jun 06, 2001 at 07:21:29PM -0500, David L. Nicol wrote: > > Damian Conway wrote: > > > $ref.{a}can be $ref{a} > > which can also be > > $ref.a > > Dereferencing a hashref is the same as accessing

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 01:17:45AM +0100, Simon Cozens wrote: > On Thu, Jun 07, 2001 at 12:24:50AM +0100, Graham Barr wrote: > > Can someone post a few ? I am open to what are the pros/cons > > but right now my mind is thinking " Whats the benefit of making > > $a=

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Wed, Jun 06, 2001 at 04:01:24PM -0700, Larry Wall wrote: > [EMAIL PROTECTED] writes: > :> What should $foo = (1,2,3) do now? Should it be the same as what > :> $foo = [1,2,3]; did in Perl 6? (This is assuming that $foo=@INC does what > :> $foo = \@INC; does now.) Putting it another

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 07:59:31AM +1000, Damian Conway wrote: >> But with the above you still have abiguity, for example what does this do >> >> $bar =~ /$foo.colour($xyz)/; > > "Looks like a method call with parens, so *is* a method call with parens." > > >> I may

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 07:43:55AM +1000, Damian Conway wrote: > >> >> So, to match $foo's colour against $bar, I'd say >> >> >> >> $bar =~ /$foo.colour/; >> > >> > No, you need the sub call parens as well: >> > >> > $bar =~ /$foo.colour()/;

Re: Coupla Questions

2001-06-06 Thread Graham Barr
On Thu, Jun 07, 2001 at 06:37:26AM +1000, Damian Conway wrote: > >> So, to match $foo's colour against $bar, I'd say >> >> $bar =~ /$foo.colour/; > > No, you need the sub call parens as well: > > $bar =~ /$foo.colour()/; Hm, I thought Larry said you would need to use

Re: properties

2001-05-22 Thread Graham Barr
On Tue, May 22, 2001 at 12:29:33PM +1000, Damian Conway wrote: >> if so, then wouldn't it be safer to put properties inside a special object >> associated with each object (the 'traits' object) so there would be little >> namespace collision? > > We actually want the possibility of th

Re: properties

2001-05-21 Thread Graham Barr
On Sun, May 20, 2001 at 06:19:35PM -0400, Uri Guttman wrote: > > "DC" == Damian Conway <[EMAIL PROTECTED]> writes: > > > DC> return undef Because($borked); > > hmm, that is poor code as returning a real undef will break in a list > context. I always balk when I see someone say th

Re: properties

2001-05-21 Thread Graham Barr
On Sun, May 20, 2001 at 01:24:29PM +0100, Simon Cozens wrote: > On Sun, May 20, 2001 at 12:46:35AM -0500, Jonathan Scott Duff wrote: > > my $a is true = 0; # variable property > > my $a = 0 is true; # variable property > > my ($a) = 0 is true;# val

Re: 'is' and action at a distance

2001-05-19 Thread Graham Barr
On Sat, May 19, 2001 at 06:41:29PM +1000, Damian Conway wrote: > > Graham wrote: > >> On Fri, May 18, 2001 at 10:36:59PM -0400, John Siracusa wrote: >> > > print keys $foo.prop; # prints "NumberHeard" >> > > print values $foo.prop; # prints "loneliestever" >> >

Re: 'is' and action at a distance

2001-05-19 Thread Graham Barr
On Fri, May 18, 2001 at 10:36:59PM -0400, John Siracusa wrote: > > print keys $foo.prop; # prints "NumberHeard" > > print values $foo.prop; # prints "loneliestever" This is an example of one of my concerns about namespace overlap with methods. What would happen if there was a me

Re: 'is' and action at a distance

2001-05-18 Thread Graham Barr
On Fri, May 18, 2001 at 08:31:21AM -0500, Jarkko Hietaniemi wrote: > On Fri, May 18, 2001 at 06:22:10AM -0700, Austin Hastings wrote: > > > > --- Damian Conway <[EMAIL PROTECTED]> wrote: > > > > > It's probably just a matter of coding what you actually mean. > > > In Perl 5 and 6 your version

Re: 'is' and action at a distance

2001-05-18 Thread Graham Barr
On Fri, May 18, 2001 at 03:01:38PM +1000, Damian Conway wrote: >> Also, what's the difference between a 'property' and an >> 'attribute', ie, are: >> >>$fh is true; >> >> and >> >>$fh.true(1); >> >> synonyms? > > No. The former means: > >

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 02:51:08PM -0500, Me wrote: > > survey ? I never saw any survey, > > It was an informal finger-in-the-wind thing I sent to > a perl beginners list. Nothing special, just a quick > survey. > > http://www.self-reference.com/cgi-bin/perl6plurals.pl As someone else pointed

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:58:31PM -0400, John Porter wrote: > Graham Barr wrote: > > As I said in another mail, consider > > $bar[$foo]; > > $bar{$foo}; > > But if @bar is known to be one kind of array or > the other, where is the ambiguosity that that is >

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:41:24PM -0400, John Porter wrote: > Damian Conway wrote [and John Porter reformats]: > > > > @bar[$foo]; # Access element int($foo) of array @bar > > %bar{$foo}; # Access entry "$foo" of hash %bar > > @bar{$foo}; # Syntax error > > %bar[$foo]; # Syntax error > > And w

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 03:23:56PM -0400, Buddha Buck wrote: > At 08:10 PM 05-14-2001 +0100, Graham Barr wrote: > >On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote: > > > > Hm, OK. What does this access and using what method ? > > > > > >

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote: > > Hm, OK. What does this access and using what method ? > > > > $foo = '1.2'; > > @bar[$foo]; > > This is an argument against conflating @ and %. No it is not. > It has nothing to do with using [] instead of {}. Yes it does. I was aski

Re: what I meant about hungarian notation

2001-05-14 Thread Graham Barr
On Mon, May 14, 2001 at 12:32:37PM -0500, Me wrote: > > an ordered hash is common > > Arrays too. > > > > not wise ... to alter features just for beginners. > > Agreed. > > > > (PS 11 people isn't a statistic, its a night at the pub) > > Your round... > > > The extra complexi

Re: Perl, the new generation

2001-05-10 Thread Graham Barr
On Thu, May 10, 2001 at 07:40:04PM -0500, Jarkko Hietaniemi wrote: > > or some such, unless the purpose of the local(*foo) could be determined > > by unscrupulous means. Similarly, glob aliases *foo = *bar would > > need special treatment. > > By far most of my use of typeglobs is making aliases

Re: what I meant about hungarian notation

2001-05-09 Thread Graham Barr
On Wed, May 09, 2001 at 02:04:40PM -0400, John Porter wrote: > Simon Cozens wrote: > > A scalar's a thing. > > Just as the index into a multiplicity is a thing. Yes, but as Larry pointed out. Knowing if the index is to be treated as a number or a string has some advantages for optimization Gra

Re: Apoc2 - Context and variables

2001-05-07 Thread Graham Barr
On Mon, May 07, 2001 at 05:35:53PM -0400, John Porter wrote: > Edward Peschko wrote: > > If > > %a = @b; > > does > > %c = map{ ($_ => undef ) } @a; > > Yep... particularly considering something neat like > > keys(%a) = @b; And what is wrong with @a{@b} = (); which I use all th

Re: Apoc2 - concerns

2001-05-04 Thread Graham Barr
On Sat, May 05, 2001 at 02:46:46AM +0100, Michael G Schwern wrote: > On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: > > I'm wondering what this will do? > > > >$thingy = $STDIN; > > > > This seems to have two possibilities: > > > >1. Make a copy of $STDIN > > > >2. R

Re: Apoc2 - concerns

2001-05-04 Thread Graham Barr
On Fri, May 04, 2001 at 07:56:39PM -0700, Larry Wall wrote: > Nathan Wiger writes: > : > : This one. I see a filehandle in *boolean* context meaning "read to $_", > : > : just like the current "while ()" magic we all know and occasionally > : > : love. I'd expect $FOO.readln (or something less Pas

Re: Please make "last" work in "grep"

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 06:29:51PM +0200, Bart Lateur wrote: > On Wed, 2 May 2001 17:05:31 +0100, Graham Barr wrote: > > >wantarray-ness is already passed along the call stack today. Thats > >the whole point of it. So what is the difference in passing a number >

Re: Please make "last" work in "grep"

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 12:01:24PM -0400, Uri Guttman wrote: > >>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes: > > GB> On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote: > >> On Wed, May 02, 2001 at 08:05:29AM -0700,

Re: Please make "last" work in "grep"

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 04:30:07PM +0100, Michael G Schwern wrote: > On Wed, May 02, 2001 at 08:05:29AM -0700, Larry Wall wrote: > > Michael G Schwern writes: > > : (grep {...} @stuff)[0] will work, but its inelegant. > > > > It's inelegant only because the slice doesn't know how to tell the > >

Re: Please make "last" work in "grep"

2001-05-02 Thread Graham Barr
On Wed, May 02, 2001 at 11:10:22AM +0100, Michael G Schwern wrote: > On Wed, May 02, 2001 at 11:13:13AM +0200, Alexander Farber (EED) wrote: > > I would like to propose adding the "last" statement > > to the "grep", which currently doesn't work: > > For the record, I have no problem with this. :)

Re: Lvaluability

2001-04-27 Thread Graham Barr
On Sat, Apr 28, 2001 at 03:11:08AM +0100, Simon Cozens wrote: > substr($foo, 1, 3) = "hi!"; # We all know this. > splice(@foo, 1, 3) = @bar; # But the lack of this seems asymmetric An originally we had splice(@foo, 1, 3, @bar); but not substr($foo, 1, 3, "hi!"); which are more useful, IM

Re: a modest proposal Re: s/./~/g

2001-04-26 Thread Graham Barr
On Thu, Apr 26, 2001 at 03:35:24AM +, Fred Heutte wrote: > Bart Lateur's response summarizes well what I've heard so far > from responses both to the list and privately: > > (1) Yes, ~ *is* somewhat used in its current role as the bitwise > negation (complement) operator. > > (2) No, t

Re: a modest proposal Re: s/./~/g

2001-04-25 Thread Graham Barr
On Wed, Apr 25, 2001 at 06:19:40PM +, Fred Heutte wrote: > It seems to me that ~ relates to forces (operators, functions and methods) > more than to atoms (scalars), so to speak. It's the curve of binding Perl > at work here. > > So why not leave . alone and have ~ substitute for -> >

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-25 Thread Graham Barr
On Wed, Apr 25, 2001 at 06:46:20PM +0100, Simon Cozens wrote: > On Mon, Apr 23, 2001 at 12:59:54PM -0700, Nathan Wiger wrote: > > > Doesn't ~ look like a piece of string to you? :-) > > It looks like a bitwise op to me, personally. > > That's because every time you've used it in Perl, it's been

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 05:19:22PM -0700, Larry Wall wrote: > At the moment I'm leaning toward ^ for concat, and ~ for xor. That I think that would lead to confusion too. In many languages ^ is xor and ~ is a bitwise invert. It is that way in perl now too, so perl is already quite standard in t

Re: Tying & Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 01:23:43PM -0600, Nathan Torkington wrote: > Larry Wall writes: > > wanted, you still get the length. If you're worried about the delayed > > operation, you can force numeric context with $x = +@tmp;, just as you > > can force string context with a unary ~. > > How often

Re: s/./~/g

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 01:16:57PM -0700, Larry Wall wrote: > Branden writes: > : I'm starting to be a bit worried with what I'm reading... > : > : 1) Use $obj.method instead of $obj->method : > : > : The big question is: why fix what is not broken? Why introduce Javaisms and > : VBisms to our

Re: Tying & Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 11:40:50AM -0700, Larry Wall wrote: > I do expect that @() and $() will be used for interpolating list and > scalar expressions into strings, and it is probably the case the $() > would be a synonym for scalar(). @() would then be a synonym for > the mythical list() operat

Re: Tying & Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 12:36:47PM -0400, Dan Sugalski wrote: > At 02:52 PM 4/23/2001 +0200, Davíð Helgason wrote: > >"H.Merijn Brand" wrote: > > > > > > > > $a = $b ~ $c; # Mmm! > > > > > > > > > > I like that last one a lot, because it doesn't disturb anything. > > > > > You'd have to alter ~'s

Re: Tying & Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 02:31:55PM +0200, H.Merijn Brand wrote: > On Mon, 23 Apr 2001 13:19:24 +0100, Graham Barr <[EMAIL PROTECTED]> wrote: > > > $a = $b ~ $c; # Mmm! > > > > > > I like that last one a lot, because it doesn't disturb anything. > &g

Re: Tying & Overloading

2001-04-23 Thread Graham Barr
On Mon, Apr 23, 2001 at 01:02:50PM +0100, Simon Cozens wrote: > > Or we change the concatenation operator. > > $a = $b & $c; # Do people really use Perl for bit fiddling? Yes, all the time. > $a = $b # $c; /* Urgh */ > > $a = $b ~ $c; # Mmm! > > I like that last one a lot, because it doesn'

Re: Larry's Apocalypse 1

2001-04-06 Thread Graham Barr
On Fri, Apr 06, 2001 at 03:52:47PM +0100, Simon Cozens wrote: > On Fri, Apr 06, 2001 at 03:48:11PM +0100, Graham Barr wrote: > > > > > > Although Gisle's recent patch changes this for "do" at least. > > > > Hm, I did not see that. Can someone expl

Re: Larry's Apocalypse 1

2001-04-06 Thread Graham Barr
On Fri, Apr 06, 2001 at 01:31:40PM +0200, Paul Johnson wrote: > On Fri, Apr 06, 2001 at 10:01:47AM +0100, Graham Barr wrote: > > > unless (defined wantarray) { > > # Self Test > > } > > > > This works because whenever a file is use'd, require'

Re: Larry's Apocalypse 1

2001-04-06 Thread Graham Barr
On Thu, Apr 05, 2001 at 10:10:47PM +0100, Michael G Schwern wrote: > > Then it might be easier to write modules that are testable without a test > > driver. If you run the module directly, some distinguished block of code > > could be executed that wouldn't be if the module were "included" via >

Re: Schwartzian Transform

2001-03-28 Thread Graham Barr
On Wed, Mar 28, 2001 at 09:13:01AM -0500, Mark-Jason Dominus wrote: > > > So you can say > > > > use Memoize; > > # ... > > memoize 'f'; > > @sorted = sort { my_compare(f($a),f($b)) } @unsorted > > > > to get a lot of the effect of the S word. > > Yes, and of course the inline version

Re: End-of-scope actions: Background.

2001-02-20 Thread Graham Barr
On Tue, Feb 20, 2001 at 03:49:13AM +, Simon Cozens wrote: > On Mon, Feb 12, 2001 at 01:58:35PM -0700, Tony Olekshy wrote: > > Hi, it's me again, the guy who won't shut up about exception handling. > > I'm trying, > > I'm catching. And I'm thowing (up :) Graham.

Re: Autovivification behavior

2000-12-23 Thread Graham Barr
This has been discussed on p5p many many times. And many times I have agreed with what you wrote. However one thing you did not mention, but does need to be considered is func($x{1}{2}{3}) at this point you do not know if this is a read or write access as the sub could do $_[0] = 'fred'. If th

Re: RFC 357 (v1) Perl should use XML for documentation instead of POD

2000-10-03 Thread Graham Barr
On Mon, Oct 02, 2000 at 12:58:37PM -0700, Damien Neil wrote: > What? I don't think people should be writing either XML or HTML > as the source documentation format. I said that, quite clearly. Then what are they going to write it in ? And don't tell me to get some fangle dangled editor. Which w

Re: RFC 357 (v1) Perl should use XML for documentation instead of POD

2000-10-03 Thread Graham Barr
On Mon, Oct 02, 2000 at 01:22:47PM -0600, Tom Christiansen wrote: > > Eliott P. Squibb > > Joe Blogg > > That is an excellent description of why THIS IS COMPLETE > MADNESS. It also shows how easy it is to get wrong Graham.

Re: split() ideas

2000-09-28 Thread Graham Barr
On Thu, Sep 28, 2000 at 01:02:11PM -0500, Jonathan Scott Duff wrote: > I thought I had sent this the other day, but it doesn't appear to have > made it through... > > Here are a couple of ideas that I don't have time to RFC, but some who > likes them might: > > 1. Allow the first argumen

Re: Beefier prototypes (was Re: Multiple for loop variables)

2000-09-21 Thread Graham Barr
On Thu, Sep 21, 2000 at 03:38:59AM -0600, Tom Christiansen wrote: > > > Could the prototype people please report whether Tim Bunce's issues with > > > prototypes have been intentionally/adequately addressed? > > >I'm not a prototype person (in fact RFC 128 makes it a hanging offence > >to us

Re: RFC 266 (v1) Any scalar can be a hash key

2000-09-21 Thread Graham Barr
On Thu, Sep 21, 2000 at 03:38:50AM -0400, Michael G Schwern wrote: > On Thu, Sep 21, 2000 at 03:54:27AM -, Perl6 RFC Librarian wrote: > > =head1 IMPLEMENTATION > > > > Dunno. With my vague understanding of the existing code and hash > > tables in general: > > I believe the main reason why ha

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-21 Thread Graham Barr
On Wed, Sep 20, 2000 at 10:08:09PM -0700, Glenn Linderman wrote: > Russ Allbery wrote: > > > Why on earth would you want to do this in real code? > > I wouldn't, of course. This is just a demonstration that I want both > semantics available concurrently. If you are not going to use it, why imp

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 10:00:56AM -0700, Damien Neil wrote: > On Wed, Sep 20, 2000 at 04:12:09AM -, Perl6 RFC Librarian wrote: > > Add null() keyword and fundamental data type > > I think that this is better done as a special overloaded object used > Incidentally, I'm surprised that DBI has

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 08:30:44AM -0700, Nathan Wiger wrote: > Using the proposed tristate pragma does not strike me as any better - > in fact, worse - than adding null() because you are now changing the > meaning of fundamental Perl operations. You're *still* introducing "yet > another state of

Re: RFC 262 (v1) Index Attribute

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 09:03:39AM -0400, Webmaster wrote: > Graham Barr Wrote: > >Well if there ever is a way to shortcut grep this could be genera;ized > >to > > > > my $index = grep { break if $_ eq $seek; 1 } @items; > > Wouldn't this also assume th

Re: RFC 262 (v1) Index Attribute

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 08:05:20AM -0400, Webmaster wrote: > David Nicol Wrote in RFC 262: > >foreach $item (@items){ > >#print "$item was at location ",$item:n,"\n"; > >print "$item was at location ${item:n}\n"; > >}; > > What would really be nice here is an C function, similar to the > scalar v

Re: RFC 76 (v3) Builtin: reduce

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 05:08:26AM -, Perl6 RFC Librarian wrote: > =head1 ABSTRACT > > This RFC proposes a built-in C function, modelled after Graham > Barr's C subroutine from the List::Utils module (a.k.a. The > Module Formerly Known As builtin.pm). :-) > If fewer than N-1 elements would

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Wed, Sep 20, 2000 at 12:00:05AM -0700, Russ Allbery wrote: > Perl already has exactly the data value that you're looking for. This RFC > is proposing to fix the wrong problem; the things that need to be changed > (conditionally) are the logical operators, not the data value. Absolutley, altho

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Graham Barr
On Tue, Sep 19, 2000 at 10:11:23PM -0700, Nathan Wiger wrote: >undef null > >$a = undef; $a = null; >$b = 1; $b = 1; >$c = $a + b; $c = $a + $b; > >$c is 1

  1   2   >