Re: Apo2: \Q ambiguity

2001-05-04 Thread Larry Wall
Dan Sugalski writes: : Have you considered allowing Unicode characters as alternatives to some of : the less pleasant looking bits? $foo<<1>> (where << and >> are the double : angle characters) as an alternative to $foo\Q[1] if the user's got the : characters handy? Actually, my first thought

Re: Apo2: \Q ambiguity not a problem

2001-05-04 Thread Larry Wall
David L. Nicol writes: : Not a problem. \Q means quotemeta, except immediately following : a interpolated identifier. You want to start metaquoting immediately : after a curious interpolation? use \Q\Q. The word "except" should be a red flag that you're trying to define an exception. We're try

Re: So, we need a code name...

2001-05-04 Thread Larry Wall
Edward Peschko writes: : also - why does it have to be tied to perl (in name) at all? Er, because we're writing it? : I like the idea : that it would *not* be tied to perl, ie: it would be more generic if it was : not named after it. Well, the fact that Tcl and Tk both start with T didn't st

Re: Apoc2 - concerns

2001-05-04 Thread Larry Wall
Simon Cozens writes: : On Fri, May 04, 2001 at 04:42:07PM -0700, Nathan Wiger wrote: : > : while ($STDIN) { ... } : > I'm wondering what this will do? : >$thingy = $STDIN; : > This seems to have two possibilities: : >1. Make a copy of $STDIN : : This one. I see a filehandle in *boole

Re: Apo2: \Q ambiguity

2001-05-04 Thread Larry Wall
Dan Sugalski writes: : That's cool. I was just thinking it might not be a bad idea for us to set=20 : some equivalencies up in advance. If not, that's fine too. (I'll just slip= : =20 : them in while you're not looking... :) Hmm. Harks back to the colonial era: "I claim these brackets in the nam

Re: Apoc2 - concerns

2001-05-04 Thread Larry Wall
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 Pascalish) to do an : > : explicit readline to a variable other than $_

Re: Apoc2 - 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 " a shortcut to the : proposed

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) It's

Re: Apoc2 - 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 aesthe

Re: Apoc2 - 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 - 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 readl

Re: Apoc2 - 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 # Ret

Re: Apoc2 - 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 k

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

Re: Apoc2 - 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 kee

Re: Apoc2 - 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 in

Re: Apoc2 - 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 - 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 impedimen

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

Re: what I meant about hungarian notation

2001-05-09 Thread Larry Wall
I'd just like to point out that it's already becoming fairly easy to establish a bare alias for a scalar variable even in Perl 5: my $foo; my sub foo : lvalue { $foo } This sort of thing will only get easier in Perl 6, when people can pull in their own grammatical rules to enable them to

Re: what I meant about hungarian notation

2001-05-09 Thread Larry Wall
David Grove writes: : Probably rehashing (no pun intended) a lost cause, but this sounds logical : to me, if you're referring to something similar to PHP's Array['text'] : notation. I.e., : : $array[1] : $hash{'one'} : : becoming : : @group['one'] Currently, @ and [] are a promise that you don

Re: what I meant about hungarian notation

2001-05-10 Thread Larry Wall
Hillary writes: : >I happen to like $ and @. They're not going away in standard Perl as : >long as I have anything to do with it. Nevertheless, my vision for Perl : >is that it enable people to do what *they* want, not what I want. : > : >Larry : : If only that were true...But it isn't true. It

Re: what I meant about hungarian notation

2001-05-10 Thread Larry Wall
Me writes: : Larry: : > Currently, @ and [] are a promise that you don't intend to use string : > indexing on this variable. The optimizer can make good use of this : > information. For non-tied arrays of compact intrinsic types, this : > is going to be a major performance win in Perl 6. : : As

Re: The 5% solution

2001-05-10 Thread Larry Wall
Dave Mitchell writes: : Content-MD5: FiIz8m/ma8enU5CTBqhsQw== : X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 sun4u sparc : X-Spam-Rating: onion.valueclick.com 1.6.2 0/1000/N : : : > Briefly: We want the Perl 6 runtime to be an equivalent of the Microsoft : > CLR, so that if you can so

Re: Apoc2 - 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: : : *$num_l

Re: The 5% solution

2001-05-10 Thread Larry Wall
Dan Sugalski writes: : At 08:40 AM 5/10/2001 -0700, Larry Wall wrote: : >Dave Mitchell writes: : >: Content-MD5: FiIz8m/ma8enU5CTBqhsQw== : >: X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 sun4u sparc : >: X-Spam-Rating: onion.valueclick.com 1.6.2 0/1000/N : >: : >:

Re: The 5% solution

2001-05-10 Thread Larry Wall
Simon Cozens writes: : If you can "somehow get bytecode onto" Perl 6 - which you'll : need to do with an alternate parser - you can then use the Perl 6 equivalent : of B::Deparse to spit out Perl 6. At some point it would have to be annotated with formatting and comment info, though. Somebody wi

Re: Perl, the new generation

2001-05-10 Thread Larry Wall
Edward Peschko writes: : On Thu, May 10, 2001 at 09:43:34AM -0700, Larry Wall wrote: : > Peter Scott writes: : > : So, I wonder aloud, do we want to signify that degree of change with a more : > : dramatic change in the name? : > : > I'm inclined to think that people wi

Re: Apoc2 - concerns

2001-05-10 Thread Larry Wall
Dave Storrs writes: : < 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

Re: Perl, the new generation

2001-05-10 Thread Larry Wall
Edward Peschko writes: : Although I would amend what he said to saying 'perl6 will eat perl 5 code : close to painlessly as possible including typeglobs'. Typeglobs are a central : part of a lot of CPAN's core modules; I don't think we could get away with : abolishing them willy-nilly. Much of t

Re: what I meant about hungarian notation

2001-05-11 Thread Larry Wall
Me writes: : Larry: : > : > Currently, @ and [] are a promise that you don't intend to use : string : > : > indexing on this variable. The optimizer can make good use of : this : > : > information. For non-tied arrays of compact intrinsic types, this : > : > is going to be a major performance wi

Re: p6 casting as shortcut for lengthier p5 syntax

2001-05-11 Thread Larry Wall
David L. Nicol writes: : Demonstrating, the p5 "cast" can be performed. I guess p6 will : optimize any @{[...]} constructions into @(...) but still accept : it as valid, deprecated syntax? Why should it be deprecated? Oh, are you wondering because I said that @{foo[bar]} was no longer valid? J

Re: A proposal for more powerful text processing to be built in to Perl: Flex and Pushdown Expressions.

2001-05-11 Thread Larry Wall
I consider that the biggest weakness of the regex implementation currently is that it can't easily return nested data structures. Of course, regex readability could always use work too. Larry

Re: Apoc2 - 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: Strings vs Numbers (Re: Tying & Overloading)

2001-04-26 Thread Larry Wall
Bart Lateur writes: : Yeah. But no cheers then. The problem still remains: you can access a : hash in the normal way in plain code, but inside a sub, you can mainly : only access a passed hash through a reference. Won't be a problem. : It's annoying to basically having two ways of doing somethin

Re: On Vacation

2001-05-12 Thread Larry Wall
[EMAIL PROTECTED] writes: : And about the whole throwing-out-baby-in-one-grand-bathwater-disposal-motion : trope, I'd like to say that my conception of what the volunteer : participants on the p6 lists have been about is neither giving baby : a brain transplant nor grooming him, but rather buildin

Re: Time::Local

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 04:39:48PM +0300, Gaal Yahas wrote: : As for the function signatures: : :multi sub localtime(Rat $?when = time) returns Time::Local { ... } :multi sub localtime(Int $sec, Int ?$pico = 0) returns Time::Local {...} : : The first form uses the second, but might be les

Re: Autogenerated attribute accessor names

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 05:26:31PM -0400, Stevan Little wrote: : What should I do when I encounter two attributes which can peacefully co-exist as : attributes, but cause a class when we autogenerate the accessors for them. Here is a : quick example: : : class Foo { : has @.bar; :

Re: Time::Local

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 06:47:41PM -0600, zowie wrote: : Hmmm Actually, ntpd achieves that sort of accuracy -- but if : I understand correctly it anchors the UTC time to the standard, : and allows the UNIX seconds count (which often does not account for : new leap seconds, though some gmtime v

Re: Time::Local -- and lexical scope

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 03:48:47PM -0700, Dave Whipp wrote: : Dave Whipp wrote: : : >You can use "{time - $epoch}" or "{time.as<%d>}" or "{int time}". (That : >last one is not "{+time}", because that would be a floating-point value, : >not an integer). Or {time.int}, presumably. : I was thinki

Re: Submethods

2005-07-06 Thread Larry Wall
On Wed, Jul 06, 2005 at 04:19:40PM +0200, "TSa (Thomas Sandlaß)" wrote: : Stevan Little wrote: : >You seem to indicate that submethods are not to be used on instances, : >and instead to be used on the underlying metaclass. I did not see : >anything of the sort in (Syn|Apoc)12 or in my (limited) s

Re: Submethods (+ suggestion/proposal/idea)

2005-07-06 Thread Larry Wall
On Wed, Jul 06, 2005 at 11:28:47AM -0400, Stevan Little wrote: : It seemed to me from A12 that submethods are meant to define an : interface of some kind, the BUILD/DESTROY submethods being the perfect : example. However this means that BUILDALL and DESTROYALL need to be : fairly magical. I say

Re: Type variables vs type literals

2005-07-06 Thread Larry Wall
On Wed, Jul 06, 2005 at 03:29:36PM +0200, "TSa (Thomas Sandlaß)" wrote: : HaloO Larry, : : you wrote: : >Well, there's something to be said for that, but my gut feeling says : >that we should reserve the explicit generic notation for compile time : >processing via roles, and then think of run-time

Re: Dependency Injection

2005-07-06 Thread Larry Wall
On Wed, Jul 06, 2005 at 11:47:47PM +0100, Piers Cawley wrote: : Or you could use a global, but globals are bad... Globals are bad only if you use them to hold non-global values. In this case it seems as though you're just going through contortions to hide the fact that you're trying to do somethin

Re: File.seek() interface

2005-07-07 Thread Larry Wall
On Thu, Jul 07, 2005 at 02:15:19PM -0600, Paul Seamons wrote: : > We should approach this from the perspective that $fh is an iterator, so : > the general problem is "how do we navigate a random-access iterator?". : : Well - I kind of thought that $fh was a filehandle that knew how to behave :

Re: method calls on $self

2005-07-07 Thread Larry Wall
The basic problem is that I always hated looking at C++ and not knowing whether I was looking at a function or a method, so I'm not going to make standard Perl work like that. On the other hand, there's always use self ""; to go with everyone else's preferences: use self "." use sel

Re: File.seek() interface

2005-07-07 Thread Larry Wall
On Thu, Jul 07, 2005 at 06:15:03PM -0700, Paul Hodges wrote: : : : --- Larry Wall <[EMAIL PROTECTED]> wrote: : > Arguably, we could probably admit : > : > $fh.pos = 10`bytes : > : > for the case of seeking from the begining. But I'd kind of like : > : >

Re: Hackathon notes

2005-07-08 Thread Larry Wall
On Fri, Jul 08, 2005 at 02:14:27PM +, Luke Palmer wrote: : Anyway, I think that once we start diving inside expressions to : measure their specificity, we've gotten too complex to be predictable. I would like to point out that for mere mortals, *any* MMD is already too complex to be predictabl

Re: Hackathon notes

2005-07-08 Thread Larry Wall
On Thu, Jul 07, 2005 at 06:37:58PM +0800, Autrijus Tang wrote: : * Non-source-filter-ish macros work on the PIL(AST) level, not on parse tree : level. The AST should preserve enough information to derive the original : parse tree and source code back, for the compiler to use. It's not clear t

Re: method calls on $self

2005-07-09 Thread Larry Wall
On Fri, Jul 08, 2005 at 08:28:34PM +0200, Robin Redeker wrote: : On Fri, Jul 08, 2005 at 10:07:24AM -0400, Stevan Little wrote: : > I have never understood what is wrong with this: : > : > method foo ($self: $bar) { : > $self.baz() : > } : : Thats a fine option to have. : But therecomes anoth

Re: method calls on $self

2005-07-09 Thread Larry Wall
On Fri, Jul 08, 2005 at 05:43:01PM +0200, Robin Redeker wrote: : Maybe per .-file in the home-directory, like .vimrc ... Only if pulled in with a "use". I don't want to see Perl programs implicitly starting in a variant language. Dialects must be declared. Otherwise you're in a situation like ha

Re: User-defined infix subs/methods?

2005-07-09 Thread Larry Wall
On Sat, Jul 09, 2005 at 11:34:23PM +0800, Autrijus Tang wrote: : In Pugs's ext/Set/lib/Set.pm, there are a number of user-defined : infix operators. To avoid unicode in mails, I'll use a hypothetical : &infix:<===> as the operator name. We've intentionally been using Unicode in this mailing list

Re: Quick OO .isa question

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 09:46:30AM -0400, Stevan Little wrote: : Ingo, : : On Jul 11, 2005, at 9:16 AM, Ingo Blechschmidt wrote: : >Hi, : > : > class Foo {} : > class Bar is Foo {} : > : > Bar.new.isa(Object);# true : > Bar.new.isa(Class); # false : > Bar.new.isa(Foo); # true :

Re: How do I... create a value type?

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 11:48:09AM -0600, Luke Palmer wrote: : Then you don't need any special magic. But if you want to have : mutator methods that aren't in .= form (which I recommend against for : value types), maybe the `is value` trait makes the class do the : `value` role, which gives you a

Re: method calls on $self

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 11:14:18AM +0200, Michele Dondi wrote: : Hmmm... I am one of those who likes ./ more, instead. I mean, I _really_ : like it! Thus, how about making '/' less meaningless, i.e. more : meaningful, in more general situations?!? Um, do you have a specific proposal? Like maybe

Re: Quick OO .isa question

2005-07-11 Thread Larry Wall
Though, arguably, if one is a true Platonist, one should view roles as Aristotelian, and base classes as Platonic and therefore more "real"...but I'm more of an Aristotelian myself, so I tend to think of the Platonic ideals as less real than reality. Whatever. Both Plato and Aristotle would proba

Re: Quick OO .isa question

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 05:35:41PM -0400, Stevan Little wrote: : So going away from philosophy 101 here, and back to CS, it could be : said that a "Class" has-a "MetaClass" (although not in the strict : user-level-OO sense of the word). Yes, though I think of it more as delegation. Of course, d

Re: method calls on $self

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 04:50:56PM -0400, Matt Fowles wrote: : Yay! I guess I will take this moment to resuggest @^ as a list of : invocants and $^ =:= @^[0]. I like how the ^ kinda points you the : right way, also visually distinctive and doesn't get in the way of : $_... I don't see much use f

Re: How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Larry Wall
On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: : The obvious thought is to have yet another magical, $^H like flag, to : denote the current dialect. If it is set, then the parser can emit : .method as $_.method, instead

Re: MML dispatch

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 08:13:22PM +0200, "TSa (Thomas Sandlaß)" wrote: : Actually it's a pitty, that the multi method call syntax isn't as : rich as the single method call syntax where we have .?method, .+method : and .*method. Something like (Snoopy, Mr_PotatoHead, HopeDiamond).*foo : doesn't exi

Re: What do use and require evaluate to?

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 12:15:30PM +, Ingo Blechschmidt wrote: : Hi, : : what do use and require evaluate to? : : S06 suggests it's probably some kind of Module object: : The result of a use statement is a (compile-time) object that also has : an .assuming method, allowing

Re: Raw bytes in perl6

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 04:53:49AM -, David Formosa (aka ? the Platypus) wrote: : How do we intend to manipulate raw binary in Perl6? Perl5's use : bytes; pragma is rather poor (forcing all strings to be raw in its : scope or requiring do {use bytes; ...} type tricks to deal with them) : and

Re: User-defined infix subs/methods?

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 05:27:48PM +0800, Autrijus Tang wrote: : On Sat, Jul 09, 2005 at 03:58:45PM -0700, Larry Wall wrote: : > It should take a little more effort to mess with the minds of : > unsuspecting modules, so maybe the standard syntax is cloned out of : > *STANDARD_PERL_6 or

Re: Hackathon notes

2005-07-12 Thread Larry Wall
On Thu, Jul 07, 2005 at 06:37:58PM +0800, Autrijus Tang wrote: : * A closure form of `but` is desugared into a `do given` block that : eliminates the need of returning $_ explicitly. So those two forms : are equivalent: : : my $foo = Cls.new but { : .attr = 1; : }; : : my

Re: How to write a self.pm (Re: method calls on $self)

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 12:36:23PM +0800, Autrijus Tang wrote: : On Mon, Jul 11, 2005 at 09:04:54PM -0700, Larry Wall wrote: : > On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: : > : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: : > : The obvious thought is to

Re: User-defined infix subs/methods?

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 05:10:14PM +0200, Michele Dondi wrote: : On Tue, 12 Jul 2005, Larry Wall wrote: : : >Good, I'd forgotten about that. Which means that it's even harder : >for someone to compile a module in a "strange" dialect, since they'd : >essentially

Re: MML dispatch

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 06:11:32PM +1000, Damian Conway wrote: : TSa (Thomas Sandlaß) wrote: : : >>Unique least-inherited most-specialized match, or default : > : > : >Do I read this correctly as dispatching partly in the class hierarchy : >and partly in the type hierarchy? : : Err. The class

Re: Raw bytes in perl6

2005-07-13 Thread Larry Wall
You guys are beating a live horse. Apocalypse 5 already discusses arrays pretending to be strings for the sake of parsing. The capability has to be there, and in fact Patrick has been bearing that in mind in the design of PGE. The only question for p6l is how much syntactic sugar you want. I've

Re: Method Resolution Order question

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 12:51:49PM -0400, Stevan Little wrote: : Hello, : : More questions for the metamodel. I am trying to add proper submethod : and private method handling and I have a question about method : resolution order as a whole. I asked a similar question last week, but : this time

Re: User-defined infix subs/methods?

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 05:48:47PM +0200, Ingo Blechschmidt wrote: : If you wanted the compiler to parse SomeOtherModule.pm using Ruby's : grammar, you'd have to write: : : use Grammar::Ruby; : reuse SomeOtherModule You'd also have to write "reuse", because we're not going to write it for

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

2005-07-13 Thread Larry Wall
On Tue, Jul 12, 2005 at 04:43:06PM +0530, Aankhen wrote: : I agree with what is being said here. `.method` is a great way to : eliminate a lot of repetitive, tedious typing. Surely there is a : viable alternative that doesn't involve outlawing it? Certainly. The problem is that there are too ma

Re: MML dispatch

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 05:33:18PM -0400, David Storrs wrote: : I'd like to have it explained what Roles : offer that justifies their existence, since they won't be anything : but a restricted form of a class. Please check your assumptions. In addition to what chromatic said, I'd like to poin

Re: What do use and require evaluate to?

2005-07-13 Thread Larry Wall
On Tue, Jul 12, 2005 at 08:48:41PM +0300, Gaal Yahas wrote: : I propose to throw away the filesystem coupling, and map from a more : general name of the bit of code we are requiring to a more general : description of which instance of it we actually got. Once modules return : interesting values, it

Re: What do use and require evaluate to?

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 11:09:40AM +0100, Piers Cawley wrote: : So long as there's some way of asking the garbage collector for everything in : the live set so you can grep through them I'm sure you're right. Because almost : everything is extensible at runtime a class is going to need some way of

Re: User-defined infix subs/methods?

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 09:19:29AM +0800, Autrijus Tang wrote: : Within perl 5, there is an extremely easy way to write that, namely : coderef in @INC that provides line-based filtering: : : http://search.cpan.org/dist/Acme-use-strict-with-pride/pride.pm : : Are we to discontinue use of [EMAI

Re: Method Resolution Order question

2005-07-14 Thread Larry Wall
On Wed, Jul 13, 2005 at 07:27:52PM -0400, Stevan Little wrote: : The way I am viewing the notion of "current class" for submethods : currently is: : : From inside another method or submethod: : : - a submethod should only be called from the class which defines it. This doesn't sound right to me

Re: MML dispatch

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 03:27:53PM +1200, Sam Vilain wrote: : Can I present an alternative way of viewing them, which I don't think : contradicts with what I've understood of them so far from the : Apocalypses and Synopses documents. : : First a couple of definitions; : : A "runtime class" is a

Re: more .method (was: Perl 6 Summary for 2005-07-05 through 2005-07-12)

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 12:14:57PM -0600, John Williams wrote: : Actually I took his question to be: : : If I explicitly name my invocant in the method signature, does that give : the compiler enough assurance that I'm not going to use .method to mean : $?SELF.method, and it will allow me to safel

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

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 12:55:26PM -0400, Nathan Gray wrote: : So long as .foo (pretty please) means $_.foo all the time (with sugar on : top?). It means that all the time, but only when unambiguous. If you say use dot; it'll always be construed as unambigous. You could go so far as to say

Re: Method Resolution Order question

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 04:31:07PM -0400, Stevan Little wrote: : > A submethod is simply a method that says "These : >aren't the droids you're looking for" if you call it via either SMD : >or MMD dispatch and the first invocant isn't of the exact run-time : >type of the lexical class. In other wor

Re: Optimization pipeline

2005-07-14 Thread Larry Wall
There may be some tie-in with STM here too, where a particular optimization doesn't commit if the optimization gives up in the middle, or is preempted before it gets done. But maybe it's all done with cooperative multitasking. (But maybe STM is how they cooperate...) Just a half-baked thought.

Re: Optimization pipeline

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 06:06:24PM -0700, Dave Whipp wrote: : Yuval Kogman wrote: : : > - optimizers stack on top of each other : > - the output of each one is executable : > - optimizers work in a coroutine, and are preemptable : > - optimizers are small : > - optimizers opera

Re: Strange interaction between pairs and named binding

2005-07-18 Thread Larry Wall
On Mon, Jul 18, 2005 at 08:42:24PM +0800, Autrijus Tang wrote: : This currently works in Pugs: : : for [1..10].pairs -> Pair $x { say $x.value } : : But this does not: : : for [1..10].pairs -> $x { say $x.value } : : Because the ruling that pairs must not be bound to parameters that are

Re: More Method Resolution Order Questions (and WALKMETH and WALKCLASS)

2005-07-18 Thread Larry Wall
On Mon, Jul 18, 2005 at 02:54:40PM -0400, Stevan Little wrote: : Ok, I will un-warnock myself here :) Sorry, I've been occupied by various time-consuming family obligations. : And after some discussion on #perl6 I decided to make 'C3' the : algorithm of choice for the :ascendant ordering, and al

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-18 Thread Larry Wall
On Mon, Jul 18, 2005 at 03:34:36PM +1200, Sam Vilain wrote: : Say I make an "accessor" method for an attribute that doesn't really : 'exist'. : : For instance, a good example of this is the "month_0" vs "month" : properties on a date object; I want to make both look equivalent as : real properties

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-19 Thread Larry Wall
On Tue, Jul 19, 2005 at 02:21:44PM +1200, Sam Vilain wrote: : Larry Wall wrote: : > > Users of the class includes people subclassing the class, so to them : > > they need to be able to use $.month_0 and $.month, even though there : > > is no "has $.month_0" declared

Re: Referring to package variables in the default namespace in p6

2005-07-19 Thread Larry Wall
On Tue, Jul 19, 2005 at 07:25:35PM +0100, Matthew Hodgson wrote: : Hi all, : : I've spent some of the afternoon wading through A12 and S10 trying to : thoroughly understand scope in perl 6, in light of the death of use vars : and the addition of class (as well as package & module) namespaces. :

Re: Tail method calls, can(), and pre-currying

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 09:59:57AM -0300, Adriano Ferreira wrote: : I can understand the convenience of turning a method into a subroutine : by currying the object. Syntactical support for this seems cool too. : But, can someone remind me why there is the need for an explicit tail : call syntax? It

Re: Hash creation with duplicate keys

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 11:21:05AM -0600, Luke Palmer wrote: : On 7/20/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: : > Hi, : > : > # Perl 5 : > my %hash = (a => 1, b => 2, a => 3); : > warn $hash{a}; # 3 : > : > But I vaguely remember having seen...: : > : > # Perl 6 : >

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 05:16:39PM +1200, Sam Vilain wrote: : Making $.foo =:= $?SELF.foo, and getting to the "raw" attribute $.SUPER::foo : seems like the better solution to me. But of course, it would, because : that's : how *I* program, and $?SELF != all(@coders). : : Then we could even sneak

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 02:29:33PM -0600, Paul Seamons wrote: : On Thursday 21 July 2005 12:48 pm, Larry Wall wrote: : >     * Don't need to topicalize self any more. : > : >     * .foo can (again) always be the topic without warnings. : : Thank you. : : Do the following exist the

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread Larry Wall
et is sink in a little : more to know for sure. In the meantime I have some questions: : : On Jul 21, 2005, at 2:48 PM, Larry Wall wrote: : >* All roles can write their shared attributes as $.x and not worry : > about whether the class declares them or not. : : I assume they need not

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 03:25:17PM -0400, John Siracusa wrote: : On 7/21/05, Larry Wall <[EMAIL PROTECTED]> wrote: : > Have at it... : : The only thing I immediately don't like is the use of the normal identifier : character "_" to indicate the "specialness&

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 10:17:13PM +0200, "TSa (Thomas Sandlaß)" wrote: : Larry Wall wrote: : >has $x; # private rw, no accessors, not virtual, name lexically : >scoped : > : >has $_x; # private rw, rw _x accessor, not virtual, name class scoped : : Ev

Re: Tail method calls, can(), and pre-currying

2005-07-21 Thread Larry Wall
On Thu, Jul 21, 2005 at 11:58:41AM -0300, Adriano Ferreira wrote: : Larry said: : > So I guess I agree that .tailcall is probably just a bad synonym for "return". : : But is there any other case where we need an explicit tail call with "goto"? I suppose that depends on whether the tail-call opti

Re: Tail method calls, can(), and pre-currying

2005-07-22 Thread Larry Wall
On Fri, Jul 22, 2005 at 07:04:24AM -0700, Brent 'Dax' Royal-Gordon wrote: : On 21/07/05, Adriano Ferreira <[EMAIL PROTECTED]> wrote: : > But is there any other case where we need an explicit tail call with "goto"? : : When the callee uses `caller Which we may not know, especially if we're tail-ca

<    1   2   3   4   5   6   7   8   9   10   >