Re: Apoc2 - STDIN concerns

2001-05-14 Thread Bart Lateur
On Thu, 10 May 2001 17:15:09 +0100, Simon Cozens wrote: What you could do, is treat an iterator as something similar to reading a line from a file. Tied filehandles allow something like it in Perl5. You know, if what you say is true, I'd expect to find a module on CPAN which turns the exotic

Re: Apoc2 - STDIN concerns

2001-05-14 Thread Simon Cozens
On Mon, May 14, 2001 at 01:25:51PM +0200, Bart Lateur wrote: There must be some reason why a language like Sather isn't more popular. I think that iters are part of the problem. That smacks of the Politician's Syllogism: Something is wrong. This is something. Therefore this is

RE: Apoc2 - STDIN concerns

2001-05-14 Thread David Grove
On Mon, May 14, 2001 at 01:25:51PM +0200, Bart Lateur wrote: There must be some reason why a language like Sather isn't more popular. I think that iters are part of the problem. That smacks of the Politician's Syllogism: Something is wrong. This is something. Therefore this

Re: Apoc2 - STDIN concerns

2001-05-11 Thread Dave Storrs
On Thu, 10 May 2001, Larry Wall wrote: Dave Storrs writes: : should stick with . Also, I'd prefer to use the 'x' operator for : specifying multiples: : : @foo = $STDIN x 4; : @foo = $STDIN x mySub; : : The parallel with $foo = 'bar'x2;, where bar is simply repeated

Re: Apoc2 - STDIN concerns

2001-05-11 Thread Larry Wall
Dave Storrs writes: : Hmmm...I see your point, but I think it depends on what you see as : the operatee that 'x' is operating on. If it's the string(s) produced by : , then you're certainly right. But if it is the act of iterating : itself, then I think my suggestion is still valid. And

Re: Apoc2 - STDIN concerns

2001-05-11 Thread Dave Storrs
On Fri, 11 May 2001, Larry Wall wrote: Dave Storrs writes: : calling the function that produced the string, or whatever. I just think : that we could extend 'x' to have a general repetition meaning. I think just patching one operator from verbal status to adverbial status is not

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-10 Thread Dave Hartnoll
(apologies if this is a duplicate - I think my last post has gotten lost). The RFC pleads for a community spirit from ORA. Barring that, it seeks a new symbol for the community entirely I'd suggest a mongoose - eats poisonous snakes for breakfast. There's a sort of tie-in with Perl Mongers

RE: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-10 Thread David Grove
/me likes. /me likes a lot. David T. Grove Blue Square Group [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Dave Hartnoll [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 8:56 AM To: [EMAIL PROTECTED] Subject: Re: Apoc2 - STDIN concerns : new mascot

Re: Apoc2 - STDIN concerns

2001-05-10 Thread Dave Storrs
On Tue, 8 May 2001, Larry Wall wrote: In this view, * and could just be two different kinds of expandable flags. But I'm uncomfortable with that, because I'd like to be able to say lazy_sub($STDIN, $STDIN, $STDIN, $STDIN) to feed four lines to lazy_sub without defeating the

Re: Apoc2 - STDIN concerns

2001-05-10 Thread John Porter
Dave Storrs wrote: *4$STDIN # Next 4 lines *$num_lines$STDIN # Numifies $num_lines, gets that many *int rand(6)$STDIN # Gets 0-5 lines *mySub($bar)$STDIN# mySub returns num, gets that many Shades of printf... -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-10 Thread Bart Lateur
On Fri, 4 May 2001 18:20:52 -0700 (PDT), Larry Wall wrote: : love. I'd expect $FOO.readln (or something less Pascalish) to do an : explicit readline to a variable other than $_ It would be $FOO.next, but yes, that's the basic idea. It's possible that iterator variables should be more

Re: Apoc2 - STDIN concerns

2001-05-10 Thread Larry Wall
Dave Storrs writes: : You know, it would be really cool if you specify the number of : lines you wanted like so: : : $STDIN # One line : *$STDIN# All available lines : *4$STDIN # Next 4 lines : : Or even: : :

Re: Apoc2 - STDIN concerns

2001-05-10 Thread Dan Sugalski
At 05:56 PM 5/10/2001 +0200, Bart Lateur wrote: On Fri, 4 May 2001 18:20:52 -0700 (PDT), Larry Wall wrote: : love. I'd expect $FOO.readln (or something less Pascalish) to do an : explicit readline to a variable other than $_ It would be $FOO.next, but yes, that's the basic idea. It's

Re: Apoc2 - STDIN concerns

2001-05-10 Thread Simon Cozens
On Thu, May 10, 2001 at 05:56:41PM +0200, Bart Lateur wrote: People are *very much* familiar with reading a line from a file. People may steer clear from a language because it deeply relies on exotic stuff like iterators. ... What you could do, is treat an iterator as something similar to

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-10 Thread Dave Hartnoll
The RFC pleads for a community spirit from ORA. Barring that, it seeks a new symbol for the community entirely I'd suggest a mongoose - eats poisonous snakes for breakfast. There's a sort of tie-in with Perl Mongers == Perl Mongoose as well :-) Dave.

Re: Apoc2 - STDIN concerns

2001-05-10 Thread Dave Storrs
QUOTE LARRY Dave Storrs writes: : You know, it would be really cool if you specify the number of : lines you wanted like so: : : $STDIN # One line : *$STDIN# All available lines : *4$STDIN # Next 4 lines : : Or even: : :

RE: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread David Grove
Message- From: RFC850 host name inserted by qmail-smtpd [mailto:[EMAIL PROTECTED]]On Behalf Of David L. Nicol Sent: Tuesday, May 08, 2001 5:12 PM To: Larry Wall; [EMAIL PROTECTED] Subject: Re: Apoc2 - STDIN concerns : new mascot? Larry Wall wrote: there seems to be a shortage of three

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread Bart Lateur
On Wed, 9 May 2001 10:24:26 -0400, David Grove wrote: I remember someone (whether at O'Reilly or not I don't remember) saying that, even if it looks like a horse but has a hump, it's not allowed. Or was that an alpaca with a llama... The RFC pleads for a community spirit from ORA. Barring that,

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread Simon Cozens
On Wed, May 09, 2001 at 04:50:51PM +0200, Bart Lateur wrote: Several perl ports, and at least one book, use a shiny ball as a symbol. It took me a bit of thinking before I realized what this shiny ball represents. Odd. Beginning Perl was going to use a blown-up microscope slide of a grain of

RE: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread David Grove
didn't do it because it would have taken $600 to prove a point. David T. Grove Blue Square Group [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Bart Lateur [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 10:51 AM To: [EMAIL PROTECTED] Subject: Re: Apoc2 - STDIN

RE: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread David Grove
/me ponders the use of a cat in that context... Furball? David T. Grove Blue Square Group [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Simon Cozens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 10:55 AM To: [EMAIL PROTECTED] Subject: Re: Apoc2 - STDIN

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread Simon Cozens
On Wed, May 09, 2001 at 11:02:52AM -0400, David Grove wrote: oyster/clam/mussel shell with association to the Perl language. The first thought is to give a demonstration on how rude holding this type of symbol is. I think all it would demonstrate is how flawed the copyright system is. But

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread Dave Mitchell
And there was me thinking the shiny ball must be a camel dropping

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread Dan Sugalski
At 04:06 PM 5/9/2001 +0100, Simon Cozens wrote: On Wed, May 09, 2001 at 11:02:52AM -0400, David Grove wrote: oyster/clam/mussel shell with association to the Perl language. The first thought is to give a demonstration on how rude holding this type of symbol is. I think all it would

RE: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-09 Thread David Grove
Core Perl is probably trademarked to Sun Microsystems. ;-) David T. Grove Blue Square Group [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: John L. Allen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 1:29 PM To: [EMAIL PROTECTED] Subject: Re: Apoc2

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Eric Roode
At 16:17 May 7, Simon Cozens wrote: On Mon, May 07, 2001 at 01:14:12PM -0700, Nathan Wiger wrote: I think Uri's qh() suggestion is the cleanest: Interesting train of thought, since one of the ideas was that qw() is ugly and has to go. (Larry's been saying this for nearly two years now, it's

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Eric Roode
In a fit of insanity, at 10:14 EDT Tue May 8, I wrote: 9 times out of 100, qw saves a large number of keystrokes. (The other 1% of the time, ... I hope it's obvious that I meant 99 times out of 100 sheepish look -- Eric

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Eric Roode writes: : And the fact is, I've always loathed qw(), despite the fact that I : invented it myself. :-) : -- Larry Wall in [EMAIL PROTECTED] : : : Well, one person's ugly is another person's joy forever. : : Regardless of the aesthetics of q//, qq//, qw//, et al, (and

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
John Porter writes: : Pardon me if someone has already suggested this, but... : Couldn't labels really be (aliases to) iterator objects? : So that : next FOO : really *does* mean : FOO.next Ordinary next methods don't do a goto. Larry

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Nathan Wiger writes: : One thing I think we should avoid is as many special cases as possible. : This is already why people hate currently - because it does both glob() : and readline(). : : I would say that having history is actually a good thing. It's a : foundation, really, since readline()

qX (was Re: Apoc2 - STDIN concerns)

2001-05-08 Thread Uri Guttman
LW == Larry Wall [EMAIL PROTECTED] writes: LW Please pardon my hyperbole. I don't loathe qw() so badly that I LW want to get rid of it. I merely want to put it in the same status LW as the other general quote operators that also have a non-general LW pair of standard quote characters.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Lipscomb, Al writes: : --_=_NextPart_001_01C0D71B.8F67C8EA : Content-Type: text/plain; : charset=iso-8859-1 : : : : $$STDIN # Return one element regardless of context. : @$STDIN # Return number of element wanted by context. : *$STDIN # Return

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Peter Scott writes: : At 01:51 AM 5/6/01 +0100, Simon Cozens wrote: : The debate rages on: Is Perl Bactrian or Dromedary? : : It's a Dromedary, it says so in the Colophon. : : But maybe the symbol of Perl 6 should be a Bactrian, with the extra hump : symbolizing the increased power. : : You

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Dan Sugalski
At 09:32 AM 5/8/2001 -0700, Larry Wall wrote: Perl 6 might not put all the elements of @b on the stack as a temporary list. Rather, it might just put \@b marked as expandable. (It might also have to put some kind of copy-on-write lock on @b to keep it from changing out from under, depending on

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Michael G Schwern
On Tue, May 08, 2001 at 09:44:57AM -0700, Larry Wall wrote: there seems to be a shortage of three-humped camels. No wonder we're short, they're rather careless with them... The Three-humped Camel: An advertisement once appeared in a Welsh local paper which read: 'Last - one three-humped camel.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Larry Wall wrote: Ordinary next methods don't do a goto. Well, of course, the next method of a syntactic loop control iterator object would not be ordinary. :-) -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Dan Sugalski writes: : At 09:32 AM 5/8/2001 -0700, Larry Wall wrote: : Perl 6 might not put all the elements of @b on the stack as a temporary : list. Rather, it might just put \@b marked as expandable. (It might : also have to put some kind of copy-on-write lock on @b to keep it from :

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 01:32:24PM -0400, John Porter wrote: a syntactic loop control iterator object I surely hope you're joking. -- I respect faith, but doubt is what gives you an education. -- Wilson Mizner

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Peter Scott
At 10:32 AM 5/8/01 -0700, Larry Wall wrote: : One of the places I hope to gain some speed is in eliminating flattening : and reconstitution of aggregate variables as much as possible. I'm hoping : to exploit this really heavily to save both the memory for the flattened : lists and the time it

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: John Porter wrote: a syntactic loop control iterator object I surely hope you're joking. Why? It sounds reasonable to me (if not necessarily desirable). Perl is a highly dynamic language, I think it could support this. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Peter Scott wrote: Even if it has a fixed-length prototype, is Perl smart enough to know that it can't be called as an object method, bypassing prototype checking? Maybe p6 won't have that loophole. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Simon Cozens writes: : On Tue, May 08, 2001 at 01:32:24PM -0400, John Porter wrote: : a syntactic loop control iterator object : : I surely hope you're joking. It could certainly be argued that anything you can put a label on is an object by some definition or other. And certainly it turns

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
John Porter writes: : Peter Scott wrote: : Even if it has a : fixed-length prototype, is Perl smart enough to know that it can't be : called as an object method, bypassing prototype checking? : : Maybe p6 won't have that loophole. It won't, if the type of the object can be determined at

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Dan Sugalski
At 10:57 AM 5/8/2001 -0700, Peter Scott wrote: At 10:32 AM 5/8/01 -0700, Larry Wall wrote: : One of the places I hope to gain some speed is in eliminating flattening : and reconstitution of aggregate variables as much as possible. I'm hoping : to exploit this really heavily to save both the

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Dan Sugalski
At 10:32 AM 5/8/2001 -0700, Larry Wall wrote: Dan Sugalski writes: : At 09:32 AM 5/8/2001 -0700, Larry Wall wrote: : Perl 6 might not put all the elements of @b on the stack as a temporary : list. Rather, it might just put \@b marked as expandable. (It might : also have to put some kind of

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: I'm sure a pure virtual base template class sounds reasonable to a C++ programmer, but that doesn't mean it's the clearest thing in the world. :) Nothing changes at the syntactic level. FOO: while ( $cond ) { # FOO is now (an alias to) a loop control

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 02:34:25PM -0400, John Porter wrote: the guy who wants to know why Cnext FOO looks like a method call It doesn't, any more than next FOO looks like a method call in Perl 5 right now. -- I'm a person, not a piece of property. Happily, I'm both! - Lionel and

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: John Porter wrote: Cnext FOO looks like a method call It doesn't, Oh, but it does, to the perl6 programmer who's used to thinking $source.next (or its indirect object alternative, next $source ) iterates the iterator in $source. Not that there are any

Re: Apoc2 - STDIN concerns

2001-05-08 Thread James Mastros
From: Larry Wall [EMAIL PROTECTED] To: Eric Roode [EMAIL PROTECTED] Sent: Tuesday, May 08, 2001 11:03 AM Subject: Re: Apoc2 - STDIN concerns Eric Roode writes: : And, while I'm on my soapbox here, I don't get how ... is a vast : improvement over qw :-) Please pardon my hyperbole. I

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 02:47:19PM -0400, John Porter wrote: Not that there are any such people. Yet. Indeed. And I suspect that the first Perl 6 programmers are Perl 5 programmers, who know damned well what next FOO means. -- Dogs believe they are human. Cats believe they are God.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 02:34:25PM -0400, John Porter wrote: Nothing changes at the syntactic level. Then I call Occam's Razor. Perl is supposed to be easy, no? -- And it should be the law: If you use the word `paradigm' without knowing what the dictionary says it means, you go to jail. No

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Simon Cozens writes: : On Tue, May 08, 2001 at 02:47:19PM -0400, John Porter wrote: : Not that there are any such people. Yet. : : Indeed. And I suspect that the first Perl 6 programmers are Perl 5 : programmers, who know damned well what next FOO means. Well, it's certainly the case that

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: Indeed. And I suspect that the first Perl 6 programmers are Perl 5 programmers, who know damned well what next FOO means. Would it really cause you that much consternation to find, after you've been programming in Perl6 for some months or years, that next FOO is actually a

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 01:59:47PM -0400, John Porter wrote: Perl is a highly dynamic language An object with exactly one and only one method doesn't sound that dynamic to me. -- Can you sum up plan 9 in layman's terms? It does everything Unix does only less reliably - kt

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: Then I call Occam's Razor. Perl is supposed to be easy, no? It's also supposed to have an implementation. And to have a consistency level somewhat greater than zero. Also, consider the implications for user-defined control constructs. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: An object with exactly one and only one method doesn't sound that dynamic to me. Bit of a digression; but, the dynamicity of a language is in no way implicated by the number of methods in one build-in class. (Besides, this class will have at least three.) -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 02:59:09PM -0400, John Porter wrote: It's also supposed to have an implementation. I think those of us who are actually likely to write a single line of code or more should be concerned with that, thank you. -- [It is] best to confuse only one issue at a time.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 03:00:51PM -0400, John Porter wrote: Bit of a digression; but, the dynamicity of a language is in no way implicated by the number of methods in one build-in class. (Besides, this class will have at least three.) Ooh, at least three. Again, why special-case a class

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
[Tom's away at the moment, I'm filling in until he gets back.] -- Asynchronous inputs are at the root of our race problems. -- D. Winker and F. Prosser

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
Simon Cozens writes: : On Tue, May 08, 2001 at 03:00:51PM -0400, John Porter wrote: : Bit of a digression; but, the dynamicity of a language is in : no way implicated by the number of methods in one build-in : class. (Besides, this class will have at least three.) : : Ooh, at least three.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Larry Wall wrote: We're not so far off of a yield-like method on continuations here... ... ordinary blocks that can function as continuations to the surrounding list context. Ah! Now we're talking! -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Nathan Wiger
* Larry Wall [EMAIL PROTECTED] [05/08/2001 09:36]: Taking history into account is good, though I'd argue that now is the proper time to change history, if we're going to change. Perl would never have been accepted in the first place had it been too different from what came before, but now

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Dan Sugalski
At 01:19 PM 5/8/2001 -0700, Nathan Wiger wrote: * Larry Wall [EMAIL PROTECTED] [05/08/2001 09:36]: Taking history into account is good, though I'd argue that now is the proper time to change history, if we're going to change. Perl would never have been accepted in the first place had it

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Nathan Wiger wrote: So could mean more and could mean less. That would sure confuse the math subcommunity! ;-) more and less could be inverses, more reading from the current position forward and less from the current position backwards. This notion could be generalized to

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 12:58:24PM -0700, Larry Wall wrote: Perhaps Perl 6 will have ordinary blocks that can function as continuations to the surrounding list context. OK, now you've broken my brain. Can you give me an example that is i) useful and ii) reasonably obvious to the untrained

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Dan Sugalski
At 09:42 PM 5/8/2001 +0100, Simon Cozens wrote: On Tue, May 08, 2001 at 12:58:24PM -0700, Larry Wall wrote: Perhaps Perl 6 will have ordinary blocks that can function as continuations to the surrounding list context. OK, now you've broken my brain. Can you give me an example that is i)

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: Can you give me an example that is i) useful and ii) reasonably obvious to the untrained eye? If not, I humbly suggest it has little business being in the blue-collar language we call Perl. Rather than head off down this time-wasting tangent yet again, I refer readers to

Re: Apoc2 - STDIN concerns

2001-05-08 Thread David L. Nicol
Simon Cozens wrote: On Tue, May 08, 2001 at 01:59:47PM -0400, John Porter wrote: Perl is a highly dynamic language An object with exactly one and only one method doesn't sound that dynamic to me. nonsense! It's got accessor methods too, for everyone who wanted to magicalize $index

Re: Apoc2 - STDIN concerns ::::: new mascot?

2001-05-08 Thread David L. Nicol
Larry Wall wrote: there seems to be a shortage of three-humped camels. At last! the unencumbered image for the mascot! Could O'Reilly really claim a three-humped camel was an image of a camel, with a straight face?

Re: Apoc2 - STDIN concerns

2001-05-08 Thread David L. Nicol
Larry Wall wrote: Syntactically speaking it's too ambiguous to have both a unary and a bracketing . Cool. Do we get a operator to use as an l-value, instead of print? $log = join localtime, 'difficult cramigudgeo'; It's possible we're thinking of iterators wrong here. Perhaps

Re: Apoc2 - STDIN concerns

2001-05-08 Thread David L. Nicol
Nathan Wiger wrote: I think Uri's qh() suggestion is the cleanest: me too And it would make hash declarations cleaner: %hash = qh( foo bar jim = 'bob' var ); Plus maybe even a pragma to set the default value: use default hashval =

Re: Apoc2 - STDIN concerns

2001-05-08 Thread David L. Nicol
I know it is an annoying and bad habit but I'm still young enough so at first glance I think I know it all. [billions and billions of] SYN_A # Return one element regardless of context. SYN_B # Return number of element wanted by context. SYN_C #

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 05:11:52PM -0400, John Porter wrote: Can you give me an example ... Rather than head off down this time-wasting tangent yet again, That smacks of avoiding the question. Again, do you have a useful example? -- You will never find a more wretched hive of scum and

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Simon Cozens
On Tue, May 08, 2001 at 05:08:58PM -0400, Dan Sugalski wrote: @foo = ({scalar each %some_tied_hash}); with the function being called only when you access a particular element? I'm still confused. Firstly, this doesn't involve first-order blocks, which was kinda what the entire question

Re: Apoc2 - STDIN concerns

2001-05-08 Thread David L. Nicol
Nathan Wiger wrote: Perhaps qi() for interpolate or something else. coming to Perl from Scheme I recall some distress that I had to create ($j=$i) =~ s/(\$\S+)/$1/ge; instead of what I wanted to do $j=qqq/$i/; so my nomination is for tokens matching /qq*/ to behave like

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
David L. Nicol wrote: That also wraps up the for should have an explicit iterator access method thread handily! Just label your loop and there you are! Well, right. Every loop would have a control object, whether it's nonymous or a-. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Dan Sugalski
At 10:23 PM 5/8/2001 +0100, Simon Cozens wrote: On Tue, May 08, 2001 at 05:08:58PM -0400, Dan Sugalski wrote: @foo = ({scalar each %some_tied_hash}); with the function being called only when you access a particular element? I'm still confused. Firstly, this doesn't involve first-order

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Larry Wall
David L. Nicol writes: : Larry Wall wrote: : : Syntactically speaking it's too ambiguous to have both a unary and a : bracketing . : : Cool. Do we get a operator to use as an l-value, instead of print? : : $log = join localtime, 'difficult cramigudgeo'; I don't think so. : It's

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Damian Conway
Doubtless Damian could come up with a way to view them as hashes... Well, of course. An iterator is neither pure state nor pure behaviour. It's an inextricable commingling of the two. In other words: an object. So they are *most naturally* viewed as hashes: package Iterator;

Re: Apoc2 - STDIN concerns

2001-05-08 Thread Piers Cawley
Simon Cozens [EMAIL PROTECTED] writes: On Tue, May 08, 2001 at 01:59:47PM -0400, John Porter wrote: Perl is a highly dynamic language An object with exactly one and only one method doesn't sound that dynamic to me. Three methods, surely: next, last, redo. -- Piers Cawley

RE: Apoc2 - STDIN concerns

2001-05-07 Thread Lipscomb, Al
$$STDIN # Return one element regardless of context. @$STDIN # Return number of element wanted by context. *$STDIN # Return all element regardless of context. How about $STDIN.$ # Return one element regardless of context.

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Nathan Wiger
* Simon Cozens [EMAIL PROTECTED] [05/05/2001 17:51]: %foo = ( foo = 1, bar = 1, '=' = 'baz' ) Of course, that could be spelt %foo = +foo +bar =(baz); Actually, it couldn't be because the in = would end the parsing. Same problem that the POD chars have. I think Uri's qh() suggestion

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Mark Koopman
I think Uri's qh() suggestion is the cleanest: Interesting train of thought, since one of the ideas was that qw() is ugly and has to go. (Larry's been saying this for nearly two years now, it's just that people sometimes don't listen. :) Let's keep it and add something similarly ugly to

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Simon Cozens
On Mon, May 07, 2001 at 01:27:52PM -0700, Nathan Wiger wrote: I'm not against a cleaner way to do qw() in principle, but I definitely think is not it for a lot of reasons (glob, readline, can't use =, iterators, ...) Sheesh. Yes, those would be problems with using in Perl 5. However, we

Re: Apoc2 - STDIN concerns

2001-05-07 Thread John Porter
Uri Guttman wrote: what larry seems to want is qh() for quote hash. %foo = qh( foo bar baz ) is like %foo = ( foo = 1, bar = 1, baz = 1 ) Thank you for giving me a chance to drag out my favorite soapbox again. :-) What is needed is better support for treating hashes as sets.

Re: Apoc2 - STDIN concerns

2001-05-07 Thread John Porter
Larry Wall wrote: We do have to worry about the Cnext loop control function though. It's possible that in FOO: while (1) { next FOO if /foo/; ... } the CFOO label is actually being recognized as a pseudo-package name! The loop could well be an object whose full

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Nathan Wiger
* Simon Cozens [EMAIL PROTECTED] [05/07/2001 13:33]: I'm not against a cleaner way to do qw() in principle, but I definitely think is not it for a lot of reasons (glob, readline, can't use =, iterators, ...) Sheesh. Yes, those would be problems with using in Perl 5. However, we are

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Simon Cozens
On Mon, May 07, 2001 at 01:43:56PM -0700, Nathan Wiger wrote: To quote you: : http://dev.perl.org/rfc/28.pod I'm not trying to be a jerk at all, but I think at times we're losing sight of the above. I hope not, since it was primarily written with you in mind. :) -- He was a modest,

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Nathan Wiger
* Simon Cozens [EMAIL PROTECTED] [05/07/2001 13:46]: To quote you: : http://dev.perl.org/rfc/28.pod I'm not trying to be a jerk at all, but I think at times we're losing sight of the above. I hope not, since it was primarily written with you in mind. :) Hmm, that's odd. As I

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Fred Heutte
Simon Cozens writes: However, we are not designing Perl 5. This gets to a theme that is turning into more and more of an irritant in following (and very occasionally participating) in the ongoing discussion here. There seems to be a sense among some participants that certain issues are Off

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Simon Cozens
On Mon, May 07, 2001 at 05:14:23PM +, Fred Heutte wrote: It strikes me as counterproductive to say, Oh, that's ALREADY been decided (with the distinct undertone of by the way please note how out of touch you are), or That's fine but we're not designing Perl 5 here (with the apparent

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Fred Heutte
Simon Cozens makes a good point in response to my slightly overamped oration on the qualities of dissent. I am seeing most of the current discussion on this list as being brainstorming on details, not painting the vast new blue skies, and that is as it should be. Acknowledging that making

Re: Apoc2 - STDIN concerns

2001-05-07 Thread Simon Cozens
On Mon, May 07, 2001 at 05:47:59PM +, Fred Heutte wrote: And so there's a bit of a three-dimensional Rubik's Cube game here to try and rejigger the use of the keyboard to make the language more efficient and productive and maybe even clean out some of the accumulated crud out there.

Re: Apoc2 - STDIN concerns

2001-05-06 Thread Peter Scott
At 01:51 AM 5/6/01 +0100, Simon Cozens wrote: The debate rages on: Is Perl Bactrian or Dromedary? It's a Dromedary, it says so in the Colophon. But maybe the symbol of Perl 6 should be a Bactrian, with the extra hump symbolizing the increased power. You knew this was coming... -- Peter Scott

Re: Apoc2 - STDIN concerns

2001-05-06 Thread Jarkko Hietaniemi
On Sun, May 06, 2001 at 10:10:24PM +0200, Bart Lateur wrote: On Sat, 5 May 2001 15:22:40 -0700, Nathan Wiger wrote: I suggest that we simply create another q-op to do the qw-ish things you're proposing. Perhaps qi() for interpolate or something else. qqw Why I'm reminded of car,

Re: Apoc2 - STDIN concerns

2001-05-05 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 (FOO) magic we all know and occasionally : : love. I'd expect $FOO.readln (or something less Pascalish)

Re: Apoc2 - STDIN concerns

2001-05-05 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. Read a line from

Re: Apoc2 - STDIN concerns

2001-05-05 Thread Nathan Wiger
:$FH = open $file or die Can't open $file: $!; :$line = next $FH; : : If so, I can live with that. Yes, that's the reason it's Cnext, and not something more specific like Creadline, which isn't even true in Perl 5 when $/ is mungled. I dunno. Color me unconvinced--I do use the

Re: Apoc2 - STDIN concerns

2001-05-05 Thread Larry Wall
Nathan Wiger writes: : You know, I was just thinking about this, and I agree with Dan. Actually, : there's some big problems in trying to get rid of and make Perl do the : right thing in boolean context (like the while loop example). Consider: : :$FH = open /etc/motd; :die No good

Re: Apoc2 - STDIN concerns

2001-05-05 Thread Nathan Wiger
Ok, this is long, so here goes... I expect the real choice is between $FOO and $FOO. I can convince myself pretty easily that a unary is just another name for next, or more, or something. On the other hand $FOO has history. And if one special-cases $..., we could also have foo bar baz as

  1   2   >