Re: How to default? (was Unary dot)

2002-04-12 Thread Trey Harris
In a message dated Fri, 12 Apr 2002, Ashley Winters writes: Would it would be reasonable to have given default to the caller's topic? sub printRec { given { # $_ is now the caller's topic in this scope } } Perhaps Cgiven caller.topic {} would work as well. Yes, something

Re: How to default? (was Unary dot)

2002-04-12 Thread Trey Harris
In a message dated Fri, 12 Apr 2002, Luke Palmer writes: Couldn't you do it with old-style Perl5 subs? sub printRec { my $p = chomp(shift // $_); print :$_:\n } Or am _I_ missing something? That definitely won't work (aside from the $p/$_ swap which I assume is unintentional),

Re: How to default? (was Unary dot)

2002-04-12 Thread Trey Harris
Oops, caught my own mistake... In a message dated Fri, 12 Apr 2002, Trey Harris writes: In a message dated Fri, 12 Apr 2002, Luke Palmer writes: sub printRec { my $p = chomp(shift // $_); print :$_:\n } [Should be equivalent to] sub printRec { my $p = chomp(shift // shift

Re: How to default? (was Unary dot)

2002-04-12 Thread Trey Harris
In a message dated Fri, 12 Apr 2002, Glenn Linderman writes: $_ becomes lexical $_ gets aliased to the first topic of a given clause (hence changes value more often, but the lexical scoping helps reduce that impact) Okay. But it sounds like you're saying that Cgiven, and Cgiven only,

Re: named params, @_, and pass-by-reference

2002-04-17 Thread Trey Harris
flattened? Trey -- Trey Harris Secretary and Executive SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

Re: Please rename 'but' to 'has'.

2002-04-21 Thread Trey Harris
has green just sounds plain weird. but is absolutely perfect, Larry. I say keep it. Trey -- Trey Harris Secretary and Executive SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

Re: Loop controls

2002-04-25 Thread Trey Harris
In a message dated Thu, 25 Apr 2002, Luke Palmer writes: before { ... } # run before first iteration, only if there is at least one iteration after { ... } # run after last iteration, only if there is at least one iteration noloop { ... }# run

Re: Loop controls

2002-04-25 Thread Trey Harris
In a message dated Fri, 26 Apr 2002, Damian Conway writes: Larry is still considering allowing a CFIRST block that would do this. It would go inside the loop block. [...] This will be called a CNEXT block. It goes inside the loop block. [...] This will be called a CLAST block. It goes

Re: Loop controls

2002-04-30 Thread Trey Harris
Why not allow Celse if while still allowing Celsif as a synonym, preserving backwards compatibility while still allowing all these weird and varied constructs people seem to have use for? In any case, I don't really see why Cloop...else necessarily implies all these other cases, too. Maybe

Re: Loop controls

2002-04-30 Thread Trey Harris
In a message dated Tue, 30 Apr 2002, Luke Palmer writes: On Tue, 30 Apr 2002, Trey Harris wrote: Why not allow Celse if while still allowing Celsif as a synonym, preserving backwards compatibility while still allowing all these weird and varied constructs people seem to have use

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

2002-05-12 Thread Trey Harris
In a message dated Sun, 12 May 2002, Miko O'Sullivan writes: From: David Whipp [EMAIL PROTECTED] It it too much to ask, of the creator of a tied array, to implement their code in such a way that *reading* an element of that array does not have significant side-effects? Actually, I think

Why not {,n} in quantifiers?

2002-05-14 Thread Trey Harris
or less, then I think M should clearly default to 0. Is there something I'm missing here? If not, why not add some DWIMiness and make {,n} work? Trey -- Trey Harris Secretary and Executive SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

Re: Apoc 5 questions/comments

2002-06-07 Thread Trey Harris
In a message dated Fri, 7 Jun 2002, [EMAIL PROTECTED] writes: The most serious objection to this was 'well, use modules for matching *ml - which simply points out that the current incarnation of perl6 regex doesn' t handle a very large class of matching problems very well. I don't think

Re: Apoc 5 questions/comments

2002-06-09 Thread Trey Harris
In a message dated Sun, 9 Jun 2002, Damian Conway writes: Trey Harris wrote: rule parsetag :w { lt $tagname :=identifier %attrs := [ (identifier) = (val) ]* /? gt } On second reading, it occurs to me

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Trey Harris
In a message dated Wed, 3 Jul 2002, Michael G Schwern writes: Attributes Transcending mere objects and classes, Perl 6 introduces adverbs. confused Attributes are adjectives, not adverbs. Aren't they? Trey

$RS paragraph mode going away?

2002-07-05 Thread Trey Harris
Did I hear somewhere that paragraph mode (i.e., C$/ = '') is going away? I can't find it in my archives, so maybe it was one of my feverish Perl 6 dreams (of which I've had too many lately, after spending a few days in training with Damian ;-) but I think I heard it said by someone with authority

Re: Perl6 grammar (take IV)

2002-07-06 Thread Trey Harris
In a message dated Sat, 6 Jul 2002, Sean O'Rourke writes: - Implicit currying variables ($^a etc) are in. I thought I had read somewhere they were gone in favor of closure args, but people seem to be using them, and they're not hard to put in. My understanding is that they still exist as

RE: hyper operators - appalling proposal

2002-07-15 Thread Trey Harris
In a message dated Mon, 15 Jul 2002, Brent Dax writes: With explicit, you just get the result of Inf ** 2 (which presumably is still Inf) in $bar. Perhaps neither is what you want, but at least it doesn't take forever to run. Yes. This is my fear of hyperoperation being the default for

Re: Light ideas

2002-08-02 Thread Trey Harris
In a message dated Fri, 2 Aug 2002, Miko O'Sullivan writes: OK, would that notation ( arr[] = $var ) be something that could be added by a module, in the same way that operators and /* */ will be addable? I don't think we've seen too much about how Larry plans to do Perl-munging-Perl except

Re: 'while {' in Perl 6

2002-08-09 Thread Trey Harris
In a message dated Fri, 9 Aug 2002, Adam Lopresto writes: I was wondering whether the Perl 'while (){' idiom will continue to be supported in Perl 6? I seem to recall people posting example code the list using it (although I can't dig any up), but it seems to me that if Perl 6's lazy list

Re: A Perl 6 class question

2002-08-12 Thread Trey Harris
Another one... class Foo is Bar; method a { setup(); } 1; # EOF (Is the 1 still required? I think I heard Damian say it was going away.) The question is, is this valid, if Bar defines a sub/static method 'setup'? Is my instict right that 'sub' in a class is a 'class/static method' in the

Re: Just reading up on Pike...

2002-08-17 Thread Trey Harris
In a message dated Sat, 17 Aug 2002, [EMAIL PROTECTED] writes: [$!] Typically contains an object with both string and integer conversions. Whether convertability to both types is enough to satisfy a superpositional type is an interesting question. I suspect it *is*. Then I'd assume that

Re: rule, rx and sub

2002-08-27 Thread Trey Harris
In a message dated Tue, 27 Aug 2002, Luke Palmer writes: No, it's right. But it doesn't break that. In the grammar, C-like languages include (something like): statement: expression ';' statement: if expression block So an if _statement_ terminates itself. The } on a line of

Re: Hypothetical synonyms

2002-08-28 Thread Trey Harris
In a message dated 27 Aug 2002, Uri Guttman writes: LW == Larry Wall [EMAIL PROTECTED] writes: LW On 27 Aug 2002, Uri Guttman wrote: : and quoteline might even LW default to for its delim which would make : that line: LW : LW : my ($fields) = /(quotelike|\S+)/; LW That just

Re: Hypothetical synonyms

2002-08-28 Thread Trey Harris
In a message dated 28 Aug 2002, Aaron Sherman writes: Ok, just to be certain: $_ = 0; my $zilch = /0/ || 1; Is $zilch C0 or 8? 8? How do you get 8? You'd get a result object which stringified was 0 and booleanfied was true. So here, you'd get a result object vaguely

Capturing alternations (was Re: Hypothetical synonyms)

2002-08-29 Thread Trey Harris
In a message dated Thu, 29 Aug 2002, Janek Schleicher writes: Aaron Sherman wrote at Wed, 28 Aug 2002 00:34:15 +0200: $stuff = (defined($1)?$1:$2) if /^\s*(?:(.*?)|(\S+))/; It gives me the idea of a missing feature: What really should be expressed is: my ($stuff) =

Re: rule, rx and sub

2002-08-30 Thread Trey Harris
In a message dated Thu, 29 Aug 2002, Damian Conway writes: And, of course, the Cis valued property would smart-match its value against the corrresponding argument, so one could also code optimized variants like: sub repeat is multi ($desc is valued(1), body) { body(1);

Re: auto deserialization

2002-09-02 Thread Trey Harris
In a message dated 1 Sep 2002, Uri Guttman writes: DW == David Wheeler [EMAIL PROTECTED] writes: DW On Sunday, September 1, 2002, at 05:30 AM, Damian Conway wrote: Sure. But the right solution is to permanently eliminate the sesquipedalian name (so you don't have to retype it

Re: Hypothetical variables and scope

2002-09-02 Thread Trey Harris
In a message dated 2 Sep 2002, Aaron Sherman writes: I'm working on a library of rules and subroutines for dealing with UNIX system files. This is really just a mental exercise to help me grasp the new pattern stuff from A5. I've hit a snag, though, on hypothetical variables. How would this

RE: auto deserialization

2002-09-03 Thread Trey Harris
In a message dated Tue, 3 Sep 2002, Garrett Goebel writes: Don't the following statements have identical meaning? my Date $date; my Date $date = Date-new(); Not at all. The first declares that $date is a variable containing Date objects, the second does the same, plus instantiates a new

RE: auto deserialization

2002-09-03 Thread Trey Harris
In a message dated Tue, 3 Sep 2002, Trey Harris writes: So what again is wrong with: my Date $date = 'June 25, 2002'; Nothing--if Date is tieable and implements a STORE method which instantiates a new object. Well, now that I re-read my own comments, I have to retract this, because you

sub/method refs (was Re: auto deserialization)

2002-09-03 Thread Trey Harris
In a message dated Tue, 3 Sep 2002, Buddha Buck writes: I suspect that, if it makes sense to say $foo = $date.method; then it would also make sense to say $date .= $foo; as well. Interesting, that first line $foo = $date.method; I need a bit of a refresher here, as my searches of the

Re: Hypotheticals again

2002-09-04 Thread Trey Harris
In a message dated Wed, 4 Sep 2002, Jonathan Scott Duff writes: The thread on hypotheticals has caused me to reread that section of A5 a few times now and a couple of paragraphs bother me the more I read them. I'll just quote the parts that bother me: ... If a regex sets a

Re: Defaulting params (reprise)

2002-09-04 Thread Trey Harris
In a message dated Wed, 4 Sep 2002, Andrew Wilson writes: On Wed, Sep 04, 2002 at 03:48:41PM -0500, Jonathan Scott Duff wrote: On Wed, Sep 04, 2002 at 04:43:25PM -0400, [EMAIL PROTECTED] wrote: Only augment //= in subroutine declarations, //= would also work. I love the //= operator,

RE: First crack at Builtins.p6m

2002-09-05 Thread Trey Harris
In a message dated Thu, 5 Sep 2002, Luke Palmer writes: Why would bitwise have anything but integer signatures. What does 4.56 | 2.81 mean? Also, should perl lossily convert real to int, or give an error if it can't? Seems to me that that's a decision that has to be made for each function.

RE: First crack at Builtins.p6m

2002-09-05 Thread Trey Harris
(Sorry for responding to my own post, and on a tangential point at that, but...) In a message dated Thu, 5 Sep 2002, Trey Harris writes: In a message dated Thu, 5 Sep 2002, Luke Palmer writes: Why would bitwise have anything but integer signatures. What does 4.56 | 2.81 mean? Also

Re: Argument aliasing for subs

2002-09-08 Thread Trey Harris
In a message dated Sun, 8 Sep 2002, Steve Canfield writes: Would it be accurate to say that is sets properties of variables, whereas but sets properties of values? If so, what would this output: my $var is true; $var=0; if ($var) {print true} else {print false} I would expect it

Paren madness (was Re: Regex query)

2002-09-23 Thread Trey Harris
I think this discussion has gotten out of hand, and I hope that Larry, Damian or Allison will grace us with a resolution soon. :-) May I suggest that we start with some DWIMmy examples and try to arrive at a mechanism that will make them all DWIM? Here are my opinions, feel free to shoot them

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Trey Harris
In a message dated Mon, 23 Sep 2002, Luke Palmer writes: Y'all have it backwards. [1,*[2,[3,4,5]],6] # [1,2,[3,4,5],6] [1,*[2,*[3,4,5]],6] # [1,2,3,4,5,6] Flat flattens outwards, not inwards. Ah. *slaps head* of course. That makes much more sense.

Re: Paren madness (was Re: Regex query)

2002-09-23 Thread Trey Harris
Replying to myself to clear a few things up... In a message dated Mon, 23 Sep 2002, Trey Harris writes: 2. Scalar assignment. my $a;# 1. $a = X; my $a;# 2. $a = X; my $a;# 3. ($a) = X; my($a) = X; # 4. my($a) = (X); # 5

Re: Regex query

2002-09-23 Thread Trey Harris
In a message dated 24 Sep 2002, Aaron Sherman writes: Grrr... I want that to work, really I do, but since, as Larry has pointed out, there's no functional difference between an array ref and an array in Perl 6, they would be the same. This is because push is almost certainly defined as:

Re: Regex query

2002-09-23 Thread Trey Harris
In a message dated 24 Sep 2002, Aaron Sherman writes: This is because push is almost certainly defined as: sub push(target, *@list) { ... } That should be sub push(target is rw, *@list); but otherwise I think that's right. Now, implementation in Perl 6 (though I assume it's

Re: Regex query

2002-09-24 Thread Trey Harris
In a message dated Tue, 24 Sep 2002, Chip Salzenberg writes: According to Trey Harris: According to Larry, $a = (1,2,3); is equivalent to $a = [1,2,3]; because they're both equivalent to $a = scalar(1,2,3) But that's the bit we're arguing about. If you allow $a = (1,2

Re: Regex query

2002-09-24 Thread Trey Harris
In a message dated 24 Sep 2002, Aaron Sherman writes: That doesn't really work. Because now you introduce the case where: $x = (1,2,3); y = (1,2,3); $z = [1,2,3]; push a, $x, y, $z, (1,2,3), [1,2,3]; Behaves in ways that will take hours to explain to newbies, and I

Re: Regex query

2002-09-24 Thread Trey Harris
In a message dated Tue, 24 Sep 2002, Jonathan Scott Duff writes: On Tue, Sep 24, 2002 at 11:14:04AM -0400, Aaron Sherman wrote: Again, we're wading into the waters of over-simplification. Let's try: sub foo1(){ my foo=(1,2,3); return foo; } sub foo2(){ my $foo = [1,2,3];

Re: Paren madness (was Re: Regex query)

2002-09-24 Thread Trey Harris
In a message dated Tue, 24 Sep 2002, Mike Lambert writes: Consider: $a = (1); and ($a) = (1); Yes? They both do the same thing--set $a to 1. It looks like the bottom one is a list assigned to a list, but that might be optimized out, as it doesn't matter. 5. Assignment to arrays and

Re: Private contracts?

2002-10-03 Thread Trey Harris
In a message dated Thu, 3 Oct 2002, Michael G Schwern writes: On Thu, Oct 03, 2002 at 03:59:08PM -0400, Mike Lambert wrote: With pre/post conditions, a subclass is allowed to weaken the preconditions or strengthen the postconditions. How exactly does one weaken a precondition? You weaken

Re: Private contracts?

2002-10-03 Thread Trey Harris
In a message dated Thu, 3 Oct 2002, Allison Randal writes: So far, classes are uppercase and properties are lowercase, but that's convention, not law. Do runtime (value) properties and compile-time (variable) properties share the same namespace? That is, to go back to an earlier discussion,

Re: Private contracts?

2002-10-03 Thread Trey Harris
In a message dated Thu, 3 Oct 2002, John Williams writes: On Thu, 3 Oct 2002, Trey Harris wrote: Incidentally, has there been any headway made on how you DO access multiple classes with the same name, since Larry has (indirectly) promised us that? I.e., I import two classes LinkedList

Re: Delegation syntax?

2002-10-03 Thread Trey Harris
In a message dated Thu, 3 Oct 2002, Michael Lazzaro writes: On Thursday, October 3, 2002, at 04:25 PM, Michael G Schwern wrote: Class::Delegation? Yeah, it's one of the best I've seen: it makes sense, does everything I want, and is easy to explain even to newbies. The perl5 hash-based

RE: Private contracts?

2002-10-03 Thread Trey Harris
In a message dated Thu, 3 Oct 2002, Garrett Goebel writes: Michael G Schwern: On Thu, Oct 03, 2002 at 05:30:49PM -0400, Trey Harris wrote: In a message dated Thu, 3 Oct 2002, Michael G Schwern writes: On Thu, Oct 03, 2002 at 03:59:08PM -0400, Mike Lambert wrote: With pre/post

Re: Private contracts?

2002-10-04 Thread Trey Harris
In a message dated Fri, 4 Oct 2002, [EMAIL PROTECTED] writes: On Fri, Oct 04, 2002 at 09:13:45AM -0400, Chris Dutton wrote: How exactly does one weaken a precondition? At least in Eiffel, if you redefine a method, you may not give it stringer preconditions than the original method, but

Re: Private contracts?

2002-10-04 Thread Trey Harris
In a message dated Fri, 4 Oct 2002, [EMAIL PROTECTED] writes: On Fri, Oct 04, 2002 at 06:26:31PM -0400, Trey Harris wrote: But what does it mean to be stronger? How does Eiffel figure out if a given precondition is stronger or weaker than another? Like I said before, boolean logic

Re: Private contracts?

2002-10-05 Thread Trey Harris
In a message dated Sat, 5 Oct 2002, Allison Randal writes: More useful: keep a site-wide or company-wide file of version aliases to make sure everyone uses the same version, and to make upgrades to the next version as simple as editing a single file. Ah, but the usual case is this: You

Re: RFC: [] as the solitary list constructor

2002-10-06 Thread Trey Harris
In a message dated Sun, 6 Oct 2002, Noah White writes: On Sunday, October 6, 2002, at 01:50 AM, Brent Dax wrote: Parens don't construct lists EVER! They only group elements syntactically. One common use of parens is to surround a comma-separated list, but the *commas* are creating

Re: Interfaces

2002-10-08 Thread Trey Harris
In a message dated Tue, 8 Oct 2002, Michael G Schwern writes: On Sun, Oct 06, 2002 at 06:17:37PM -0400, Daniel B. Boorstein wrote: I think there may be some confusion here. In java, there's no special syntax to declare a method an optional part of the interface. All concrete classes that

Re: Fw: perl6 operator precedence table

2002-10-09 Thread Trey Harris
In a message dated Wed, 9 Oct 2002, Larry Wall writes: If only we had Unicode editors, we could just force everyone to use the infinity symbol where they mean it. It seems a shame to make a special case of the .. operator. Maybe we should ... to mean and so on forever: a[0...;

Re: Private contracts?

2002-10-12 Thread Trey Harris
In a message dated Fri, 11 Oct 2002, Larry Wall writes: A public inner class: our class Node {...} That last one actually declares a subclass of the current class, just as our $foo; puts $foo into the current package. When you say subclass, do you mean below the current class in

Re: Draft Proposal: Declaring Classwide Attributes

2002-10-13 Thread Trey Harris
In a message dated Sun, 13 Oct 2002, Piers Cawley writes: I like that idea: class SomeClass { method class_method ( Class $class: ... ) { ... } method instance_method ( SomeClass $self : ... ) { ... } method dont_care_method ( $self : ... ) { ... } }

Re: Draft Proposal: Declaring Classwide Attributes

2002-10-14 Thread Trey Harris
In a message dated Mon, 14 Oct 2002, Michael Lazzaro writes: So if the first two should be shorter than the third, one way to do that would be something like: class SomeClass { cmethod class_method {...} # via a keyword method instance_method {...}

Re: Indeterminate math

2002-10-15 Thread Trey Harris
In a message dated Tue, 15 Oct 2002, Angel Faus writes: Mathematically, 1/0 is not +Infinity. It's undefined/indeterminate in the set of rational numbers. The IEEE may say otherwise. Mathematically, 1/0 is whatever you define it to be. Well, sure. That's as axiomatic as saying,

Re: Indeterminate math

2002-10-15 Thread Trey Harris
In a message dated Tue, 15 Oct 2002, Jonathan Scott Duff writes: People have used the terms error and exception interchangably in this disucssion. To me, an error is something that stops program execution while an exception may or may not stop execution depending on what the user decides to

Re: Indeterminate math

2002-10-15 Thread Trey Harris
In a message dated Tue, 15 Oct 2002, Michael G Schwern writes: On Tue, Oct 15, 2002 at 01:44:50PM -0500, Jonathan Scott Duff wrote: People have used the terms error and exception interchangably in this disucssion. To me, an error is something that stops program execution while an

Literate programming (was Re: perl6 operator precedence table)

2002-10-24 Thread Trey Harris
Larry, As long as you're trying to figure out how to shoehorn in the last few available punctuation symbols, and thinking about if there are any bracketers left, I wondered if there was a chance of a chunking operator for literate programming? So you can do something like this, if were the

fonts (was Re: perl6 operator precedence table)

2002-11-14 Thread Trey Harris
Sorry for the one-month-old response, but this message fell between the cracks and I was just reviewing all my old new mail In a message dated Sun, 20 Oct 2002, Me writes: Somebody fairly recently recommended some decent fixed-width typefaces. I think it may have been MJD, but I can't

Re: right-to-left pipelines

2002-12-09 Thread Trey Harris
In a message dated Mon, 9 Dec 2002, Stéphane Payrard writes: [snipped] so it's easy to build up more complex right-to-left pipelines, like: (@foo, @bar) := part [/foo/, /bar/], sort { $^b = $^a } grep { $_ 0 }

Re: right-to-left pipelines

2002-12-09 Thread Trey Harris
In a message dated Mon, 9 Dec 2002, Adam D. Lopresto writes: Looks to me like with a few appropriate methods, you have left-to-right ordering for free. (@foo, @bar) := @a . grep { $_ 0} . sort { $^b = $^b } . part [/foo/, /bar/]; Yes, exactly. Of course, that means that

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-09 Thread Trey Harris
In a message dated Thu, 9 Jan 2003, Damian Conway writes: One *might* argue that ~ ought to be of higher precedence than ~ (i.e. that invocants ought to be bound ahead of other arguments). If so, then: $foo ~ print ~ $*STDERR is really: $foo ~ print $*STDERR: is really:

E6: assume nothing

2003-07-31 Thread Trey Harris
assuming nothing), so that if List::Part::part changed its default for Clabels to C oves caperes , the client code would pick that up? -- Trey Harris Vice President SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

Re: E6: assume nothing

2003-07-31 Thread Trey Harris
to pass undef to labels, what would I write? -- Trey Harris Vice President SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

Re: backticks

2004-04-15 Thread Trey Harris
-- Trey Harris Vice President SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

Re: backticks

2004-04-17 Thread Trey Harris
of a point already discussed to death.) Trey -- Trey Harris Vice President SAGE -- The System Administrators Guild (www.sage.org) Opinions above are not necessarily those of SAGE.

placeholder attachment?

2004-04-19 Thread Trey Harris
Can anyone explain the rules of placeholder attachment? i.e., in the example in Perl6::Placeholder's manpage, grep { $data{$^value} } 1..10; C$^value is clearly intended to attach to the outer closure C{ $data{$^value} }, not the inner closure C{$^value}. But how does the compiler know?

Re: placeholder attachment?

2004-04-19 Thread Trey Harris
In a message dated Mon, 19 Apr 2004, Larry Wall writes: On Mon, Apr 19, 2004 at 04:48:05AM -0600, Luke Palmer wrote: : Trey Harris writes: : Can anyone explain the rules of placeholder attachment? i.e., in the : example in Perl6::Placeholder's manpage, : :grep { $data{$^value} } 1

Re: [S29] pick on other things than junctions

2005-04-04 Thread Trey Harris
In a message dated Mon, 4 Apr 2005, Ingo Blechschmidt writes: What does pick return on hashes? Does it return a random value or a random pair? (I suppose returning a pair is more useful.) I'd assume in all cases that pick returns an *alias*, and in the case of hashes, an alias to the pair: #

Re: [S29] pick on other things than junctions

2005-04-04 Thread Trey Harris
I'd assume you'd get an *alias* to a random pair: # Test error-correction for 1..$entropy_threshhold { %hash.pick.value = rand $scribble_factor; } Trey In a message dated Mon, 4 Apr 2005, Ingo Blechschmidt writes: Hi, I remembered Damian saying that pick does not only work on

Re: [S29] pick on other things than junctions

2005-04-04 Thread Trey Harris
In a message dated Mon, 4 Apr 2005, Ingo Blechschmidt writes: What does pick return on hashes? Does it return a random value or a random pair? (I suppose returning a pair is more useful.) I'd assume in all cases that pick returns an *alias*, and in the case of hashes, an alias to the pair: #

Re: [S29] pick on other things than junctions

2005-04-04 Thread Trey Harris
Yikes. Sorry about the ressends... my email client kept dying and I thought the mail was lost. Guess not. :-) Trey In a message dated Mon, 4 Apr 2005, Trey Harris writes: In a message dated Mon, 4 Apr 2005, Ingo Blechschmidt writes: What does pick return on hashes? Does it return a random

Re: Perl 6 OO and bless

2006-01-18 Thread Trey Harris
Excuse my ignorance of the finer points, but I thought the reason for bless's continued existence was so that the same sort of brilliant OO experimentation that Damian and others have done with pure Perl 5 can continue to be done in pure Perl 6 without having to hack p6opaque? Trey

Re: S05.pod

2006-04-17 Thread Trey Harris
In a message dated Mon, 17 Apr 2006, Sean Sieger writes: from There are no C/s or C/m modifiers (changes to the meta-characters replace them - see below). to There are no C/s or C/m modifiers (change to the meta-characters that replace them - see below). I don't think so There are no

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

2006-04-30 Thread Trey Harris
In a message dated Sun, 30 Apr 2006, [EMAIL PROTECTED] writes: The whitespace in the middle may include any of the comment forms above. -Because comments always count as whitespace, the dots in +Because comments always count as whitespace, the C\. in -$object.#{ foo }.say +$object\#{

Re: Containers

2006-07-11 Thread Trey Harris
In a message dated Tue, 11 Jul 2006, Aaron Sherman writes: But would it be reasonable to also provide a named-only parameter to each for that purpose? our List multi Container::each(Bool :$stop, Container [EMAIL PROTECTED]) So that: for each(:stop, =; 1..*) - ($line, $lineno) { say $lineno:

Re: Containers

2006-07-11 Thread Trey Harris
In a message dated Tue, 11 Jul 2006, Aaron Sherman writes: On Tue, 2006-07-11 at 09:53 -0700, Trey Harris wrote: It sounds reasonable to me, but :stop reads badly. Maybe C:strictly? Maybe it's not a function of a flag to each, but a marking that certain lists should be tapped non-exhaustively

Re: S04 - forbidden coding-style

2006-07-21 Thread Trey Harris
In a message dated Fri, 21 Jul 2006, Ruud H.G. van Tol writes: Larry Wall schreef: Maybe we should just make statement modifiers uppercase and burn out everyone's eye sockets. :) Or maybe { }. while $x ; Actually, can't that be made to work already (already by the language spec,

Re: Patch for S06 (and also S03)

2006-08-07 Thread Trey Harris
In a message dated Mon, 7 Aug 2006, Daniel Hulme writes: Sorry to patch the patch, but in -Other sigils binds only to the Ilast argument with that name: +Other sigil binds only to the Ilast argument with that name: the replacement makes no more sense than the original. Other sigils bind or

Re: clarify: does Dog is Mammal load Mammal for you?

2006-08-22 Thread Trey Harris
In a message dated Mon, 21 Aug 2006, Jonathan Scott Duff writes: But, assuming for the moment that Cis Mammal autoloads CMammal.pm, does that mean that class Dog is Mammal-4.5 is valid? Yes, it must be valid. See http://dev.perl.org/perl6/doc/design/syn/S11.html#Versioning : So you

Re: clarify: does Dog is Mammal load Mammal for you?

2006-08-22 Thread Trey Harris
Oops, Luke Palmer alerted me to the fact that I screwed up in the below. In a message dated Tue, 22 Aug 2006, Trey Harris writes: My question is, if a program is running where two versions of Dog are loaded, say 1.3.4 and 2.1, and a file contains: use Dog-1.3.4-cpan:JRANDOM; class Poodle

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: I think the justification for Luke's POV is the number of operations each class provides. But my perspective agrees with Juerd - subclasses can remove functionality as well as adding it, and I definitely view constant as an add-on

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, jerry gay writes: perhaps trey meant subclasses can add constraints as well as functionality instead of subclasses can remove functionality as well as adding it. just a guess. ~jerry Ok... same thing from a DBC perspective. Subclasses can add

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: On 8/25/06, Trey Harris [EMAIL PROTECTED] wrote: subclasses can remove functionality as well as adding it Can someone suggest some reading I can do to understand how that works? I can't wrap my head around the idea of subclasses

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Mark J. Reed writes: OK, I admit I wasn't thinking about things from a DBC perspective, and misunderstood DBC to be a reference to some database module. I here am new and I didn't have context. My bad. But if we're talking design-by-contract, I don't see

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Juerd writes: Trey Harris skribis 2006-08-25 11:33 (-0700): Ok... same thing from a DBC perspective. Subclasses can add functionality (by AND'ing postconditions), or remove constraints (by OR'ing preconditions), but they can't traditionally remove

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Daniel Hulme writes: If changing that functionality beyond recognition means changing its external behavior (as opposed to its internal behavior) so that it acts differently from what the superclass had promised to do, then no, it's not any weirder--but I

Re: clarifying the spec for 'ref'

2006-08-25 Thread Trey Harris
In a message dated Fri, 25 Aug 2006, Juerd writes: Trey Harris skribis 2006-08-25 13:26 (-0700): Explain to me how nontraditional DBC might work in an internally consistent way. Otherwise, this is hand-waving. :-) Perl *is* hand-waving. Yeah, but hand-waving on how it manages the behavior

Re: named arguments: What's the signature?

2006-08-29 Thread Trey Harris
In a message dated Tue, 29 Aug 2006, Mark Stosberg writes: Regarding The S06 description of named arguments: http://feather.perl6.nl/syn/S06.html#Named_arguments What I find missing here is documentation of the signature to use if you want to declare I accept an arbitrary number of named

Contextual::Return (was Re: could 'given' blocks have a return value?)

2006-08-30 Thread Trey Harris
In a message dated Tue, 29 Aug 2006, Mark Stosberg writes: my $rm = sub { given $rm_param { when Code { $rm_param(self) } when Hash { %rm_paramrun_mode } default{ self.query.param($rm_param) } }}(); This is eerily like Contextual::Return, which made me wonder if

but semantics (was Re: Naming the method form of s///)

2006-09-01 Thread Trey Harris
In a message dated Thu, 31 Aug 2006, Juerd writes: Hm. I don't know how but works exactly, but in the realm of syntactic sugar, this is appealing: $foo but s/foo/bar/ I like it. This should be easy to make work in theory, but for the problem with Cbut's semantics which I'll get to in a

Re: but semantics (was Re: Naming the method form of s///)

2006-09-01 Thread Trey Harris
In a message dated Fri, 1 Sep 2006, Juerd writes: Trey Harris skribis 2006-09-01 0:17 (-0700): I think these semantics are Almost Right, but yet Entirely Wrong. The problem is that Cbut reads to me as a *mutating* operator. That is, I would expect the above code snippet to give me a C$z.y

Re: Nested statement modifiers.

2006-09-01 Thread Trey Harris
In a message dated Fri, 1 Sep 2006, Paul Seamons writes: I'm not sure if I have seen this requested or discussed. This was definitively rejected by Larry in 2002: http://www.nntp.perl.org/group/perl.perl6.language/9343 He has not revisited the issue in the several times it has come up

Re: Nested statement modifiers.

2006-09-01 Thread Trey Harris
In a message dated Fri, 1 Sep 2006, jerry gay writes: On 9/1/06, Trey Harris [EMAIL PROTECTED] wrote: In a message dated Fri, 1 Sep 2006, Paul Seamons writes: I'm not sure if I have seen this requested or discussed. This was definitively rejected by Larry in 2002: http://www.nntp.perl.org

  1   2   >