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: sandboxing

2001-05-08 Thread Larry Wall
Dan Sugalski writes: : We'd want an alternative opcode running loop for all this, and it could : easily enough check times, as could special opcodes. Long-running codes : could also check at reasonable breakpoints. (Still in trouble with C : extensions, but that's pretty much a guarantee)

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 - Context and variables

2001-05-08 Thread Larry Wall
Nathan Wiger writes: : First off, before I forget to mention it, nice job on Apoc2 Larry! You are : the man. I know alot of us on p6l can seem like harsh critics at times, but : it's only because we love Perl so much. ;-) We'll have to do something about that. :-) : Anyways, in addition to the

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: apo 2

2001-05-08 Thread Larry Wall
: is = typing, inheritance, etc. : has = composition, aggregation, etc. : : True, but those are basic OO concepts, which don't neatly apply to : property-lists (a very old Lisp concept that Perl6 is adopting). Well, you can think of it like that, but I'm actually trying for some happy

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: Property/method naming conventions

2001-05-08 Thread Larry Wall
Simon Cozens writes: : This also led me to think about what happens when we introduce new built-ins. : Perl 5 has had a complete built-in freeze for a long long time now because : you can't bring in a new built-in without risking smacking subroutines in : old code. Right, that's been an

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: apo 2

2001-05-08 Thread Me
So bool would perhaps be a synthetic property that has opposite polarity from bit? I can see that, sort of. It's something like electrons being negative, thank you Mr. Franklin. s/bit/yes/ yes? And, despite perl5's use of no as the opposite of use, and given that there may be no use in

Re: apo 2

2001-05-08 Thread Larry Wall
Me writes: : So bool would perhaps be a synthetic property that has opposite : polarity : from bit? I can see that, sort of. It's something like electrons : being : negative, thank you Mr. Franklin. : : s/bit/yes/ : : yes? : : And, despite perl5's use of no as the opposite : of use, and

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: apo 2

2001-05-08 Thread Me
If you're trying to confuse me, I can assure you it's unnecessary. ;-) Hey, I try. --me (Under cover Ruby/Python agent and promotor of RFCs 380 thru 1,000,000)

Re: apo 2

2001-05-08 Thread John Porter
Me wrote: And, despite perl5's use of no as the opposite of use, and given that there may be no use in perl6 (;), and thus perhaps no no, (on and off?), then maybe no could be used as not yes? Well clearly on is the opposite of no. Yes? -- John Porter

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: apo 2

2001-05-08 Thread Me
Well clearly on is the opposite of no. Yes? maybe, as in: my cat maybe Dog; for some form of relaxed typing constraint. crazy cackle

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 - Context and variables

2001-05-08 Thread Nathan Wiger
* Larry Wall [EMAIL PROTECTED] [05/08/2001 10:11]: Nathan Wiger writes: : First off, before I forget to mention it, nice job on Apoc2 Larry! You are : the man. I know alot of us on p6l can seem like harsh critics at times, but : it's only because we love Perl so much. ;-) We'll have to do

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 - Context and variables

2001-05-08 Thread David L. Nicol
Jonathan Scott Duff wrote: (*%a, %b) = (%c,%d);# %a slurps, %b gets nothing (%a, *%b) = (%c,%d);# %a = %c, %b gets the rest I'm sure your imaginations can twiddle the cardinality knob appropriate for generalization :-) -Scott so if you don't know exactly what

Re: Apo2: \Q ambiguity

2001-05-08 Thread David L. Nicol
Johan Vromans wrote: [Quoting Michael G Schwern, on May 6 2001, 22:58, in Re: Apo2: \Q ambigui] Hmmm, maybe you can point out the compose key on my keyboard, I can't find it. ;) Pick whatever you find convenient. I use the right control key. From my .Xmodmap: ! Compose key

Re: Subroutine attributes, from a long time ago

2001-05-08 Thread David L. Nicol
John Porter wrote: [EMAIL PROTECTED] writes: : : why should a reader expect that a declarative description : of foo would be followed by the body of foo? Isn't the functional definition of a sub just another one of its attributes, anyway? I'm a little bit disappointed that p6

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: Apo2: \Q ambiguity is too a problem

2001-05-08 Thread David L. Nicol
Larry Wall wrote: The ~~ is a cute hack though. Credit is due to Steve Lane [EMAIL PROTECTED] who posted it to funwithperl. ... I'm sorry, my eyes go crossed when I look at that, and the two \Q's merge into one, which confuses me, in a stereoscopic sort of way. I was wrong about \Q\E

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;

what I meant about hungarian notation

2001-05-08 Thread David L. Nicol
Hungarian notation is any of a variety of standards for organizing a computer program by selecting a schema for naming your variables so that their type is readily available to someone familiar with the notation. Just as Python is a language that enforces the common practice of sane

Re: what I meant about hungarian notation

2001-05-08 Thread David L. Nicol
push chairs, map {woodworking} treestumps; or even push chairs, map BLOCK(woodworking) treestumps;

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