Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Larry Wall
gt; >> the LAST time through a loop? etc. > > > An exception is certainly a phase-change. Last time through a loop? Well, > context anyway, if not phase, unless phase means "stage" in this instance. > Hmm, I'm starting to talk like Larry. Bad John

Re: syntax question on parameter lists

2008-04-10 Thread Larry Wall
ould be confused with use of : after the invocant, and it follows that : : method bytes (Encoding :encoding($override_encoding)) returns Int : : would work. Indeed. Larry

Re: default parameters in methods

2008-04-10 Thread Larry Wall
and can do anything that you would expect from their lexical position. All default expressions to any parameter are defined to run in the context that assumes any parameters to their left are already bound, so you may safely depend on self already being set. Larry

Re: syntax question on parameter lists

2008-04-10 Thread Larry Wall
typename, but I have it commented out at the moment due to the fact that my current longest-token matcher can't backtrack to an alternate choice. That is a temporary condition, hopefully. Larry

Re: slurpy scalar parameter?

2008-04-12 Thread Larry Wall
; : : If you call head(@foo), in the first $head gets @foo[0] and in the : second it gets nothing (you didn't pass a scalar). Nope, second one gets @foo as a scalar, and nothing in the list. Larry

Re: quick ones on subs

2008-04-12 Thread Larry Wall
we make no promises about supporting multiple dispatch on named args other than by excluding candidates that can't bind at all. Larry

Re: What is the "self pragma"?

2008-04-12 Thread Larry Wall
ma is changing a built-in keyword, we usually name it the same as the keyword, and we're claiming that a self pragma is the right name for modifying "self". Or something like that. Now that people have gotten used to self.foo and $.foo, it may be that the demand for the pragma has fallen off a bit... :) Larry

Re: Symbolic references and OUTER

2008-04-12 Thread Larry Wall
c chain it might be. Yes, OUTER is necessarily always a particular lexical scope known at compile time. Which is why we have CALLER for the other case. :) Larry

Re: quick ones on subs

2008-04-12 Thread Larry Wall
On Sat, Apr 12, 2008 at 08:00:19PM -0500, John M. Dlugosz wrote: > Larry Wall larry-at-wall.org |Perl 6| wrote: >> What gives (in the sense of breaking) is the notion that you can do >> multiple dispatch on randomly ordered arguments. That's the main >> reason we inve

Re: cross operator and empty list

2008-04-14 Thread Larry Wall
() in list context always just disappears. And 0,1 X () is going to be (). Perl 6's infix: is defined over lists, not sets. If you want to overload X for set types, you may. Larry

Re: cross operator and empty list

2008-04-14 Thread Larry Wall
On Mon, Apr 14, 2008 at 06:28:06PM +0200, TSa wrote: > HaloO, > > Larry Wall wrote: >> No, the inner () is also in list context, and () in list context >> always just disappears. >> >> And 0,1 X () is going to be (). Perl 6's infix: is defined over >>

Re: cross operator and empty list

2008-04-14 Thread Larry Wall
On Mon, Apr 14, 2008 at 11:47:04AM -0600, Doug McNutt wrote: : At 09:58 -0700 4/14/08, Larry Wall wrote: : >By the way, you don't need to put parens around the arguments to X. It takes a list on either side. We made it tall so that it would stand out visually anyway: : > : >$a

Re: static types, checking, conversions

2008-04-16 Thread Larry Wall
less efficient. Larry and i have discussed this and that was his goai in Perl. Now Perl doesn't quite meet that because of inferred method dispatch on .new(). you need to change : : my Dog $spot = .new(); : : to : : my $Spot = Dog.new(); : : when you remove the declaration. You&#

Re: Chained Comparisons ?

2008-04-16 Thread Larry Wall
AND. The user just writes an ordinary binary comparison that returns a boolean. For several years now I've been treating any use of "but" as a code smell, and changing the design so it isn't necessary. It's been a rather useful construct that way, like "eval" and "BEGIN". :) Larry

Re: static types, checking, conversions

2008-04-17 Thread Larry Wall
On Thu, Apr 17, 2008 at 09:24:47AM +0200, TSa wrote: > HaloO, > > Larry Wall wrote: >> On Wed, Apr 16, 2008 at 04:29:23PM +, [EMAIL PROTECTED] wrote: >> : my Dog $spot = .new(); >> : : to >> : : my $Spot = Dog.new(); >> : : when you remove the decla

Re: Help understanding syntax in S06 "Pairs as lvalues"

2008-04-17 Thread Larry Wall
binding as close as reasonably possible, except that "my" parameters don't default to readonly. They're more like ref parameters, I guess. Larry

Re: Context and return types question

2008-04-18 Thread Larry Wall
the same in either case, except that if you declare the "of" type as Array, you give the compiler/optimizer/type inferencer more information to work with at compile time. Larry

Re: Returning Arrays?

2008-04-18 Thread Larry Wall
there without an identifier. S02:1627 S06:883 S06:2119 S10:117 So I think (-->@) is fine as shorthand for returning something guaranteed to provide the Positional role. (Those underlying sigil roles have long names to discourage their explicit use, in any case. :) Larry

Re: Are coroutines still there?

2008-04-18 Thread Larry Wall
n like loop and goto and die (and anything else considered harmful but useful). But I don't see much use for it offhand. Larry

Re: Questions about design of perl, parrot

2008-04-18 Thread Larry Wall
Perl community. Then when someone like you points out something related in the literature, it sometimes happens that someone (usually someone other than me) will go off somewhere and read some of it and report if there are some good ideas to steal somehow. :) Larry

Re: method hiding (or not) in derived classes

2008-04-21 Thread Larry Wall
pports it out the scope of the current class. Basically, multi methods are just treated as multi subs inside a class, except the invocant is predecided and doesn't make any difference to the dispatch within the class. Larry

Re: Decrement of Numbers in Strings (Was: [svn:perl6-synopsis] r14460 - doc/trunk/design/syn)

2008-04-23 Thread Larry Wall
bly enough non-meta operators in standard Perl 6, and we shouldn't be looking for excuses to make new ones for operations that will seldom make a difference in practice. And Perl 6 thinks the difference between "09" and 9 is 0... :) Topping all that is that the "09" behavior can be lazily explained after the fact, while a new operator would have to be explained beforehand. Larry

Re: Decrement of Numbers in Strings (Was: [svn:perl6-synopsis] r14460 - doc/trunk/design/syn)

2008-04-24 Thread Larry Wall
s to be subsets. 'xxx' is just a Str that is constrained to be equal to three x's. So please don't also try to make subsets into real types, if you want to keep your types separate... Larry > It were interesting to know what $x.new returns. If that dispatches > to Str

Re: Decrement of Numbers in Strings (Was: [svn:perl6-synopsis] r14460 - doc/trunk/design/syn)

2008-04-24 Thread Larry Wall
On Thu, Apr 24, 2008 at 08:10:12PM +0200, TSa wrote: > HaloO, > > Larry Wall wrote: >> On the other hand, "09" has the advantage of still having the numeric >> value 9. > > Well, I think the canonical representation of of 9 is "9". The mapping &

Re: Decrement of Numbers in Strings (Was: [svn:perl6-synopsis] r14460 - doc/trunk/design/syn)

2008-04-24 Thread Larry Wall
menting "10" or incrementing "-100". So I think I'll probably reinstate the "looks like a number", at least for integers in decimal notation. We've got to scan the string anyway to look for the final alphanumeric string anyway, so seeing if it's pure digits with optional '-' on the front would not be any more inefficient. Larry

Re: given vs for

2008-04-25 Thread Larry Wall
iterator" } > } Erm, .length is dead, and .WHAT just smells that way. given @foo { when .elems > 5 { say "That's a long list" } when .elems == Inf { say "That's a very long list" } when Range { say "That's an iterator" } } Larry

Re: given vs for

2008-04-25 Thread Larry Wall
uments. You can also do it explicitly with a Capture declaration in the signature and the prefix:<|> capture interpolator in an argument list.. However, &foo doesn't mean what it means in Perl 5. It's just the function as a noun rather than a verb. Larry

Re: treatment of "isa" and inheritance

2008-04-30 Thread Larry Wall
On Wed, Apr 30, 2008 at 07:29:58AM -0500, John M. Dlugosz wrote: > I am listening. I'm synthesizing and documenting. I'm also disappointed > with the lack of feedback from Larry, considering the amount of effort and > time I'm putting into it. But I'm sure he

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Larry Wall
y nose runs and my feet smell. Quack. Larry

Re: First look: Advanced Polymorphism whitepaper

2008-05-01 Thread Larry Wall
uck, then you'd better duck, because the person drawing the gun is probably not an artist. Larry

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread Larry Wall
On Fri, May 02, 2008 at 08:30:25AM -0500, John M. Dlugosz wrote: > I agree. If typing is turned on, you want errors if you pass the wrong > type. You have to explicitly declare that Bar is an acceptable substitute > for Foo. Maybe we already have this--see "emulates" in S11. Larry

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread Larry Wall
ntax at all. If this is a proposal, I don't think it'll fly easily. Currently sub foo ( Feline &f ) is shorthand for sub foo ( &f:(-->Feline) ) Larry

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread Larry Wall
subset mysub of Code where &mysub.sig; sub mysubuser ( &f where mysub ) {...} # note & sub mysubuser ( mysub $f ) {...} # note $ Larry

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread Larry Wall
should version themselves so that the snapshots can be distinguished by longname. Alternately, we make one snapshot when a class is first composed, and refuse to make any other snapshots for that name regardless of how the class under that name changes. Larry

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread Larry Wall
On Fri, May 02, 2008 at 12:21:27PM -0700, chromatic wrote: : On Friday 02 May 2008 11:55:54 Larry Wall wrote: : > The only interesting question in my mind is whether you can take : > another snapshot and override the previous one somehow, or whether : > such derived roles should version t

Re: "All classes imply the existence of a role of the same name."

2008-05-02 Thread Larry Wall
t. : : http://www.perlfoundation.org/perl6/index.cgi?perl_6_people : : I could edit it into a Synopsis if you really want. Tweet! Foul on #17. Two shots! Larry

Re: Minimal Distance (Re: Where is "Manhattan Dispatch" discussion?)

2008-05-06 Thread Larry Wall
>> run-time error where you might prefer DWIM. > > Perl 6 is the same, just at runtime with actual types of actual objects. > That's it. Indeed, Perl 6 threw out Manhattan distance a couple years ago. Do we have to spec everything that Perl 6 ever was but isn't now? :) Larry

Re: my TypeName $x;

2008-05-06 Thread Larry Wall
the main reason we initialize with an undef of the correct sort is so that you can say my Dog $x .= new(); But what would (Dog|Cat).new() do? Constructors are not required to know about subset types or roles. Constructors just create plain ordinary classes, I expect. Composition and constraint checking happen elsehwere. Larry

Re: Minimal Distance (Re: Where is "Manhattan Dispatch" discussion?)

2008-05-06 Thread Larry Wall
On Tue, May 06, 2008 at 08:47:47PM -0500, John M. Dlugosz wrote: > Larry Wall larry-at-wall.org |Perl 6| wrote: >> On Tue, May 06, 2008 at 08:20:40PM +0200, TSa wrote: >> >>> HaloO, >>> >>> John M. Dlugosz wrote: >>> >>>>

Re: my TypeName $x;

2008-05-06 Thread Larry Wall
ner, but of the value. You'd have to say VAR($x).HOW to get the inner workings of the container. Scalar containers always delegate to their contents. In contrast, @x.HOW would be equivalent to VAR(@x).HOW, because composite objects used as scalars assume you're talking about the container. Larry

Re: parameters: ref vs rw

2008-05-10 Thread Larry Wall
s that rw will cause autovivification and ref won't. Larry

Re: parameters: ref vs rw

2008-05-10 Thread Larry Wall
d that ref must already >> be. But what is that supposed to mean? > > > At a guess, "is rw" makes a parameter variable into a local read/write > variable initialized with the parameter value. Changes to it are not > reflected in the caller. That would be "is copy" Larry

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-02 Thread Larry Wall
before I start fleshing > out the hierarchy for p5 autodie? As chromatic suggested, it would be good to use some kind of role-ish mixin idea (with or without Moose) instead of hierarchies of strings. > * Is this an appropriate question for p6l? I dunno--you're dragging us back down from the stratosphere of theory to the troposphere of practice. I don't know if everyone here can stand the shock. :) > While it relates to a p5 > pragma, I hope to make the behaviour as compatible with p6 as possible. Yes, I don't expect we can keep things entirely lined up, but it would be nice to avoid gratuitous divergence if we can. Larry

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-04 Thread Larry Wall
to inflict the maximum possible damage on the enemy, which is our highest goal, after all. :) Larry

Re: Foo.HOW.metamethod vs Foo.^metamethod

2008-06-09 Thread Larry Wall
On Sat, Jun 07, 2008 at 09:49:03PM +0100, Daniel Ruoso wrote: : 2) Assume the capture-translation and define that : $foo.HOW.can($foo,'bar') keeps the $how as the invocant and must receive : the referring object as first argument. I prefer this approach, I think. Larry

Re: [svn:perl6-synopsis] r14549 - doc/trunk/design/syn

2008-06-11 Thread Larry Wall
) : : Ah, I should have been more specific - I meant that, since ~~ treats : Ranges as continuous intervals, 0 ..^ 10 isn't the same as 0 .. 9. : Although I guess there's no way to unabbreviate 0 ..^ 10... Well, maybe 0 .. 10-ε or some such. Larry

Re: fallback semantics of list methods

2008-06-14 Thread Larry Wall
want to convert the invocant to a particular type across the language as a whole. No fallback is then necessary, and the fact that the Prelude is defining language-wide default semantics is not a problem at all, because that's precisely what the Prelude is for. And I don't see any problem with the Any class claiming to own .join since subclasses can still override if the like. Larry

Re: and in S05

2008-06-21 Thread Larry Wall
olve capture. True, those are fossils. Larry

Re: Rakudo test miscellanea

2008-06-26 Thread Larry Wall
things regarding type C that are type B's bailiwick. On the other hand, transparency of code suffers under transitive coercion, and the syntax above is no great hardship. Plus we could always add something spectacularly explicit like Int as (Rat.as) if people decide they give one. ;) Larry

Re: Rakudo test miscellanea

2008-06-26 Thread Larry Wall
loating-point. We could go as far as to guarantee that Nums do rational arithmetic out to a certain point, but probably what the financial insitutions want is special fixed-point types that assume a divisor anyway. Would any financial institution care to comment? Larry

Re: Type of literals

2008-06-26 Thread Larry Wall
returns Int doesn't mean the compiler has to represent 1 the same way it represents 42. But it wants to look that way from the viewpoint of the programmer, who pines for an occasional smattering of foolish consistency. Larry

Re: Rakudo test miscellanea

2008-06-26 Thread Larry Wall
On Thu, Jun 26, 2008 at 09:46:25AM -0700, Larry Wall wrote: : the VM somehow sneaks in the appropriate conversion for us if we : actually try to pass an Int to a Rat. I'd point out that this is fundamentally the same decision point that is reached when we want to do boxing, because we basi

Re: Should C and C work in C ?

2008-06-30 Thread Larry Wall
ormally does list-type operations. : : I'm suspecting that the answer is "yes, they are universal", : but wanted to confirm it. Confirmed. (Though note that Str.reverse probably overrides Any.reverse, unless we give string reversal a different name.) Larry

Re: Interrogating signatures

2008-07-08 Thread Larry Wall
considered one of the parameters. Larry

Re: Question about .sort and .reduce

2008-07-12 Thread Larry Wall
$^b }.assuming(:a(3)); Also, it may well be that f(3) will say Order::Same rather than 0. :) Larry

Re: Question about .sort and .reduce

2008-07-12 Thread Larry Wall
in infix position always pick the most recent operator (that isn't hidden inside brackets or parens). Larry

Re: $foo[0][0] versus $foo[0;0]

2008-07-16 Thread Larry Wall
er hand, a naïve implementation of the multidimensional subscripter might just do the same thing internally for the semicolon, so it could be a wash. Larry

Re: Complex planes

2008-07-16 Thread Larry Wall
tions if we can assume them to be both sufficiently lazy and sufficiently intelligent... :) Larry

Re: meta_postfix:<*>

2008-07-16 Thread Larry Wall
d automatically yield the scalar : multiplication infix:<+*>:(Vector,Num) when infix:<+>:(Vector,Vector) is : defined as expected. You can, of course, do anything you like with your own copy, but the standard reserves most of Unicode as the playground of mathematicians, so please leave our poor little * alone. :) Larry

Re: Complex planes

2008-07-16 Thread Larry Wall
It seems like my smiley went completely whoosh... Larry

Re: "returns" keyword - current meaning?

2008-08-02 Thread Larry Wall
er and S06 is out of date here. Is that > correct? I'll make proposed edits to the file to send back to the > maintainer, once I know which way is correct. Yes, that is correct--"returns" used to be the way to specify "as" type, but we introduced "as" for that and now "returns" is synonymous with "of". Larry

Re: "Code-only forms"?

2008-08-02 Thread Larry Wall
cal scope of the statement, but a temp would presumably not. But arguably the proper thing would be to outlaw lexically scoped declarations entirely in such a conditional thunk, akin to the P5.10 restriction on my $x = 1 if 0; Larry

Re: continuation taken?

2008-08-02 Thread Larry Wall
value outward. I guess that'd work. As for temporizing the results of code execution, that probably will have to wait on a coherent transactional memory model, which may or may not be deferred till after 6.0.0, but my bets are on "may" at this point. :) Larry

Re: A few multiple dispatch questions

2008-08-05 Thread Larry Wall
memoized based on the typeshape of the Capture, it will generally not have to be redone until you see a different typeshape (where the meaning of "different" may depend on how specific the signatures are, and in particular on whether any of the signatures rely on subset constraints (including individual values, which are just degenerate subsets)). Larry

Re: syntax question: "method close is export ()"

2008-08-06 Thread Larry Wall
candidate for a null name: sub () is foo {...} is of course not possible. I suppose we could nudge things in a direction that sub & is foo {...} would work, since that'd be much like state $ = do { "I am a fake START block" } But if we allow "sub &foo" then people will wonder what "sub @foo" means... Larry

Re: Catching exceptions with the // operator

2008-08-06 Thread Larry Wall
d a statement as an argument, where currently you could write try $x if $y; But staring at those two, I'd say the parens are almost a feature from the least surprise viewpoint. Larry

Re: adverbs o operators

2008-08-07 Thread Larry Wall
nteed not to work. I can't imagine why anyone would want a ",:foo" operator, for instance. Doubtless there are other confusing operators though. Alternately, we could force everyone to put space after comma. :) Larry

Re: Another adverb on operator question

2008-08-07 Thread Larry Wall
ot. But I think that's kinda tacky, and your example still would not work unless you changed it to [lt:lc]. There comes a point at which it's just better to force the user to say: my &infix: ::= &infix:.assuming(:lc); [lt_lc] $a, $b, $c; Larry

Re: [svn:perl6-synopsis] r14574 - doc/trunk/design/syn

2008-08-08 Thread Larry Wall
On Fri, Aug 08, 2008 at 10:34:50AM -0700, [EMAIL PROTECTED] wrote: : Author: larry : Date: Fri Aug 8 10:34:49 2008 : New Revision: 14574 : : Modified: :doc/trunk/design/syn/S02.pod : : Log: : allow isolated ' and - in identifiers (only if followed by alpha) Darn the syntax highli

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-13 Thread Larry Wall
like: rand*100 100.rand (1..100).pick And, in fact, if you say "rand 100" the current STD grammar complains: Obsolete use of rand(N); in Perl 6 please use N.rand or (1..N).pick instead Larry

Re: arrayref/hashref in spectest suite

2008-08-20 Thread Larry Wall
ference, if you will) by default. It's quite possible this is insane, but I can't tell in my current state of jet lag. Larry

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-20 Thread Larry Wall
he apostrophe rule in the standard grammar, so I'm not going to go out of my way to add maximum flexibility to the base grammar. Currently the apostrophe rule reads: token apostrophe { <[ ' \- ]> } Larry

Re: whats wrong with this code?

2008-08-22 Thread Larry Wall
#x27;re trying to cheat on the scalar parameters somehow. It's not needed in list context. Larry

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-24 Thread Larry Wall
left, but not on the right. Interestingly, ?& and ?| collapse both sides because they coerce both sides to boolean. Either that, or we make neither side collapse, if someone can come up with a use case for junctional booleans, though I suspect the same purpose can be served by +& and +| if you're careful only to feed it 1 or 0. So probably conceptual consistency is better here. Larry

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-24 Thread Larry Wall
On Sun, Aug 24, 2008 at 05:05:46PM -0500, Patrick R. Michaud wrote: : On Sun, Aug 24, 2008 at 03:00:54PM -0700, Larry Wall wrote: : > : Question to p6l: do && and || autothread? Or do they collapse the : > : junction prior to evaluation? (I hope the latter, since I think it'

Re: how much detail can I get from caller.want?

2008-09-01 Thread Larry Wall
o that, but until someone invents a quantum computer that can lift monads, we have to worry about side effects sooner or later... :) Larry

Re: What happened to "err" operator?

2008-09-01 Thread Larry Wall
#x27;s more to it than that. Politically, it's a kind of compromise between p5p and me. I hated their "dor" operator, and p5p by and large hated the "err" operator. The result was that we switched to "orelse" and they dropped "dor". So the preceding paragraph can be construed as a mere rationalization of why the sausage came out of the sausage factor green this time. :) Larry

Re: how much detail can I get from caller.want?

2008-09-01 Thread Larry Wall
On Mon, Sep 01, 2008 at 03:40:39PM -0400, Brandon S. Allbery KF8NH wrote: > On 2008 Sep 1, at 15:20, Larry Wall wrote: >> On Mon, Sep 01, 2008 at 05:52:28PM +0200, TSa wrote: >>> John M. Dlugosz wrote: >>>> Perhaps the supplier of the CPAN module for the nth fu

Re: What happened to "err" operator?

2008-09-02 Thread Larry Wall
orelse d() orelse e(); CATCH { when MajorMalfunction { die "oopsie" } } assuming that exceptions somehow get returned or thrown appropriately. I suppose orelse could itself throw any exception that it doesn't want to treat as benign, and the CATCH block would handle it. And the definition of "benign" could then be pragmatically controlled if the default wasn't good enough, I suppose. Larry

Re: What happened to "err" operator?

2008-09-03 Thread Larry Wall
On Wed, Sep 03, 2008 at 06:41:10PM -0500, John M. Dlugosz wrote: > Larry Wall larry-at-wall.org |Perl 6| wrote: >> a() orelse b() >> >> you might want to: >> succeed on a() >> trap mild failure of a() and try to succeed on b() instead >>

Re: Should !~~ /regex/ set $/?

2008-09-06 Thread Larry Wall
other words, it sets $/ just like the normal ~~ operator, but the boolean sense comes out backwards: if $a !~~ /foo/ { # $/ is false } else { # $/ is true } Larry

Re: [perl #58626] default and when * execute even when another when clause is used

2008-09-06 Thread Larry Wall
mere "{...}" or "..." on the assumption that you don't actually have to test for the default condition. Which you don't, but it should still run only one default block, so it should really turn into something like "{...; break}". Larry

Re: Conceptual question on exception in S04

2008-09-06 Thread Larry Wall
ace. By the way, I'd like to see a user interface where the outer exception is the one printed out in simple form, with the complete "cockpit recorder" dump of information going into a file that is browser accessible with a click on a link in the error message to "more info". Larry

Re: adverbial form of Pairs notation question

2008-09-06 Thread Larry Wall
failure in item context. Possibly the right side of a pair should be capture context rather than item context. Not sure about that... Larry

Re: How do you do a lazy map?

2008-09-08 Thread Larry Wall
nstraints, > such as whether it can be multi-threaded or merely delayed 'till needed. I think you're looking for "hyper" here, which implies unordered execution (but still with ordered results). If you really want unordered results you'd have to do something like a gather containing a hyper containing a take. Larry

Re: Iterator semantics

2008-09-09 Thread Larry Wall
seems to me like the most multicore-friendly default, though perhaps not the most programmer friendly. It seems to me that any programming involving cyclic lazy feeds must somehow have an "eager" in it somewhere to prevent indeterminacy, but I don't know how to write a compiler that enforces that offhand. Larry

Re: Iterator semantics

2008-09-11 Thread Larry Wall
On Tue, Sep 09, 2008 at 08:50:02AM -0700, Larry Wall wrote: : At the moment the design of Perl 6 (unlike certain FP languages) is : that any dependence on the *degree* of laziness is erroneous, except : insofar as infinite lists must have *some* degree of laziness in order : not to use up all your

Re: Chained Modifiers

2008-09-17 Thread Larry Wall
rrently considered a terminator that doesn't distinguish between expression termination and statement termination), but I'm not sure how to fix it yet. It's possible that statement modifiers should be demoted to very-low-precedence operators, but there are some problems with that that I don't have enough brain to think through at the moment. Larry

Re: Should $.foo attributes without "is rw" be writable from within the class

2008-09-17 Thread Larry Wall
s orthogonal to the actual class boundary, if you ignore the fact that we prohibit $!foo access from outside the class. (And, in fact, we could probably still get at it with a private method from outside the class if there is an appropriate "trusts" declaration.) Larry

Re: S05 and S29 may conflict on behavior of $string.match(/pat/)

2008-09-18 Thread Larry Wall
rify what the behavior should be? S05 is using a different definition of "match". In S05 it means more like "one low-level run of the regex engine" rather than "one high-level call to the .match method". In other words, the .match method can do multiple matches. Larry

Re: What should ''.split('') return?

2008-09-19 Thread Larry Wall
rn the null strings before or after 'a', just ('a'). Larry

Re: Smooth numeric upgrades?

2008-10-03 Thread Larry Wall
ed "Int". A native "int" is another matter, but that's just a storage constraint, and probably shouldn't influence intermediate computations, which are done in Int. So it shouldn't matter whether 2 and 1100 are stored in Int or int form; the result should be the same (subject, perhaps to pragmatic control of temp types). Larry

Re: [svn:perl6-synopsis] r14586 - doc/trunk/design/syn

2008-10-05 Thread Larry Wall
iven away some of those value via an iterator. Here's a cute variant that doesn't have to store all the values just to keep count: 1 ... { $_ + 1 if ++(state $) < 10 } Hmm, I think *my* state's $ will soon be less than 10, at the rate they're spending... :) Larry

Re: [svn:perl6-synopsis] r14586 - doc/trunk/design/syn

2008-10-05 Thread Larry Wall
On Sun, Oct 05, 2008 at 07:31:30PM -0700, Larry Wall wrote: : @seq := 1 ... { $_ + 1 if @seq < 10 } Actually, that one might not work, since we can't find the length of @seq without knowing how many value the closure will generate. The implicit version would not have that problem. Larry

Re: [svn:perl6-synopsis] r14586 - doc/trunk/design/syn

2008-10-05 Thread Larry Wall
e tools to do this sort of thing explicitly instead of : having to rely on the optimizer to know how to do this implicitly. Um, I don't understand what you're asking for. Explicit solutions are always available... Larry

Re: [svn:perl6-synopsis] r14586 - doc/trunk/design/syn

2008-10-06 Thread Larry Wall
On Mon, Oct 06, 2008 at 09:09:55AM -0700, Jon Lang wrote: : Larry Wall wrote: : > On Sun, Oct 05, 2008 at 08:19:42PM -0700, Jon Lang wrote: : > : <[EMAIL PROTECTED]> wrote: : > : > Log: : > : > Add missing series operator, mostly for readability. : > : : > : Is

Re: Store captures and non-captures in source-string order

2008-10-13 Thread Larry Wall
s, but may intermediate linearizations are possible. Don't want to get stuck into binary thinking here... Larry

Re: Store captures and non-captures in source-string order

2008-10-13 Thread Larry Wall
with the "fate" system of STD it might even be relatively easy to put the parser back into a state that was deeply recursive and restart the parse at any point. 'Course, "relatively easy" is one o' them relative concepts... :) Larry

Re: [svn:perl6-synopsis] r14597 - doc/trunk/design/syn

2008-10-16 Thread Larry Wall
-right evaluation of additional constraints. Larry

Re: A question about arrays

2008-10-16 Thread Larry Wall
on $othernode, so that I could ensure that > they belong to the same tree, for example. Is there a way I can do that? You have to write your own wrapper methods for that. Delegation does not mix well with micromanagement. :) Larry

<    11   12   13   14   15   16   17   18   19   20   >