Re: Pipeline Performance

2004-09-01 Thread Aaron Sherman
On Tue, 2004-08-31 at 14:11, Sean O'Rourke wrote: > At Tue, 31 Aug 2004 13:23:04 -0400, > [EMAIL PROTECTED] (Aaron Sherman) wrote: > > I would think you actually want to be able to define grep, map, et al. > > in terms of the mechanism for unraveling, and just let the opt

Re: Pipeline Performance

2004-08-31 Thread Aaron Sherman
On Mon, 2004-08-30 at 16:34, Rod Adams wrote: > @x = @y ==> map lc ==> grep length == 4; I would think you actually want to be able to define grep, map, et al. in terms of the mechanism for unraveling, and just let the optimizer collapse the entire pipeline down to a single map. To propose one w

S5 tr concern

2004-08-27 Thread Aaron Sherman
In S5, the following is stated: The tr/// quote-like operator now also has a subroutine form. * It can be given either a single PAIR: $str =~ tr( 'A-C' => 'a-c' ); * Or a hash (or hash ref): $str =~ tr( {'A'=>'a', 'B'=>'b', 'C'

Re: Return with no expression

2004-08-24 Thread Aaron Sherman
On Tue, 2004-08-24 at 15:55, Adam D. Lopresto wrote: > On Tue, 24 Aug 2004, Aaron Sherman wrote: > > Yep, and since ~~ auto-topicalizes its lhs for its rhs, your binary ?? > > is all you need. I wish I'd seen your message before I sent my recent > > one, as I would ha

Re: Return with no expression

2004-08-24 Thread Aaron Sherman
On Tue, 2004-08-24 at 11:50, Dave Whipp wrote: > You're assuming that C in a ternary operator. It > could be a binary operator, defined as {eval $RHS if $LHS; return $LHS}. For > that interpretation, one might choose a different name (e.g. C). > We could actually define ?? as a binary operator in

How to build ??/:: without ::

2004-08-24 Thread Aaron Sherman
On Tue, 2004-08-24 at 08:24, Aaron Sherman wrote: > $foo => 'a' or 'b' I was too focused on the idea of C/C<::> as a pair-like construct, and I missed what should have been obvious: a ?? b :: c IS given a { when true { b } default { c } }

Re: Return with no expression

2004-08-24 Thread Aaron Sherman
Luke Palmer wrote: Aaron Sherman writes: $foo??0::split() ouch! Yeah, seriously. I mean, what a subtle bug! It would take him hours to figure out went wrong! Sarcasm is an ugly thing. One thing that I just thought of that could be intersting: $foo => 'a' or 'b&#x

Re: Return with no expression

2004-08-23 Thread Aaron Sherman
Luke Palmer wrote: $foo??split()::0; Ought to be fine Imagine the shock of the first guy who rezlizes he got the logic backwards and "bug-fixes" it to: $foo??0::split() ouch! I've always thought that particular bit of sugar was rather dangerous. I'd even prefer a longhand: $foo either 0

Re: Instantiation

2004-08-23 Thread Aaron Sherman
Dave Whipp wrote: "Sean O'Rourke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] my $x = (use Some::Module::That::Defines::A::Class).new("blah"); how about some variation on my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new("blah"); Wow, that's pretty amazing...

Re: Instantiation

2004-08-23 Thread Aaron Sherman
On Mon, 2004-08-23 at 15:19, Paul Seamons wrote: > > So, I was wondering about a synonym, like: > > > > uses Some::Module::That::Defines::A::Class $foo; > > Well if the long name is the problem: > > use Some::Module::That::Defines::A::Class as Foo; No, like I said: this is not golf. I'm tryi

Instantiation

2004-08-23 Thread Aaron Sherman
I was thinking about the case where you use a module, only to define a class that you then instantiate like this: use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant. It's not so much that

Re: A thought for later -- POD tables

2004-08-22 Thread Aaron Sherman
Brent 'Dax' Royal-Gordon wrote: Aaron Sherman <[EMAIL PROTECTED]> wrote: Still, tables are useful, so here's a simple way to get the kind of table we see above, without the HTMLish trap of pseudo-layout: Because one of the features of POD is that documentation tends to

Re: A thought for later -- POD tables

2004-08-21 Thread Aaron Sherman
Luke Palmer wrote: On the other hand, Larry had a good point. Why couldn't we do: =begin table ... =end table For some sufficiently simple ...? Obviously this gives the formatter control over how the table is formatted, which is arguably a bad thing since it won't be implemented (POD tools are mo

Re: Return with no expression

2004-08-21 Thread Aaron Sherman
Matthew Walton wrote: Larry Wall wrote: I suspect there's an argument that [0,0) ought to be considered undef (which would conveniently numerify to 0 with an optional warning). In the absence of a paradox value, undef would be fine there I think :-) Too bad we don't have NaRN (Not a Random Number).

Re: A thought for later -- POD tables

2004-08-21 Thread Aaron Sherman
Luke Palmer wrote: Aaron Sherman writes: <> H< C<$_> | C<$x> | Type of Match Implied | Matching Code > T< Any | CodeC<< <$> >> | scalar sub truth | match if C<$x($_)> > Oh, and BTW: My mailer seems to have snuck s

Re: A thought for later -- POD tables

2004-08-21 Thread Aaron Sherman
L:uke, just a note before I reply to you specifically: I understand your concerns, and I have no interest in blurring the line between presentation and markup, which I think ultimately is where your concern comes from. In fact, if you re-read what I wrote (and what I write below), you'll see th

A thought for later -- POD tables

2004-08-20 Thread Aaron Sherman
Larry Wall wrote: $_ $xType of Match ImpliedMatching Code == = == Any Code<$> scalar sub truth match if $x($_) This bit of POD made me think about POD's lack of tabular formatting, a common idiom in technical

Re: Synopsis 4 draft 1

2004-08-20 Thread Aaron Sherman
Larry Wall wrote: =head1 Title Synopsis 4: a Summary of Apocalypse 4 A little light reading is always good in the morning ;-) To return a value from a pointy sub or bare closure, you either just mention the value last that you want to return, or you can use C. A C by default exits from the inne

Re: Return with no expression

2004-08-19 Thread Aaron Sherman
On Thu, 2004-08-19 at 10:03, Luke Palmer wrote: > Matt Diephouse writes: > > use CGI qw(:standard); > > > > my $foo = Bar->new( > > name => "Baz", > > value => param('baz'), > > something => 'else' > > ); > > > > See the problem? > > Yikes, yeah, that see

[Fwd: Re: Something to ponder]

2004-08-18 Thread Aaron Sherman
This bit comes from the p6i list, and I just thought I'd ask those in-the-know if my suggested "returntype" role/property would make sense here, or if there's another way to do it that makes more sense? For that matter, does MMD on return type map into Perl6's gestalt at all, or would it be tumoro

Re: Why do users need FileHandles?

2004-07-23 Thread Aaron Sherman
a "trimmed down" release, such as an OS installer 3. The "extended core". The modules from some CPAN-alike that are considered to be "supported Perl extensions" In Perl 5, I think of libwww-perl and libnet this way, but making an official distinction lets users dec

String interpolation

2004-07-20 Thread Aaron Sherman
mnemonically. Could even have "$\b$money\bM is a lot" which would force the lone $ to be literal in the same way as "\$$money\bM is a lot" would. Kinda fun. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Perl Toolsmith http://www.ajs.com/~ajs/resume.html

Re: The .bytes/.codepoints/.graphemes methods

2004-07-02 Thread Aaron Sherman
sue. > But perhaps in the interests of performance as well as hackery we > should explicitly provide some sort of variant regex behavior: > > /a./ :bytes > /a./ :graphemes As pointed out by others, this is already there, though I'm not sure that it would be specified th

Re: if not C<,> then what?

2004-07-01 Thread Aaron Sherman
at this should be a longer operator than other contextifiers, so why not just the C-like, "void"? void foo::b(); -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Perl Toolsmith http://www.ajs.com/~ajs/resume.html

Re: FW: Periodic Table of the Operators

2004-06-01 Thread Aaron Sherman
t supposed to. ¥ is a shorthand for "zip", and if you don't want to use the funky one-character operator, just use the afunked three-character one. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Predicting Operators

2004-06-01 Thread Aaron Sherman
- though I couldn't find my way through the discussion > on comma to know where it now stands. Actually, since comma is now an operator for list construction, I suppose ,= would certainly have a clear enough meaning. Still, I'm not sure everything needs to be operatorified. Is push so hard

Re: idiom for filling a counting hash

2004-05-18 Thread Aaron Sherman
sub count { my $self = shift; my $data = shift; return $self->{counter}{$data}; } sub counts { my $self = shift; return %{$self->{counter}}; } -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Yadda yadda yadda some more

2004-05-18 Thread Aaron Sherman
On Tue, 2004-05-18 at 05:23, James Mastros wrote: > (Note: Aaron Sherman's syntax above doesn't match A12#Overloading. Was > the syntax changed, or is he wrong?) Aaron Sherman was arm-waving as the important bits were not related to the specific syntax of coerce overloading. -

Re: RFC eq and ==

2004-05-18 Thread Aaron Sherman
through conversion). Similarly, a class that represents a DNS zone should probably provide an eq, but not ==. All that make sense? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Yadda yadda yadda some more

2004-05-17 Thread Aaron Sherman
On Fri, 2004-05-14 at 18:53, Luke Palmer wrote: > Aaron Sherman writes: > > or did Larry mention a way to define a converter and I missed it? > > Yep, that's what happened. See Apocalypse 12 under "Overloading." Ok, so in the case of: my int $i = ...;

Re: Yadda yadda yadda some more

2004-05-14 Thread Aaron Sherman
ning a conversion and allow: class foo { ... sub prefix:IO::Socket(foo $f) returns(IO::Socket) {...} } or did Larry mention a way to define a converter and I missed it? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmi

Re: Yadda yadda yadda some more

2004-05-14 Thread Aaron Sherman
, I don't think it should know or care. BEGIN should probably propagate the exception (or just ignore it), since there's no graceful way to recover here. > The rhs value is evaluated here at compile-time. Is C<...> smart enough to > know that and keep quiet? I don

Re: $foo.s/foo/bar/

2004-05-13 Thread Aaron Sherman
On Thu, 2004-05-13 at 04:30, Rafael Garcia-Suarez wrote: > Aaron Sherman wrote: > > Is it a special type of calling convention, e.g.: > > > > sub s (Regex $pat, Str $replace, bool ?$i) is doublequotelike returns(Str) { > > Ooh, "doublequotelike" sounds

Yadda yadda yadda some more

2004-05-12 Thread Aaron Sherman
x27;m a fan of C<...> being valid syntax, but returning a run-time exception. It's just a lovely bit of code-as-documentation. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: $foo.s/foo/bar/

2004-05-12 Thread Aaron Sherman
arser as a special case with the definition of s/// and that seems of questionable value for the complexity you add. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: C style conditional statements

2004-05-12 Thread Aaron Sherman
quot;ok enough to release Perl 5" more than 10 years ago... it's time. If anything though, over the last 2 years, more and more Perl 5 culture has re-asserted itself over the design on Perl 6. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

is rw trait's effect on signature

2004-05-06 Thread Aaron Sherman
. or, it has to do something of the sort: { my X $tmp = $var; foo($tmp); $var = $tmp; } which has its own problems, of course. Were either of these the intention or am I missing something? "is ref" probably has the same concern. -- Aaron Sherman <[EMAIL PROTECTED]> Se

Re: Named parameters vs. slurpy hash syntax: brittle call syntax!

2004-05-06 Thread Aaron Sherman
t to? Do you want to say that: logError($msg, prio=>CGI.param("priority")) is an error at compile time because CGI.param is defined as returning a Str, even though it might well be a numeric value in that string? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: United States-Perl6 keyboard for windows

2004-05-02 Thread Aaron Sherman
i-equiv spam-filters will go nuts ;-) -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback signature.asc Description: This is a digitally signed message part

RE: How do I do parametered-roles on member objects?

2004-05-01 Thread Aaron Sherman
On Sat, 2004-05-01 at 02:39, Austin Hastings wrote: > (The correct answer to the specific question is "" :-) You spelled that wrong. That's: use Grammar::PHP; ;-) -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the so

RE: How do I do parametered-roles on member objects?

2004-04-30 Thread Aaron Sherman
On Fri, 2004-04-30 at 23:12, Austin Hastings wrote: > > From: Aaron Sherman [mailto:[EMAIL PROTECTED] > > I think you want a combination of re-dispatch and delegation: [...example code...] > > That should do what you want. > > Well, not really: > > 1- It required

Re: How do I do parametered roles?

2004-04-30 Thread Aaron Sherman
} has ErrorHanlder $:errors handles <>; has MessageHandler $:messages handles <>; } That should do what you want. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: A12: Exporation

2004-04-26 Thread Aaron Sherman
On Fri, 2004-04-23 at 19:52, Damian Conway wrote: > Aaron Sherman wrote: > > Now, I know that the Apoc on modules has not been written, and by that > > time Larry will have thought of this, but I thought I'd point out that > > some mechanism will have to exist in modules

Math -- another stab

2004-04-25 Thread Aaron Sherman
Perl 5, but they're defined in perlfun in terms of Perl and in the Parrot opcode set, so I think it's fair (acos, asin, tan). Enjoy! -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'

Re: A12: Exporation

2004-04-25 Thread Aaron Sherman
oo::bar; should solve that, no? Now I just want a tied array called @EXPORT that acts as a macro, adding "is export" to the symbols I put into it ;-) Seriously, I did kind of like the code-as-documentation pseudo-feature of seeing all of the exported symbols listed up-front in a module. It

Re: A12: Exporation

2004-04-23 Thread Aaron Sherman
Exporation?! And I sent one to p6i about "missint math ops" boy, this is not my day :-( But still, you get the idea, I hope ;-) -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

A12: Exporation

2004-04-23 Thread Aaron Sherman
em as their own. I'm deliberately NOT proposing how that would be done, as I have significant faith that Larry can manage that small bit of magic on his own, and doesn't need me spewing random ideas and, even worse, syntax suggestions. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Syste

Re: A12: Typed undef

2004-04-23 Thread Aaron Sherman
sense to explore this in much depth. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: A12: default accessors and encapsulation

2004-04-23 Thread Aaron Sherman
return $old } and while that's verbose, it's only a bit more verbose than: multi method foo(Str $blah) { (my($old),$.foo)=($.foo,$blah); return $old; } which is what you would have write ANYWAY to add your new functional

Re: A12: Conflicting Attributes in Roles

2004-04-23 Thread Aaron Sherman
On Fri, 2004-04-23 at 14:28, Aaron Sherman wrote: > I would expect wildcard delegation not to care about method conflicts at > all, since what's being done is, by its nature, much more dynamic > anyway. I misunderstood roles when I said this... I now get why this is a problem, sor

Re: A12: Conflicting Attributes in Roles

2004-04-23 Thread Aaron Sherman
delegation though, unless Dog were specifically > marked not to handle .bark. That's fine. I would expect wildcard delegation not to care about method conflicts at all, since what's being done is, by its nature, much more dynamic anyway. -- Aaron Sherman <[EMAIL PROTECTED]> Senior

Re: A12: a doubt about .meta, .dispatcher and final methods

2004-04-23 Thread Aaron Sherman
term). I just wanted to add some sense of "if I were writing a module, how likely would it be that I would spontaneously use meta?". -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: A12: Conflicting Attributes in Roles

2004-04-23 Thread Aaron Sherman
On Fri, 2004-04-23 at 11:44, Brent 'Dax' Royal-Gordon wrote: > Aaron Sherman wrote: > > class c { does a for <>; does b for <>; } > Funny how similar that is to > > class c { does a handles <>; does b handles <>; } In "Relat

Re: A12: Conflicting Attributes in Roles

2004-04-23 Thread Aaron Sherman
e "does b". You could assert the other way around: class c { does a for <>; does b for <>; } which is kind of nifty looking, but some may blanch at the dual meaning for "for" -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: A12: syntax to call Attributes

2004-04-23 Thread Aaron Sherman
nse. Similarly, if joe were a method in c1, it would still be "replaced" in the same way. This might lead to some surprises, but I think if folks understand the relationship here correctly, it will not be an issue. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: A12: a doubt about .meta, .dispatcher and final methods

2004-04-23 Thread Aaron Sherman
b/Module/Build/Base.pm:sub dispatch { ./Module-Build-0.23/lib/Module/Build/Platform/MacOS.pm:sub dispatch { ./Module-Build-0.23/blib/lib/Module/Build/Platform/MacOS.pm:sub dispatch { ./Module-Build-0.23/blib/lib/Module/Build/Base.pm:sub dispatch { So it's not THAT bad.

Re: A12: Required Named Parameters Strike Back!

2004-04-22 Thread Aaron Sherman
is another thing. I'd rather have a language that works than one that is complete. Plenty of time to complete it later, but those who are thinking of taking on large-scale development with it (e.g. converting over large CPAN modules or implementing new Perl6ish libraries) just want something

Re: Apo 12

2004-04-22 Thread Aaron Sherman
assExtenderClass.add_a_print_method($obj1.metaclass); my ::{$obj1.class} $obj2; ? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: A12: Strings

2004-04-22 Thread Aaron Sherman
ytes; my string $line is bytes = $filehandlelikething.getline; } ? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

perl6-language@perl.org

2004-04-20 Thread Aaron Sherman
ally, if Process is a standard class, and happens to do: class Process { ... method prefix:~() { return ~($.getpid) } method prefix:+() { return $.getpid } ... } Then $$ is just a Process object, but behaves exactly as y

Re: A12: default accessors and encapsulation

2004-04-20 Thread Aaron Sherman
thread synchronization or some form of threadsafe locking must be performed. You're not SETTING status, you're reading it, but you are passing parameters to the read accessor. How do you do that if parameters force a write? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

A12: Strings

2004-04-20 Thread Aaron Sherman
hashes? More to the point, is it worth it, or will I be further slowing down hash access because it's special-cased in the default situation? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: backticks

2004-04-16 Thread Aaron Sherman
k you're so worried about interpolation, and rightly so. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

RE: Array/Hash Slices, multidimensional

2004-04-16 Thread Aaron Sherman
7;, +'2', +'3', +'4', +'5'); And since everything is a constant, you end up with: int @matrix = (1, 2, 3, 4, 5); It's magic ;-) The last step above is what I would expect a B::Deparse-like thing for Perl 6 to produce. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: backticks

2004-04-16 Thread Aaron Sherman
'blue'}, sub {$css_class = 'yellow'}); Only a subtle variation. do_every would look like: sub do_every(int $n, int $current, code $doit, code $elsedoit = undef) { if $n % $current == 0 { $doit(); } elsif defined $els

Re: Compatibility with perl 5

2004-04-15 Thread Aaron Sherman
of several options (like my current "/usr/bin/perl5.8.3"), then it seems like a good thing. I'll probably continue to write: #!/usr/bin/perl use 6; and add: use 5; to my existing Perl 5 programs that I don't have time to convert. That doesn't mean it&

Re: Compatibility with perl 5

2004-04-15 Thread Aaron Sherman
semantics to a subroutine / class / method / data access level, but to allow such free-form mixing is gonna be ugly. My personal feeling is that use 5; ... anything else ... use 6; should be an error, and if you want to write your own support for "My5" and "

Re: backticks

2004-04-15 Thread Aaron Sherman
On Wed, 2004-04-14 at 17:04, Simon Cozens wrote: > [EMAIL PROTECTED] (Aaron Sherman) writes: > > `` gets used an awful lot > > But that's in Perl 5, which is a glue language. I'm not sure I fully agree with that. Perl 5 *can* be a glue language, and so can Perl 6. They

Re: backticks

2004-04-14 Thread Aaron Sherman
/zsh-style: $(...) But we have other designs on that. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Compatibility with perl 5

2004-04-14 Thread Aaron Sherman
I'm not sure, once again, what would happen if you said: use 5; use 6; Either it would give you an error (you really deserve it) or it would just switch back to Perl 6 mode... the problem arises when you ask, "what about anything that got parsed in between the two?&

Re: Compatibility with perl 5

2004-04-13 Thread Aaron Sherman
class null {} # Just for the keyword print "Hello world\n"; Or, if you prefer C style: #!/usr/bin/perl6 use 6; stdout.print("Hello world\n"); # not sure if the invocant will do it -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Q: Can colons control backtracking in logical expressions?

2004-04-02 Thread Aaron Sherman
tential side-effects on $s for when I evaluate it again). It would be nice to have an un-lazying operator of some sort which could assert a lack of side-effects as a side-effect. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-26 Thread Aaron Sherman
, I certainly see the utility in this. Am I imagining that it was stated earlier? What's more that could be: for *%x{$y}{$z} -> $i {...} and I can't imagine it makes any sense to bind that * anywhere but: for *(%x{$y}{$z}) -> $i {...} I like the division between

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Aaron Sherman
any array ref in list context to NOT explode other than []? I can't think of any. push @a, $b Is it too non-obvious that if $b is an array ref, then this is going to extend @a by $b.length elements? Pardon my ignorance, but I thought this was the plan. Feel free to correct me if

Re: Whither Apocalypse 7?

2004-02-29 Thread Aaron Sherman
ly it is that there will be an A7 back-fill, I have no idea, but A11 sounds like its going to be big enough to make all of us forget about A7-10 anyway ;-) -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get

Re: Thinking about Accessors

2004-02-29 Thread Aaron Sherman
cessor that recurses? Does C<.bar_attr> call my method, and not the accessor, or is there some other way to do that? -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback signa

Perl 6 timeline?

2004-02-26 Thread Aaron Sherman
pattern for Perl 6, I find myself needing the next step to be taken for work reasons and wanting it for personal reasons. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: Perl 6 timeline?

2004-02-26 Thread Aaron Sherman
meterized argument passing with basic type constraints * much improved and more reliable thread-safety * A far lighter weight exception system If Perl 6 contained only the above and nothing else, I would be a happy camper, and my production code would be far less prone to errors and structura

POD

2004-02-26 Thread Aaron Sherman
osed a mental hurdle. I'd love to see POD become more compact vertically (e.g. not as much reliance on blank lines), and also a better implementation of X and L, but other than that I think POD is a wonderful format and one of the strenghts of the Perl distribution. -- Aaron Sherman <[EMAIL

Re: Traits: to renew OO inheritance in a hacker style discussion

2004-02-13 Thread Aaron Sherman
On Thu, 2004-02-12 at 14:03, chromatic wrote: > On Thu, 2004-02-12 at 05:52, Aaron Sherman wrote: > > > Perhaps I'm slow, but I don't see the difference between a trait and a > > Java interface other than the fact that traits appear to be more of a > > run-time

Re: The Sort Problem

2004-02-13 Thread Aaron Sherman
subref, not a string (thus having closure status, and therefore access to context). I think you and I are in violent agreement. I just look at this as a problem that doesn't need solving because Schwartzian Transforms do all the work for me. You look at it as something needing encapsulation. That's cool, but sematically, we're doing the same work. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback

Re: The Sort Problem

2004-02-12 Thread Aaron Sherman
@new1 = sortpairs {$_[0] <=> $_[1]} map {[$_,$_]} @old1; @new2 = sortpairs {$_[0] <=> $_[1] || $_[4] cmp $_[3]} map {[getkeys($_),$_]} @old2; The second example really illustrates the point that you can swap the direction of ke

Re: Traits: to renew OO inheritance in a hacker style discussion

2004-02-12 Thread Aaron Sherman
a trait and a Java interface other than the fact that traits appear to be more of a run-time construct. Java interfaces are actually a very nice compromise between multiple and single inheritance. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the s

Re: The Sort Problem

2004-02-12 Thread Aaron Sherman
On Thu, 2004-02-12 at 08:43, Aaron Sherman wrote: > sub sortpairs(&@) { > my $comp = shift; > my %pairs = @_; > return map {$pairs{$_}} sort {$comp->($a)} keys %pairs; > } Doh... it's early for me. That's C()}> with no parameter. The fact that $a and

Re: The Sort Problem

2004-02-12 Thread Aaron Sherman
ction you like in the map portion (which just returns key/value pairs) and sortpairs' job is just to compare the keys and return the resulting sorted values. No Perl 6 here, move along ;-) Perl 6 could contribute here by making it cheaper to construct/pass the keys, but that's about it.

Re: Sabbatical from the list

2003-01-30 Thread Aaron Sherman
to Damian's withdrawal. Since there's not much I can do on the library front at this stage anyway, I'm off to work on sand. Good luck all! -- Aaron Sherman <[EMAIL PROTECTED]> This message granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: arrays, hashes unified indexing syntax impact on future varia tion s on other collection types

2003-01-30 Thread Aaron Sherman
be easier written as: value value value Perhaps casting it in non-Perl syntax will free us from the bonds of our preconceptions -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

RE: arrays, hashes unified indexing syntax impact on future varia tion s on other collection types

2003-01-30 Thread Aaron Sherman
'd be programming in Java. Perl is ultimately a deconstructionist language (as Larry has pointed out), which leads me down the path of deconstructing *it*. Hmm... why is it that Perl brings out the religious and social metaphors for me? ;) -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-30 Thread Aaron Sherman
On Wed, 2003-01-29 at 17:50, Spider Boardman wrote: > On 29 Jan 2003 14:29:52 -0500, Aaron Sherman wrote (in part): > > ajs> As for the argument that testing for true non-existentness is a > ajs> burden, check out the way Perl5 does this. Hint: there's a central > ajs

Re: Arrays: Default Values

2003-01-30 Thread Aaron Sherman
On Wed, 2003-01-29 at 17:12, Dan Sugalski wrote: > At 12:40 PM -0500 1/29/03, Aaron Sherman wrote: > >Elements of a has ARE ordered, just not the way you may expect. > > Just to nip this one in the bud... The bud was back that-a-way about 3 days > If people start assuming

Re: Arrays: Default Values

2003-01-30 Thread Aaron Sherman
an example? -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
I think it should be allowed. Perhaps I'm overreacting to the first option. It's not so bad. undef should still probably keep its old semantics when being converted to an integer and go to zero, though. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
d no spam warning issued). This sort of logic deferral is common to many uses of undefined values (or "NULL") in databases, even when columns have defaults that are non-null. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Doma

Re: Spare brackets :-)

2003-01-29 Thread Aaron Sherman
the response on this list :) Also, you don't always pre-declare in Perl, and the following would be ambiguous: $x[7] = 8; That could auto-vivify an array ref or a hash ref, and choosing one or the other is kind of scary. I think you could work around that, but it would require a real ded

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
t: there's a central sv_undef, and that's not what array buckets are initialized to -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
o C<@a> a list of pairs, not the expanded form that Perl5 assigns, but my point holds either way, just not the example. > 3. shift. ditto. No problem here. In fact, it's almost always a cheap operation too. Sometimes (e.g. for some types of external data) it will be exp

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
, that would be a different language, and Perl has hashes and arrays. So, the most we can do is make them not work too differently. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Spare brackets :-)

2003-01-28 Thread Aaron Sherman
On Tue, 2003-01-28 at 16:34, Dan Sugalski wrote: > At 4:17 PM -0500 1/28/03, Aaron Sherman wrote: > > Now the question becomes, do you WANT them > >for readability? > > Given that Larry's answer has been a resounding "yes" all along, I'm not sure

Re: Arrays: Default Values

2003-01-28 Thread Aaron Sherman
so you have to auto-vivify in order to pass a reference. Or did I miss something there? -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Spare brackets :-)

2003-01-28 Thread Aaron Sherman
nge anything because HASH's fetch and store methods (no matter how builtin or pre-optimized they may be) will do the conversion. You still need C<{}> vs. C<[]> for anonymous types, but I don't think you NEED them for indexing. Now the question becomes, do you WANT them for

<    1   2   3   4   5   6   >