Re: Junctions of classes, roles, etc.

2005-04-28 Thread Aaron Sherman
make them whatever we want. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Threading in Parrot vs Perl

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 10:00, Luke Palmer wrote: Aaron Sherman writes: Well, more to the point, autothreading of junctions will hit the wall of Parrot duping the interpreter. That's probably not something you want to suffer just to resolve a junction, is it? What? Why will it do

Re: Threading in Parrot vs Perl

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 13:55, Rod Adams wrote: I would be dismayed if autothreading used threads to accomplish it's goals. Simple iteration in a single interpreter should be more than sufficient. Sorry, I misunderstood. Thanks for the clarification. -- Aaron Sherman [EMAIL PROTECTED

Re: use English

2005-04-28 Thread Aaron Sherman
On Thu, 2005-04-28 at 13:52, gcomnz wrote: Aaron Sherman wrote: As a side note, I'd like to suggest that English is just rubbing people's noses in the fact that they're not allowed to program in their native tongue. Names might be less in-your-face. Why are we even having to say use

Re: use English

2005-04-27 Thread Aaron Sherman
On Tue, 2005-04-26 at 10:48, Luke Palmer wrote: Aaron Sherman writes: The reasons I don't use English in P5: * Variable access is slower Hmm, looks to me like $INPUT_RECORD_SEPARATOR is faster. (Actually they're the same: on each run a different one won, but just barely like

Re: LABELS: block

2005-04-27 Thread Aaron Sherman
, and as far as I know, no one is deprecating labels). * Tagging might be useful in other situations where a keyword would be useful for visually marking the construct. I have no good examples, though. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's

use English

2005-04-26 Thread Aaron Sherman
On Mon, 2005-04-25 at 22:24 -0500, Rod Adams wrote: Not exactly a fair comparison, since it's common to not use English due to the $ issue. I suspect that if that was not the case, it would be used more. The reasons I don't use English in P5: * Variable access is slower *

Roles as anonymous and/or closures

2005-04-26 Thread Aaron Sherman
of its own model method's anon role). has not precludes ever having a type named not, and if that's a problem it could read not has or !has, but that feels a bit klunkier to me. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me

Re: Roles as anonymous and/or closures

2005-04-26 Thread Aaron Sherman
. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Deletion of members by mixin

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 09:58, Abhijit Mahabal wrote: On Tue, 26 Apr 2005, Aaron Sherman wrote: It also might be useful for roles to be able to delete members and methods from a class like so: role foo { has $.x; has not $.y; } But that brings up

Re: Deletion of members by mixin

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 10:49, Aaron Sherman wrote: Quoting S12: A class's method definition hides any role definition of the same name, so role methods are second-class citizens. On the other hand, role methods are still part of the class itself, so they hide

Re: Deletion of members by mixin

2005-04-26 Thread Aaron Sherman
On Tue, 2005-04-26 at 12:44, Abhijit Mahabal wrote: On Tue, 26 Apr 2005, Aaron Sherman wrote: So, as you can see, in the case of mixins, the hypothetical: role z { has not mymeth; } Sorry, my bad. I wandered sideways into talking about methods. has, of course, only

Re: LABELS: block

2005-04-26 Thread Aaron Sherman
not able to do: method: args; And I'm not even going to start on the if it's the same column thing... ;-) -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Thunking semantics of :=

2005-04-24 Thread Aaron Sherman
On Sun, 2005-04-24 at 07:51 +, Nigel Sandever wrote: On Sat, 23 Apr 2005 21:00:11 -0700, [EMAIL PROTECTED] (Larry Wall) wrote: From what I've read, the trend in most modern implementations of concurrency is away from shared state by default, essentially because shared memory simply

Re: Accepted abbreviations

2005-04-22 Thread Aaron Sherman
of us have a hard time making out what someone means if they say regexp vs regex? What's more, I'd rather you didn't w comments with single-letter abbreviations, as it would make it much harder for me to r. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Aaron Sherman
PROTECTED],$word])} else {print join , @$w, $word} }}' /usr/share/dict/words But, what do I know? ;-) -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Truely temporary variables

2005-04-17 Thread Aaron Sherman
On Fri, 2005-04-15 at 18:04 +0200, Juerd wrote: Aaron Sherman skribis 2005-04-15 11:45 (-0400): What I'd really like to say is: throwawaytmpvar $sql = q{...}; throwawaytmpvar $sql = q{...}; I like the idea and propose a, aliased an for this. Too short. Having such a short

Truely temporary variables

2005-04-15 Thread Aaron Sherman
, it might be considered always thread-private and might be required to be a core, unboxed type. These extra assumptions are only worth it if they enhance the optimization possibilities surrounding such a value. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound

Re: Truely temporary variables

2005-04-15 Thread Aaron Sherman
On Fri, 2005-04-15 at 13:10, Luke Palmer wrote: Aaron Sherman writes: Among the various ways of declaring variables, will Perl 6 have a way to say, this variable is highly temporary, and may be re-declared within the same scope, or in a nested scope without concern? I often find myself

Re: nbsp in \s, ?ws and

2005-04-15 Thread Aaron Sherman
whitespace, but letting it match NBSP and then using \s for splitting things is wrong, I think. Thankfully, NBSP (U+00A0) is not Unicode whitespace. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Whither use English?

2005-04-12 Thread Aaron Sherman
. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Whither use English?

2005-04-11 Thread Aaron Sherman
a Language::Russian and Language::Nihongo? Given Perl 6, it would even be quite valid for those modules to add aliases for all of the core functions and keywords, not just global variables. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying

Re: Question about list context for String.chars

2005-04-11 Thread Aaron Sherman
equivalent? Does .chars throw an exception, or does it rely on the string to know how to characterify itself according to its vtable? -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Whither use English?

2005-04-11 Thread Aaron Sherman
On Mon, 2005-04-11 at 15:00, Juerd wrote: Aaron Sherman skribis 2005-04-11 14:49 (-0400): Yes, but it will be spelled: use $*LANG ;-) Seriously, is there some reason that we would not provide a Language::Russian and Language::Nihongo? Given Perl 6, it would even be quite valid

Re: Question about list context for String.chars

2005-04-11 Thread Aaron Sherman
On Mon, 2005-04-11 at 15:40, gcomnz wrote: I have to say I'm slightly confused too for some languages, especiallyfor syllabic alphabets. At the same time, I'm pretty clear for CJK,Syllabaries, and alphabets, or at least I hope I'm clear (I guess I'mabout to find out), .chars just returns the

Re: S26 Draft

2005-04-10 Thread Aaron Sherman
On Sun, 2005-04-10 at 14:02 +0300, Yuval Kogman wrote: Please don't be lazy, everyone, and look at this: http://svn.openfoundry.org/pugs/docs/ There are some more drafts that should be reviewed, and more will probably follow. Can we please be rid of:

Re: identity tests and comparing two references

2005-04-06 Thread Aaron Sherman
to add a mixin, for example: $r = \$a but Ref::Weak; Now, someone gets a ref to $r, and wants to call a method defined in Ref::Weak. How should they do that? -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down

Re: :=: (OT)

2005-04-04 Thread Aaron Sherman
Encoding) I can't tell you how long I thought my vim was broken because it would just output blanks when I used the digraphs. ;-ยป We need an S-1 that describes the environmental / egronomic / aesthetic issues surrounding the use of the latin-1 and/or Unicode characters. -- Aaron Sherman [EMAIL

Re: :=: (OT)

2005-04-04 Thread Aaron Sherman
On Mon, 2005-04-04 at 16:41, Larry Wall wrote: On Mon, Apr 04, 2005 at 03:55:23PM -0400, Aaron Sherman wrote: : but if you use vim or emacs inside a terminal, you'll want to make sure : it's in iso-latin-1 mode (e.g. in gnome-terminal, you have to use the : menu: Terminal-Set Character

Re: identity tests and comparing two references

2005-04-01 Thread Aaron Sherman
On Thu, 2005-03-31 at 23:46 -0800, Darren Duncan wrote: What I want to be able to do is compare two references to see if they point to the same thing, in this case an object, but in other cases perhaps some other type of thing. Let's be clear about the difference between P5 and P6 here. In

Re: identity tests and comparing two references

2005-04-01 Thread Aaron Sherman
On Fri, 2005-04-01 at 10:46, Larry Wall wrote: On Fri, Apr 01, 2005 at 08:04:22AM -0500, Aaron Sherman wrote: : In P6, an object is a data-type. It's not a reference, and any member : payload is attached directly to the variable. Well, it's still a reference, but we try to smudge

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-31 Thread Aaron Sherman
stupid questions now means that we'll have smart answers by the time P6 is released. If I'm overly slowing the process, please say so, and I'll stop asking. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-31 Thread Aaron Sherman
On Thu, 2005-03-31 at 15:25, chromatic wrote: On Thu, 2005-03-31 at 13:11 -0500, Aaron Sherman wrote: I can't answer most of these well. However... Open-Closed is a great idea until the most natural and easiest way to do something is to to redefine a little bit of the world. You seemed

Re: use less in perl6?

2005-03-30 Thread Aaron Sherman
On Wed, 2005-03-30 at 10:20 +0200, Yuval Kogman wrote: Perl 6 has some more interesting capabilities for lexical scoped hinting of tradeoff preferences. For example: use less precision; # the default nums created in this scope are # lower precision floats use less cpu; #

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Aaron Sherman
On Tue, 2005-03-29 at 16:00 -0700, Luke Palmer wrote: Unless the caller can't see the signature, as is the case with methods. I need to understand this piece. In this code: class X { method meth() {...} } class Y is X { method meth() is

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Aaron Sherman
that spans many classes, and does not fit into a nice little tree. I think that before we take on such an idea, we should look for research about this kind of type inference. Heh well, here's where we notice that Aaron reads and replies in series by paragraph ;-) -- Aaron Sherman [EMAIL PROTECTED

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Aaron Sherman
silently (perhaps with an optional warning) permit it. Please think carefully about how dynamic you want Perl 6 to be Dynamic is good, but there's such a thing as too much of a good thing. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Aaron Sherman
it might change at run-time. Is that really 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: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Aaron Sherman
On Wed, 2005-03-30 at 17:09, Luke Palmer wrote: Aaron Sherman writes: What I do not think should be allowed (and I may be contradicting Larry here, which I realize is taking my life in my hands ;) is violating the compile-time view of the static type tree. That sentence is getting

Re: .method == $self.method or $_.method?

2005-03-29 Thread Aaron Sherman
in the given scope (ok, so @_given actually contains more information than just the value itself). It would be potentially interesting to introduce a give keyword for this purpose: map {map {give 1} 0..1000} @foo; which simply returns the value of {given 1;$_} -- Aaron Sherman [EMAIL PROTECTED

Re: string/list division

2005-03-28 Thread Aaron Sherman
. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Units on numbers [was Re: S28ish]

2005-03-28 Thread Aaron Sherman
a new value like so: my Watts $Power = $Current * $Resistance; Which again are probably all aliases for Units::Physics::* -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Units on numbers [was Re: S28ish]

2005-03-28 Thread Aaron Sherman
}){print class units::$unit is units::$def;$c}else{print # No handling for derived units yet ($unit=$def)$c}}' /usr/share/units.dat -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Units on numbers [was Re: S28ish]

2005-03-28 Thread Aaron Sherman
is a fine starting point. I'm still of the basic opinion that all of the logic can be handled through roles (classes?) and MMD, rather than trying to code up a units converter in parallel to the type system. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Aaron Sherman
On Sat, 2005-03-26 at 00:27 -0800, Larry Wall wrote: $$ is now $*PID. ($$foo is now unambuous.) $0 is gone in favor of $*PROGRAM_NAME or some such. You know, Java did one thing in this respect that I liked, and managed to do it in a way that I couldn't stand. The idea of program as object

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Aaron Sherman
On Sat, 2005-03-26 at 12:48 -0800, Larry Wall wrote: On Sat, Mar 26, 2005 at 09:59:10AM -0500, Aaron Sherman wrote: Well, there is a process object, but it actually exists inside the operating system. It's a little silly to force people to name their own process all the time. I think we can

Re: New S29 draft up

2005-03-23 Thread Aaron Sherman
, that gives us a :16($x) operator for free. Is that a function? E.g. is this valid? $x += :16($y) ? About the only thing it doesn't give us is :$radix$input $input.radix($radix) ? I'd suggest that this be a universal virtual method that strings get a definition for. -- Aaron

Re: eval (was Re: New S29 draft up)

2005-03-18 Thread Aaron Sherman
). Thus: eval read :file(foo); There you have it. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: eval (was Re: New S29 draft up)

2005-03-18 Thread Aaron Sherman
On Fri, 2005-03-18 at 10:28, Aaron Sherman wrote: On Fri, 2005-03-18 at 05:42, Rod Adams wrote: Hmm. maybe we just need a function that loads an entire file and returns a string of it, then feeds that to eval. Well, I wasn't getting into the IO stuff, but since you said

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Aaron Sherman
On Thu, 2005-03-17 at 02:17 -0800, Brent 'Dax' Royal-Gordon wrote: David Storrs [EMAIL PROTECTED] wrote: Aside from links, that's pretty much the entire perlpodtut boiled down into 7 bullets; a little experimentation to get the hang of it and it all holds together nicely, easy to remember.

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Aaron Sherman
On Wed, 2005-03-16 at 15:09 -0800, David Storrs wrote: C[$x[0] $y] # hmmm...parser ok with that? C[$x[0] $] # hmmm...error, but what was intended: $y] or $]]? In the former case, it's fine. See the grammar I sent last night. In the latter case, you would get balanced-[] matching, and

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Aaron Sherman
revision available sometime tonight, I think, hopefully with an AJS Kwid to KwidData to POD translator (lossy, but still mostly workable). -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Aaron Sherman
On Thu, 2005-03-17 at 16:39, Juerd wrote: Aaron Sherman skribis 2005-03-17 16:30 (-0500): See PodTables in the Pugs wiki. Or see the archive of this list, where we hammered it out previously. Since when is anything in Perl 6, except its name, set in stone? PodTables is a more detailed

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Aaron Sherman
than fragment the SINGLE MOST IMPORTANT TASK in creating code to share with the world: documentation. If I'm left on a desert island with POD, then the only part I'll lament is the desert island. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-17 Thread Aaron Sherman
On Thu, 2005-03-17 at 17:07, Brent 'Dax' Royal-Gordon wrote: Aaron Sherman [EMAIL PROTECTED] wrote: and the hacks in pod syntax (e.g. C ) to get around this are glaring anti- huffmanisms. Whatever bracketing character we decide to use, there will always be occasions where we need

Re: New S29 draft up

2005-03-17 Thread Aaron Sherman
like to stop doing that ;-) -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: New S29 draft up

2005-03-17 Thread Aaron Sherman
On Thu, 2005-03-17 at 18:06 -0600, Rod Adams wrote: First off, thanks for the reply. Very nice work you're doing! I'll listen to proposals about how to support better randoms. For now I think Crand is a standard PRNG. Yes, absolutely. If I gave a contrary impression, I did not mean to. I

Re: New S29 draft up

2005-03-17 Thread Aaron Sherman
On Wed, 2005-03-16 at 02:18 -0600, Rod Adams wrote: I just posted a fresh copy of S29 to: http://www.rodadams.net/Perl/S29.pod http://www.rodadams.net/Perl/S29.html Couple more points from the docs (mostly to the list, but some to you, Rod): multi sub grep (Any|Junction $test : [EMAIL

Re: New S29 draft up

2005-03-17 Thread Aaron Sherman
On Thu, 2005-03-17 at 20:47 -0500, Aaron Sherman wrote: Methods on numeric values (should be defined as pseudo-methods on unboxed numbers): chr hex oct Sigh... well, now I know what Ctrl-Return does in Evolution :-/ Ok, so what I was getting at was that the above three

Re: Q: index(Hello, , 999)

2005-03-16 Thread Aaron Sherman
, the current Perl 5 behavior is very broken. You should never return POS unless it's a negative number flagging failure. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-16 Thread Aaron Sherman
,y,z Section NOT used in the given formats As you can see, what I proposed IS a simple syntactic transformation of Kwid. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-16 Thread Aaron Sherman
of the legions of people who are learning Wiki syntax these days. Making POD *more* Wiki-like without sacrificing useful features of POD is invaluable in terms of tech writers and other non-Perl-programmers writing useful docs in POD! -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-16 Thread Aaron Sherman
is there a list? -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-16 Thread Aaron Sherman
: And then I says, `Mabel,' I says, `shut up.' The ``` character is no longer used. And of course, TONS of Gnu documentation which uses the TeX-friendly: This is the way you ``quote'' things. which means cutting-and-pasting such docs is now much more labor-intensive. -- Aaron

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-16 Thread Aaron Sherman
On Wed, 2005-03-16 at 13:42 -0800, Brian Ingerson wrote: First off, thanks for your kind responses. I'm sure I just got confused by some web page I was looking at, and overwrote part of my stack that I'd just populated from the Kwid doc. And thanks also for pointing me to the Kwid docs where

[Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-15 Thread Aaron Sherman
. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback ---End Message---

Re: How are types related to classes and roles?

2005-02-28 Thread Aaron Sherman
On Mon, 2005-02-28 at 10:34, Thomas Sandla wrote: Am I missing something, but the only thing I've figured out so far is that Parrot uses ternary MMD for its builtin binary ops like ADD, MUL, OR, etc. They are ternary to prevent a final copy or conversion of the result to the target register.

Re: How are types related to classes and roles?

2005-02-28 Thread Aaron Sherman
On Mon, 2005-02-28 at 12:45, Thomas Sandla wrote: Sorry, if this is the wrong list for discussing these Parrot details. Yeah, you really want to be in p6i, not p6l. These guys think a Parrot's just a bird that says funny things and sits on a pirate's shoulder ;-) PS:

Re: S04

2005-02-10 Thread Aaron Sherman
On Thu, 2005-02-10 at 11:59, Luke Palmer wrote: There's been some discussion about bringing a syntax back for that recently, but I haven't really been paying attention. Anyway, this is pretty clear: loop { $foo = readline; do { stuff :with($foo) }; last

Re: = vs == [was: Perl 6 Summary for 2005-01-31 through 2004-02-8]

2005-02-09 Thread Aaron Sherman
On Wed, 2005-02-09 at 06:04, Rod Adams wrote: Larry Wall wrote: Yes, you can certainly intermix them as long as you keep your precedence straight with parentheses. Though I suppose we could go as far as to say that = is only scalar assignment, and you have to use == or == for list

Logic programming in Perl 6

2005-02-09 Thread Aaron Sherman
On Wed, 2005-02-09 at 14:57, Ovid wrote: --- Matt Fowles [EMAIL PROTECTED] wrote: Logic Programming in Perl 6 Ovid asked what logic programming in perl 6 would look like. No answer yet, but I suppose I can pick the low hanging fruit: as a limiting case you could always back

S11 - Modules and export

2004-11-09 Thread Aaron Sherman
I'm still troubled by the export trait as I read S11. I like not having to write a new subroutine in a procedural module and THEN go back up and edit @EXPORT. That's good. But, it seems to me that: module MyHTML { # Wherein I pretend to have written an HTML module

Suggested warning

2004-11-07 Thread Aaron Sherman
I would like to suggest that we define: multi sub *infix:+(...) {...} Will always generate a warning (not just for Cinfix:+, but for any operator) if used outside of a class definition or if used inside a class definition where the current class does not appear in the list of parameters.

Re: Regular expressions and closures (was: Perl 6 Summary for 2004-10-01 through 2004-10-17)

2004-10-27 Thread Aaron Sherman
On Wed, 2004-10-27 at 14:01, Luke Palmer wrote: Aaron Sherman writes: /ab(c|b) {fail unless $1 eq 'c'}/ Now, what does fail mean? I can think of two definitions: 1. proceed to trap state (backtracking then happens) 2. exit (probably using an exception) the rule

Regular expressions and closures (was: Perl 6 Summary for 2004-10-01 through 2004-10-17)

2004-10-26 Thread Aaron Sherman
On Tue, 2004-10-26 at 05:17, Matthew Walton wrote: Also, climbing back out and shouting 'Eureka' would only really be appropriate if you actually had experienced a moment of revelation about something. I suspect you were too busy with the not drowning part for that. Well, such moments of

Re: Regular expressions and closures (was: Perl 6 Summary for 2004-10-01 through 2004-10-17)

2004-10-26 Thread Aaron Sherman
On Tue, 2004-10-26 at 20:16, Larry Wall wrote: On Tue, Oct 26, 2004 at 01:42:02PM -0400, Aaron Sherman wrote: : /ab(c|b){$1 eq 'c'}/ : : If I recall correctly you had said something like, there is no plan : (yet) to allow embedded closures to affect matching directly, other than

Why do rules match against strings?

2004-09-24 Thread Aaron Sherman
Pardon if this has already come up. I only found one prior reference in my search. There's a section in S5 about Matching against non-strings, but it really only addresses matching against strings that are retrieved dynamically from tied values. Some operations in a rule operate on string

Re: S5 updated

2004-09-24 Thread Aaron Sherman
not become 11? Is base 10 superior for some reason? Nope, it's just an arbitrary choice based on the prefernces and compatibility needs of the language designers. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down

Re: But is it intuitive?

2004-09-14 Thread Aaron Sherman
On Tue, 2004-09-14 at 10:11, Abhijit Mahabal wrote: On Tue, 14 Sep 2004, Austin Hastings wrote: That is, can I say: $my_rex = qr/fo*/ but not 'foo'; The word junction came to my mind as I read your mail. $my_rex = qr/fo*/ qr:not/foo/; Of course, the regex itself can do this:

Re: How would I do this in Perl6? #1

2004-09-14 Thread Aaron Sherman
On Tue, 2004-09-14 at 06:45, Michele Dondi wrote: [... snip ...] Now I want to take a list of templates, say $t1, ... $tn and get the result of $result = pack $tn, ... pack $t2, pack $t1, @input; Assuming Perl 6 has a pack, which it may not: for @t { $result =

Re: But is it intuitive?

2004-09-14 Thread Aaron Sherman
On Tue, 2004-09-14 at 14:40, Larry Wall wrote: On Tue, Sep 14, 2004 at 02:02:22PM -0400, Aaron Sherman wrote: : Of course, the regex itself can do this: : : qr{(fo*) ({$1 ne 'foo'})} Er, at the moment bare closures don't care about their return value, so as it currently stands, you'd

Re: Iterators and Cfor

2004-09-09 Thread Aaron Sherman
On Thu, 2004-09-09 at 13:14, Larry Wall wrote: So whereas Ruby's syntax actually tends to push you toward .each iterators, Perl 6's syntax will be fairly neutral on the subject, or maybe biased every so slightly away from method iteration by the width of about one character: for @foo {

Re: Synopsis 9 draft 1

2004-09-07 Thread Aaron Sherman
On Fri, 2004-09-03 at 20:08, Larry Wall wrote: Arrays with explicit ranges don't use the minus notation to count from the end. We probably need to come up with some other notation for the beginning and end indexes. But it'd be nice if that were a little shorter than:

Re: S4: Can PRE and POST be removed from program flow?

2004-09-06 Thread Aaron Sherman
. So, while the rest of this thread is useful, I'm not sure it's as pertinent as you thought. -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback

Re: Synopsis 9 draft 1

2004-09-05 Thread Aaron Sherman
numeric Perl. It took us some time discussing this... we weren't sure what tense you were using. At first we thought it might be the past subjective, but after a while, we decided to coin a new tense: the vapor tense. ;-) Working my way through... thanks Larry! -- Aaron Sherman [EMAIL PROTECTED

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 optimizer collapse the entire

A question about attribute functions

2004-09-01 Thread Aaron Sherman
How do you declare attribute functions? Specifically, I was thinking about map and what kind of object it would return, and I stumbled on a confusing point: class mapper does iterator { has .transform; ... } Ok, that's fine, but what kind of

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 way

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

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' My thought

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 } } Which S4 tells us

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 Ceither 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. Cimplies). We could actually define ?? as a binary

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

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

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: 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 be readable in markup form

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

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 some extra noise in there. I think it got confused and thought

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

<    1   2   3   4   5   6   >