Re: 3 kinds of yadda

2018-09-10 Thread Trey Harris
When executed: - ??? is warn.- ... is fail. - !!! is ‘die`. Otherwise, they’re identical (notably, when *not* executed, which is the usual case). You’d use ??? when you’re not implementing something yet but it needs to be callable (say, a debugging function). Given the difference in

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
; seem to imply there should be…) ​ On Sun, Sep 18, 2016 at 6:15 PM Brandon Allbery <allber...@gmail.com> wrote: > > On Sun, Sep 18, 2016 at 6:06 PM, Trey Harris <t...@lopsa.org> wrote: > >> Not work? It results inMethod 'prefix:<+>' not found for invocant of

Re: This seems to be wrong

2016-09-18 Thread Trey Harris
On Sun, Sep 18, 2016 at 6:30 PM Brandon Allbery allber...@gmail.com <http://mailto:allber...@gmail.com> wrote: > On Sun, Sep 18, 2016 at 6:29 PM, Trey Harris <t...@lopsa.org> wrote: > >> But I see there’s a multi method Str defined on Any, and you can’t do >> @i

Re: Is this a bug?

2016-09-18 Thread Trey Harris
On Sun, Sep 18, 2016 at 16:49 Parrot Raiser <1parr...@gmail.com> wrote: say { $_ } was the correct thing to use there. (I'm trying to avoid > any mention of O-O for the moment.) > “Trying to avoid any mention of O-O” seems like a Perl 6 obfuscation or golf constraint, not a desirable development

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Trey Harris
t; (k m o q) > Cannot resolve caller counter(Int, Rat, Int); none of these signatures > match: > (Int $start, Int $end, :$by = 1) > (Str $start, Str $end, :$by = 1) > in block at foo.p6 line 3 > > > > > > Aaron Sherman, M.: > P: 617-440-4332 Google Talk, Em

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Trey Harris
On Thu, Sep 8, 2016 at 9:23 AM Aaron Sherman a...@ajs.com wrote: I don't know Haskell, but isn't flip just: > > sub flip() { -> $b, $a, |c { f($a, $b, |c) } } > > And then: > > perl6 -e 'sub flip() { -> $a, $b, |c { f($b, $a, |c) } }; my = flip > yas(1,2,3)' > 213 >

Re: Justification for the "reversed" instruction format

2016-09-07 Thread Trey Harris
There’s a very common functional programming pattern, usually called flip; its implementation in Haskell is simply: flip :: (a -> b -> c) -> b -> a -> cflip f x y = f y x Getting the same behavior out of a bespoke function in Perl 6 would be easy for any particular case, but writing a

Re: Should Cgrep and Creverse work in CAny ?

2008-06-30 Thread Trey Harris
is a sister of Any, not a subtype of Any. That's how you get the autothreading--accept Any or a subtype thereof, and when you get a junction, you autothread. Accept Junction or Object and you can inspect the junction directly. At least, that's how *I* think it works... :) -- Trey Harris

Re: Rakudo test miscellanea

2008-06-26 Thread Trey Harris
In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: I assume that 'Num' is meant to be a non-complex. Then it seems to make sense to assume: Int is Rat Rat is Num Num is Complex or am I off again? S29 seems to have been assuming this, if I'm reading the multis correctly. -- Trey Harris

Re: given vs for

2008-04-25 Thread Trey Harris
In a message dated Fri, 25 Apr 2008, Moritz Lenz writes: Paul Fenwick pjf at perltraining.com.au writes: for ($foo) { when ($_ 500) { ++$_ } when ($_ 1000) { --$_ } default { say Just right $_ } } Ahh... that's exactly what I was looking for. Thanks.

Re: given vs for

2008-04-25 Thread Trey Harris
To loop back to my earlier question: In Perl 5.10: use strict; use warnings; use feature qw(switch say); my $foo = 10; for ($foo) { when ($foo 50) { $_++ } } say for: $foo; $foo = 10; given ($foo) { when ($foo 50) { $_++ } } say

Re: what should be the default extension?

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Richard Hainsworth writes: May I suggest the following extension to the 'use ' pragma, viz. use module name written in unicode and case sensitive in filename as constrained by local system Oh please, no. The entire point of the wording currently in the

$?OS semantics

2008-01-07 Thread Trey Harris
Sorry, quoting myself... In a message dated Mon, 7 Jan 2008, Trey Harris writes: given $?OS { when m:i:/win/ { use Foo in WinFoo.pm } when m:i:/nix/ { use Foo in UnixLikeFoo.pm } } It strikes me that $?OS and $?OSVER should probably not be strings (as they now are in Pugs

Re: $?OS semantics

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Larry Wall writes: On Mon, Jan 07, 2008 at 11:42:06AM -0500, Trey Harris wrote: So $?OS isn't the type of OS, it's *the OS*, and you can manipulate the OS through it. Note that $?OS is the OS that is-or-was running at compile time, whereas $*OS is the OS

:($obj) syntax (was Re: [svn:perl6-synopsis] r14479 - doc/trunk/design/syn)

2008-01-05 Thread Trey Harris
In a message dated Thu, 3 Jan 2008, [EMAIL PROTECTED] writes: +But these bindings Ido autovivify: my %hash; my $val := %hashfoobar; my @array; -my $obj = [EMAIL PROTECTED]; # $obj is a Capture object - see S02 +my $cap = [EMAIL PROTECTED]; # $obj is a Capture object - see

Re: perl 6 and web open source projects

2007-12-03 Thread Trey Harris
In a message dated Tue, 4 Dec 2007, cdumont writes: oh, it might not be relevant in many ways but : http://iamseb.com/seb/2007/12/perl-on-rails-why-the-bbc-fails-at-the-internet/ http://www.bbc.co.uk/blogs/radiolabs/2007/11/perl_on_rails.shtml There's one thing I would like perl6 to shine

Re: how typish are roles

2006-10-28 Thread Trey Harris
In a message dated Sat, 28 Oct 2006, chromatic writes: When you specify a type to constrain some operation, you specify that the target entity must perform that role. That statement is very concise and direct. If the fuzziness I observed about the identity of the basic building block of type

where constraints as roles (was Re: how typish are roles)

2006-10-28 Thread Trey Harris
In a message dated Sat, 28 Oct 2006, Trey Harris writes: In a message dated Sat, 28 Oct 2006, chromatic writes: When you specify a type to constrain some operation, you specify that the target entity must perform that role. That statement is very concise and direct. If the fuzziness I

Re: how typish are roles

2006-10-25 Thread Trey Harris
In a message dated Wed, 25 Oct 2006, TSa writes: from the recent threads 'class interface of roles', 'set operations for roles' and 'signature subtyping and role merging' I wonder how typish roles actually are. Some seem to consider roles as lightweight particles that serve to compose

Re: Edge case: incongruent roles

2006-10-13 Thread Trey Harris
In a message dated Fri, 13 Oct 2006, Jonathan Lang writes: Since Baz does both Foo and Bar, you cannot use type-checking to resolve this dilemma. Why not? Why shouldn't this work: my Foo $obj1 = getBaz(); # object is a Baz $obj1.baz(); # Foo::baz is called my Bar $obj2 =

Re: Don't tell me what I can't do!

2006-10-08 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, Smylers writes: Trey Harris writes: I remember not so many years ago when there were a lot of modules floating around that required you to do no strict of various flavors in order to use them. Really? How? I wrote imprecisely. Not to use them

Re: Abstract roles, classes and objects

2006-10-04 Thread Trey Harris
In a message dated Sun, 1 Oct 2006, Aaron Sherman writes: Trey Harris wrote: In a message dated Fri, 29 Sep 2006, Aaron Sherman writes: [snip] However, that's not to say that a class can't be abstract, just that a class that does an interface (a role with nothing but abstract methods) must

Re: Don't tell me what I can't do!

2006-10-04 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, chromatic writes: The assumption I remember from the design meetings was always No library designer has the knowledge or the right to tell me how fast or strict my program has to run. Whatever BD you do in the privacy of your own modules is fine, but if it

Re: Don't tell me what I can't do!

2006-10-04 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, jesse writes: On Wed, Oct 04, 2006 at 12:01:22PM -0700, chromatic wrote: The point is that the person writing the program decides which handcuffs or costumes all of the code has to wear, not the person writing the libraries. If you want to set a policy for

Re: Abstract roles, classes and objects

2006-10-04 Thread Trey Harris
In a message dated Wed, 4 Oct 2006, Jonathan Lang writes: In Perl 6, the abstract SystemMonitor could be a role, and a concrete ScriptedMonitor could be a class that does SystemMonitor, but it's not at all clear to me what HardwareMonitor would be, since classes can't be abstract and roles can't

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Thu, 28 Sep 2006, Aaron Sherman writes: Jonathan Lang wrote: Aaron Sherman wrote: Jonathan Lang wrote: Actually, it's a promise made by a package (not a class) to meet the specification given by a role (which can, and in this case probably does, reside in a separate file

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Fri, 29 Sep 2006, Aaron Sherman writes: First the high-level point: I'm dropping the RFC, because, as TimToady pointed out on IRC, we're not quite far enough down the line to see the breadth or certainty of the need yet. Yes, but I don't think the conversation should stop.

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-29 Thread Trey Harris
In a message dated Thu, 28 Sep 2006, Jonathan Lang writes: while roles can be abstract, classes and packages should not be. Really? I think I need to let that sink in and percolate a bit. I'm rather fond of creating abstract superclasses to factor out common object-management code. I have

Re: RFC: multi assertions/prototypes: a step toward programming by contract

2006-09-27 Thread Trey Harris
In a message dated Wed, 27 Sep 2006, Aaron Sherman writes: Any thoughts? I'm still thinking about the practical implications of this... but what immediately occurs to me: The point of multiple, as opposed to single, dispatch (well, one of the points, and the only point that matters when

call, call(), .call, and captures

2006-09-20 Thread Trey Harris
From S06: sub bar ($a,$b,$c,:$mice) { say $mice } sub foo (\$args) { say $args.perl; bar.call($args); } The C.call method of CCode objects accepts a single CCapture object, and calls it without introducing a CCALLER frame. And from S12: In addition to Cnext METHOD, the

Re: Capture sigil

2006-09-20 Thread Trey Harris
In a message dated Wed, 20 Sep 2006, Larry Wall writes: The obvious ASCII for ¢ would be c/ or C/ or c| or c| or maybe just |. I like ¢,but: c/$foo # ASCII of ¢$foo d/$foo # d() divided by $foo is rather confusing. (Same goes for |). So the Term Term exclusion makes me rather lean

Re: Capture sigil

2006-09-20 Thread Trey Harris
Oops, I hate typos that result in my writing exactly the opposite of what I meant: In a message dated Wed, 20 Sep 2006, Trey Harris writes: In a message dated Wed, 20 Sep 2006, Larry Wall writes: The obvious ASCII for ¢ would be c/ or C/ or c| or c| or maybe just |. I like ¢,but: c/$foo

Re: any(@originals) ~~ { .foo eq $bar} (was Re: renaming grep to where)

2006-09-19 Thread Trey Harris
In a message dated Tue, 19 Sep 2006, Markus Laire writes: On 9/19/06, Trey Harris [EMAIL PROTECTED] wrote: In a message dated Mon, 18 Sep 2006, Darren Duncan writes: @filtered = @originals.where:{ .foo eq $bar }; Note that this can be written: @filtered = any(@originals) ~~ { .foo eq

Re: renaming grep to where

2006-09-18 Thread Trey Harris
In a message dated Mon, 18 Sep 2006, Darren Duncan writes: Putting aside legacy issues for the moment, I suggest that it might be appropriate to rename the .grep list operator to .where, so we can say, for example: @filtered = @originals.where:{ .foo eq $bar }; Note that this can be

Re: Cwhen outside of Cgiven

2006-09-08 Thread Trey Harris
In a message dated Thu, 7 Sep 2006, Mark Stosberg writes: To refine this point a bit, the spec is clear that 'when' is useful not just with 'given' but with any block that sets $_. Thanks, I was not being terribly precice when I conflated when with given. Of course, CATCH is another case

Cwhen outside of Cgiven

2006-09-07 Thread Trey Harris
markstos++ pointed out the following behavior: use v6-alpha; { when 1 ~~ 0 { say Surprise! } } This code prints Surprise!, because $_ is undef, which is false, just like 1 ~~ 0 is. I'd like to make the following suggestions for Synopsis clarification: 1. It will be a

Re: multi method dispatching of optional arguments (further refined)

2006-09-04 Thread Trey Harris
In a message dated Tue, 5 Sep 2006, Ph. Marek writes: I now had a look at http://dev.perl.org/perl6/doc/design/syn/S06.html but didn't find what I meant. Sorry if I'm just dumb and don't understand you (or S06); I'll try to explain what I mean. I don't think you're dumb; the Synopses just

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

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

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

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

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

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.

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

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

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

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

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

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

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

  1   2   >