Re: Q: Junctions & send+more=money

2005-02-26 Thread Rod Adams
tent values as those inconsistencies are found. Most of them (all except all()) do not have to use the same value each time they are evaluated. If I'm wrong about this interpretation of this code, I apologize. But it certainly fits my understanding of junctions, which has grown by leaps and bounds over the last few weeks. HTH, -- Rod Adams

Re: Valid hash keys?

2005-02-27 Thread Rod Adams
Luke Palmer wrote: The object model that I'm working on actually identifies 2 and "2" as the same object, indistinguishable in every respect. Okay, that's fine, since C< 2 eq "2" > and C< 2 == "2" >. But what about 2.0 and "2.0"

Rule Parameters

2005-03-01 Thread Rod Adams
#x27;m open to alternative syntaxs, this one was just there to illustrate my point. -- Rod Adams.

Re: Rule Parameters

2005-03-02 Thread Rod Adams
Larry Wall wrote: On Tue, Mar 01, 2005 at 11:06:17PM -0600, Rod Adams wrote: : Since the line between rules and subs is already blurring significantly, : I want to blur it a little more. I want to write rules which can take : parameters. No problem. That's how the arguments to rules like

Re: Rule Parameters

2005-03-02 Thread Rod Adams
Patrick R. Michaud wrote: On Tue, Mar 01, 2005 at 09:32:28PM -0800, Larry Wall wrote: On Tue, Mar 01, 2005 at 11:06:17PM -0600, Rod Adams wrote: : Since the line between rules and subs is already blurring significantly, : I want to blur it a little more. I want to write rules which can take

Re: Argument Patterns

2005-03-08 Thread Rod Adams
We can now define 'equal': sub equal ($x, $x) { 1 } sub equal ($x, $y) { "" } That's one of the MTOWs at least. The evaluation order of the patterns still needs to be thought out. I thought Larry already declared that we are not making Perl act like ML (yet). -- Rod Adams

Re: Argument Patterns

2005-03-08 Thread Rod Adams
Autrijus Tang wrote: On Tue, Mar 08, 2005 at 04:55:28PM -0600, Rod Adams wrote: I thought Larry already declared that we are not making Perl act like ML (yet). And that was re: type inferencing, not re: pattern matching. :) Thanks, /Autrijus/ Sorry about that. Comcast has decided I

MMD as an object.

2005-03-08 Thread Rod Adams
ort name if it doesn't already exist, and then perform an .add to that multi. There are likely several rough edges in here, and I've by no means convinced myself that this is the Right Thing, but I thought I'd throw the idea out there to what others thought of it. -- Rod Adams.

Logic Programming with Rules

2005-03-09 Thread Rod Adams
gt; and C< is Unbound > more than those crufty C< where defined() >, but I don't think that would mesh well with the rest of Perl6. It's a lot more work to build than the equiv Prolog statement, but I can't justify the level of effort it would take to define and implement the auto-generation capabilities. -- Rod Adams

Re: Logic Programming with Rules (and Argument Patterns)

2005-03-09 Thread Rod Adams
Luke Palmer wrote: Rod Adams writes: Or you could avoid the global modifier and write your tests in <( )> blocks instead... after all, that's what it's there for. I *knew* I had seen a syntax for that before... I just didn't see it when I scanned S05 for it. I still

Re: MMD as an object.

2005-03-09 Thread Rod Adams
Thomas Sandlaß wrote: Rod Adams wrote: It seems to me that there are several advantages to making a group of multi with the same short name a single object, of type MultiSub|MultiMethod, which internally holds references to the all the various routines that share that short name. It doesn&#

Re: MMD as an object.

2005-03-09 Thread Rod Adams
Larry Wall wrote: On Wed, Mar 09, 2005 at 06:19:25AM -0600, Rod Adams wrote: : I was thinking more along the lines of : : :use MMD::Pattern; : :our &func is MMD::Pattern; : :multi func (...) {...} :multi func (... ...) {...} :multi func (... ... ...) {...} : :m

Re: Logic Programming with Rules (and Argument Patterns)

2005-03-09 Thread Rod Adams
ral people seem to be trying to get into Perl in some fashion or another. I can easily wait until 6.2 for this to happen (for now at least). -- Rod Adams

Re: Logic Programming with Rules

2005-03-09 Thread Rod Adams
Ovid wrote: --- Rod Adams <[EMAIL PROTECTED]> wrote: I was just relaying the observation that the P6RE was fairly close to being able to implement Logical Programming, which several people seem to be trying to get into Perl in some fashion or another. When I get a chance to talk to s

Re: Junctions - feedback and desires

2005-03-10 Thread Rod Adams
nt, in this case the say. What you said might be construed as the junctions were still being threaded when the the say and printf occurred. HTH, -- Rod Adams

Re: MMD as an object.

2005-03-10 Thread Rod Adams
David Storrs wrote: On Wed, Mar 09, 2005 at 03:38:52PM -0600, Rod Adams wrote: There lingers the case of: use Foo; # from above, exports &bar is MMD::Random multi sub bar {...} Does this generate an error, since one could expect this particular &bar to be Manhattan? Or does i

sub and method name overlap.

2005-03-10 Thread Rod Adams
reated to make C< Bar $f; > C< $f.Bar >? Or does it only work if there is no C< multi? sub bar > in sight? -- Rod Adams

Re: MMD as an object.

2005-03-10 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: It seems to me that there are several advantages to making a group of multi with the same short name a single object, of type MultiSub|MultiMethod, which internally holds references to the all the various routines that share that

Re: Junctions - feedback and desires

2005-03-10 Thread Rod Adams
Sam Vilain wrote: Rod Adams wrote: I do not believe that is possible. This is the "filtering" or "unification" behavior that people keep wanting junctions to have, which they do not. Aww! But what about all the great problems that could be expressed with them? I know o

Re: Junctions - feedback and desires

2005-03-10 Thread Rod Adams
Dave Whipp wrote: Rod Adams wrote: I do not believe that you can create a 'lazy junction'. But I don't recall the topic coming up before, so we'll have to wait for Damian to come back unless someone else knows for certain. My understanding is that all lists are conceptuall

Re: MMD as an object.

2005-03-10 Thread Rod Adams
David Storrs wrote: On Thu, Mar 10, 2005 at 02:22:20PM -0600, Rod Adams wrote: David Storrs wrote: On Wed, Mar 09, 2005 at 03:38:52PM -0600, Rod Adams wrote: use Foo; # from above, exports &bar is MMD::Random multi sub bar {...} Does this generate an error, since one could ex

Re: Junctions - feedback and desires

2005-03-11 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: Well if 10 < $j < 1 { ... } if 10 < $j { if $j < 1 { ... }} Could easily wind up with the same opcodes. No. In the first case $j is evaluated just once. In the second case it's evaluated twice.

Re: MMD as an object.

2005-03-11 Thread Rod Adams
ti sub foo(A $a, B $b) {...} This can be seen as questioning how to keep track of what multi's are in scope at any given point in time, because you must dispatch amongst all the multi's visible, regardless of the differing scope. Sure. But the dispatch scheme is described in A

Re: MMD as an object.

2005-03-11 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: If I were to need a different policy for a given method .bar, I would likely create something called .bar much like your "run_random_bar", which then dispatches amongst methods I name something like ._bar . I see

Re: SEND + MORE = MONEY (works now in pugs with junctions!)

2005-03-11 Thread Rod Adams
y, right? If you want Set Theory.. use Sets. Or use some form of Logical Programming which builds the sets implicitly for you, and does all the filtering and backtracking you're asking for. Both topics have been explored recently. The results of that exploration can be summarized as: - Sets would make a nifty module to have around. - Integrating Logical Programming into Perl needs a lot more thought and effort than will likely happen before 6.0.0. Modules grafting LP into Perl and/or Parrot are welcome. -- Rod Adams

Re: lists in string context

2005-03-12 Thread Rod Adams
ods and classes, I don't see a penalty for supporting both forms. Consider: $str.split($rule); $rule.split($str); I can see using both of those. But I can't see $int.split($rule, $str); as an alias for $str.split($rule, $int_limit); because I doubt that the limit will ever be the most important thing about a split operation. -- Rod Adams

Re: A possible solution for s?pintf

2005-03-12 Thread Rod Adams
like to keep something works on a whole list at once for those cases where I'm doing several non-trivial expressions at once. -- Rod Adams

Re: A possible solution for s?pintf

2005-03-12 Thread Rod Adams
Juerd wrote: Rod Adams skribis 2005-03-12 17:41 (-0600): Why not just rename C< sprintf > to C< format > and ditch printf and sayf? Because format is almost as much typing as sprintf, and in many circumstances needs both parens and quotes: format("%03d %15s&qu

Re: A possible solution for s?pintf

2005-03-12 Thread Rod Adams
quot;as-ly" things: print as MyBigInt, $foo, $bar; ooh. Nice. I like that. -- Rod Adams

for @list ⊂

2005-03-12 Thread Rod Adams
Are the following all legal and equivalent? for 1..10 -> $a, $b { say $a, $b }; for 1..10 { say $^a, $^b }; sub foo ($a, $b) { say $a, $b }; for 1..10 &foo; What happens with: for 1..10 -> [EMAIL PROTECTED] { say @a }; -- Rod Adams

Re: for @list ⊂

2005-03-12 Thread Rod Adams
Luke Palmer wrote: Rod Adams writes: Are the following all legal and equivalent? for 1..10 -> $a, $b { say $a, $b }; for 1..10 { say $^a, $^b }; sub foo ($a, $b) { say $a, $b }; for 1..10 &foo; Almost. The last one should be: for 1..10, &foo; Doh! I knew th

Re: A possible solution for s?pintf

2005-03-12 Thread Rod Adams
ure about above is that I think you'd have to say C< [...]».key».as($pattern) > to get it working correctly. (4) use square brackets in this instance (to make sure my list doesn't form a parameter list to C)? Yes, but whitespace between the "say" and "(" should do the trick as well. Might generate a warning, however. -- Rod Adams

The S29 Functions Project

2005-03-12 Thread Rod Adams
s Num Cosine (radians). $_ if omited. =item multi sub exp (?Num) returns Num =item multi method Num::exp() returns Num Exponent or inverse natural log. $_ if omited. -- Rod Adams

Re: The S29 Functions Project

2005-03-13 Thread Rod Adams
Larry Wall wrote: On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: : Plan of attack: : : I'm using a recent copy of Perl 5's perlfunc as a very rough template. : At some point, I'll drudge through the A's and S's to look for functions : new to Perl 6. I'

S29, pt1 is up

2005-03-13 Thread Rod Adams
a review of "Obsolete" to make sure they actually are gone. -- Rod Adams

Re: The S29 Functions Project

2005-03-13 Thread Rod Adams
And then internally dispatch on what is defined and undefined. Personally I like multi sub cos (Num ?$x = $CALLER::_, Num|Str +$base) returns Num better. You can do: our &cos<> := &cos<>.assuming:base('degrees'); to make cosine "degrees only" for your current package. -- Rod Adams

Re: The S29 Functions Project

2005-03-13 Thread Rod Adams
Ashley Winters wrote: On Sun, 13 Mar 2005 23:42:41 -0600, Rod Adams <[EMAIL PROTECTED]> wrote: Ashley Winters wrote: For documentary purposes, can we make that $radians? multi sub cos (Num +$degrees) returns Num { return cos :radians($degrees * PI / 180); } my Num $x = cos :degre

Auto generated methods (was Re:The S29 Functions Project)

2005-03-13 Thread Rod Adams
Larry Wall wrote: On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: : =item multi sub cos (?Num) returns Num : : =item multi method Num::cos () returns Num It would be nice if we could just say the first implies the second. I guess what that effectively means is that even if you take

Re: The S29 Functions Project

2005-03-14 Thread Rod Adams
ule of: You can't declare a function into ::*. You have to create it elsewhere, and bind it in. Therefore, as I go through S29, I'll assign all functions to some module. I'll be using the P5/CPAN hierarchy as a strong guideline. We can then discuss what gets bound into ::*, an

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-14 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: While that's a nice feature to have in general, I feel better about going ahead and predefining that the builtins are already members of Num, Str, Array, Hash for the shear performance and documentation values of it.

Exists and Delete

2005-03-14 Thread Rod Adams
How am I supposed to define a signature that says "A scalar that refers to a hash or array element, but do not evaluate or autovivify the element"? Or are these two are now strictly methods without functional forms? -- Rod Adams

Referencing a caller's slurpy array.

2005-03-14 Thread Rod Adams
signature? It's not specifically mentioned in A/S04, but it makes sense it would be allowed along with ?%. -- Rod Adams

pop, push, reverse, sort, and splice on a multidimensional array

2005-03-15 Thread Rod Adams
the same thing, as do @a[3;4] @a[3][4] And then operate the Perl 5 way, where C would return an array ref. #2 seems like the way to go, but I'm open to other suggestions. I'm especially interested in hearing people's view on how C should work with multi-dim arrays. -- Rod Adams

perl6-all@perl.org

2005-03-15 Thread Rod Adams
I'm trying to define zip(), but can't come up with a signature for a function that returns a lazy list of lvalues, but the list itself is not lazy? As a second matter, can you declare a type for the elements of a slurpy array? So far I have: multi sub zip (Array [EMAIL PROTECTED]) returns List

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-15 Thread Rod Adams
ing that I can define just the base multi sub, without all the associated multi methods -- Rod Adams

Re: s/true/better name/

2005-03-15 Thread Rod Adams
hout actually making it one, but maybe we should make a separate precedence level for it to keep list op precedence "pure". I don't see the point of making them list ops. Leaving them at that precedence level makes sense, but leave them unary. For a list version, you can write C or C to do the same thing. -- Rod Adams

Re: Exists and Delete

2005-03-15 Thread Rod Adams
Thomas Sandlaß wrote: Rod Adams wrote: How am I supposed to define a signature that says "A scalar that refers to a hash or array element, but do not evaluate or autovivify the element"? I'll make a guess: Ref of Int of Array. This assumes Int has a polymorphic subtype that allow

Re: The S29 Functions Project

2005-03-15 Thread Rod Adams
a named package. Not all functions are guaranteed to be imported into the global package C<::*>. In addition, the list of functions imported into C<::*> will be subject to change with each release of Perl. Authors wishing to "Future Proof" their code should either specifically import the functions they will be using, or always refer to the functions by their full name. -- Rod Adams

Re: reset() and S29 -- obsoleted?

2005-03-15 Thread Rod Adams
ness and deprcate it completely? I hadn't thought about it yet. I almost definitely would have come to that conclusion. Yes, please. Done. -- Rod Adams

Re: The S29 Functions Project

2005-03-15 Thread Rod Adams
Larry Wall wrote: On Tue, Mar 15, 2005 at 02:25:01PM -0600, Rod Adams wrote: : In Perl 6, all builtin functions belong to a named package. Not all : functions are guaranteed to be imported into the global package : C<::*>. In addition, the list of functions imported into C<::*> will

quotemeta

2005-03-16 Thread Rod Adams
I vote for axing C in favor of C and C. -- Rod Adams

New S29 draft up

2005-03-16 Thread Rod Adams
. :'s have been added into signatures where they belong. various other clean ups. Comments welcome. -- Rod Adams

Re: s/true/better name/

2005-03-16 Thread Rod Adams
) > take care of those cases? Sure, it's line noise, but do we really need a new keyword for something that's "relatively rare"? Especially when that keyword is likely to confuse people a lot more than the application of two unary operators? -- Rod Adams

Re: Referencing a caller's slurpy array.

2005-03-16 Thread Rod Adams
ke $expression .( splice(@values, 0, $expression.arity) ); } } } -- Rod Adams

perl6-all@perl.org

2005-03-16 Thread Rod Adams
ar2 -> $_ is rw { s/.../.../; s/.../.../; } though given $var1 { s/.../.../; s/.../.../; } is nice. ) But if you don't see the need for lvalueing the elements coming out of C, that certainly makes things easier. :-) -- Rod Adams

perl6-all@perl.org

2005-03-16 Thread Rod Adams
yms in all other ways but "autoflatten". As far as linguistics go, "for" makes a suitable replacement for "given" in my head. It's just a very heavily loaded term when you leave English and enter CS-speak. -- Rod Adams

Re: New S29 draft up

2005-03-16 Thread Rod Adams
bit more flexible. Thanks to Joe for pointing out the missing functions. They've been added locally and will be posted shortly. (Any others?) -- Rod Adams

Re: Referencing a caller's slurpy array.

2005-03-16 Thread Rod Adams
Luke Palmer wrote: Rod Adams writes: In S29, I currently have C as: multi sub grep (Any|Junction $test : [EMAIL PROTECTED]) returns List { gather { for @values -> $x { take $x if $x ~~ $test; } } } That's the listop form. I was referring to the method form: multi

Re: s/true/better name/

2005-03-16 Thread Rod Adams
Larry Wall wrote: On Wed, Mar 16, 2005 at 01:22:06PM -0600, Rod Adams wrote: : Larry Wall wrote: : : >On Tue, Mar 15, 2005 at 12:28:15PM -0700, Marcus Adair wrote: : >: Isn't saying "false doesn't exist" like saying, "dark doesn't exist"? : >: Why

Re: New S29 draft up

2005-03-17 Thread Rod Adams
C, and leave it up to you to determine what the operator form of it should be, if any. for zip :shortest 1...; @foos; @bars {...} -- Rod Adams

Re: New S29 draft up

2005-03-17 Thread Rod Adams
Aaron Sherman wrote: On Wed, 2005-03-16 at 03:18, 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 From there: =head2 Obsolete =item chop Chop removes the last character from a string. Is that

Re: New S29 draft up

2005-03-17 Thread Rod Adams
Aaron Sherman wrote: On Thu, 2005-03-17 at 18:06 -0600, Rod Adams wrote: This is a SEPARATE need from the need for a repeatable, standard PRNG, and should always operate off of the best source of entropy available to the program. Right now, that's /dev/urandom (for non-blocking hybri

Re: New S29 draft up

2005-03-17 Thread Rod Adams
Aaron Sherman wrote: 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

Re: New S29 draft up

2005-03-17 Thread Rod Adams
Aaron Sherman wrote: 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 th

eval (was Re: New S29 draft up)

2005-03-18 Thread Rod Adams
other languages That's evil. I like it :-) btw, has some syntax been created for "punt this over to Parrot, in language X"? eval q:to:0 /EOB/ :lang('PIR'); ... EOB eval $=DATA :lang('python'); eval loadfile 'foo.pl' :lang('ponie')

Bitops (was Re: New S29 draft up)

2005-03-18 Thread Rod Adams
Larry Wall wrote: On Thu, Mar 17, 2005 at 10:31:07PM -0600, Rod Adams wrote: : Aaron Sherman wrote: : >>Methods on numeric values (should be defined as pseudo-methods on : >>unboxed numbers): : >> : >> chr : >> hex : >>oct : >> : >>

Re: New S29 draft up

2005-03-18 Thread Rod Adams
view" type casting Larry was rumbling about. Simply re-view your string as an "Array of Chars", (bytes/codepoints/graphemes) and then pop or shift. Let's see where that thread ends up first. -- Rod Adams

String Theory

2005-03-19 Thread Rod Adams
it did in Perl 5. Some side points: It is an error to do things like C with strings of different levels, but not different encodings. level and encoding should default to whatever the source code was written in, if known. C and C should be able to be replaced with C views of compact structs (see S09). C kills C. Or at least buries it very deeply, without oxygen. Comments? -- Rod Adams

Re: String Theory

2005-03-19 Thread Rod Adams
urns an lvalue or not, which my C<.as> does. There's likely room for unification of the two ideas. -- Rod Adams

Re: String Theory

2005-03-19 Thread Rod Adams
h positions within those strings, and what a given integer position means can vary greatly with level. But even there I suppose that we could force the target's level onto the term, and make all positions relative to the target, and it's level. As for the exact syntax of the coercion, I'm open to suggestions. -- Rod Adams

Re: [Pugs] Bitten by Pugs chomp

2005-03-20 Thread Rod Adams
finish discussing on p6l how strings in general are handled. But the string funcs are next on my todo list. :-) -- Rod Adams

Re: Best way to slurp a file in Perl 6

2005-03-20 Thread Rod Adams
Larry Wall wrote: On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote: : 2) Documentation. :Where is the slurp built-in documented? I couldn't find it :in any of the Synopses (including Rod Adams' recent S29). :In desperation, I googled and found CPAN Perl6::

Re: Referencing a caller's slurpy array.

2005-03-20 Thread Rod Adams
Larry Wall wrote: On Wed, Mar 16, 2005 at 11:49:12PM -0600, Rod Adams wrote: : I haven't gotten a solid answer on when and how Perl will autogenerate : methods from subs. In general I don't think of it as autogeneration at all, but as failover to a different dispatcher. I can't

Re: New S29 draft up

2005-03-20 Thread Rod Adams
e `if $x == 1 | 2`, this is one of those things that a newbie to programming would ask "why can't I do that?" For the record, this is the currently what I plan on doing in S29 unless I hear a strong objection or something better. -- Rod Adams

nothing

2005-03-20 Thread Rod Adams
$this { when Even { nothing }; when Prime { ... }; default{ ... }; } As a side question, I assume that there's a predicate form of "when", but it's not mentioned. given $this { nothing when Even; when Prime { ... }; default{ ... }; } -- Rod Adams

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

2005-03-20 Thread Rod Adams
hogonality strikes again. I've renamed C to C in S29. (new post soon) -- Rod Adams

chr and ord

2005-03-20 Thread Rod Adams
I'm thinking C and C should be strictly Code Point level activities, but I'm not sure. They likely need to be renamed, in any event, to better reflect the fact that everything is Unicode these days. -- Rod Adams

study

2005-03-20 Thread Rod Adams
C is an odd sort of function. AFAIK, it's the only optimization hint that we have. Will the P6RE even use this information, and is it worth keeping? My gut feeling tells me that it will be useful again around 6.2, and we should keep it around until then as a potential no-op. Comments? -

Re: Slices

2005-03-20 Thread Rod Adams
s not something you can do with slices, unless you start stiching the prefix, replacement, and suffix slices on your own, which requires a lot of copying that could be skipped. -- Rod Adams

Re: study

2005-03-20 Thread Rod Adams
Luke Palmer wrote: Rod Adams writes: C is an odd sort of function. AFAIK, it's the only optimization hint that we have. Will the P6RE even use this information, and is it worth keeping? My gut feeling tells me that it will be useful again around 6.2, and we should keep it around until

Re: Best way to slurp a file in Perl 6

2005-03-21 Thread Rod Adams
Larry Wall wrote: On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote: : 2) Documentation. :Where is the slurp built-in documented? I couldn't find it :in any of the Synopses (including Rod Adams' recent S29). :In desperation, I googled and found CPAN Perl6::

Re: nothing

2005-03-21 Thread Rod Adams
Larry Wall wrote: On Sun, Mar 20, 2005 at 09:08:08PM -0600, Rod Adams wrote: : I propose creating a no-op function "nothing" that can be used : here or anywhere else you specifically wish to do nothing at all. : : given $this { :when Even { nothing }; :when Prime { ... }; :

Re: nothing

2005-03-21 Thread Rod Adams
o. But you can't solve nothing while something(); with a comment. Well, not gracefully. Not without inline comments, at least. There seems to be some support for just saying: {} while something(); I would also hope the compiler could optimize away something like: sub nothing () {}; -- Rod Adams

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

2005-03-26 Thread Rod Adams
of those creates an Array of Arrays, and the other just an Array. In other words, using @ instead of $ puts a "Array of" in front of the supplied type. This makes sense when one considers orthogonality with C and C. But it's easy to get tripped up it. -- Rod Adams (Who needs m

Re: String Theory

2005-03-26 Thread Rod Adams
allowing the user to add more as they see fit (EBCDIC, etc). Level and Encoding can be mixed and matched independently, except for the combos that don't make any sense. -- Rod Adams

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

2005-03-26 Thread Rod Adams
t I might just be dense on this. -- Rod Adams

Re: Units on numbers [was Re: S28ish]

2005-03-28 Thread Rod Adams
ust a "toy" for solving a few minor problems like specifying characters. - It's fairly comprehensive in that it should be easy to write functions which mutate the units intelligently, and know when to flag a type mismatch. - It all goes away by default for the user who doesn't want to bother with it. -- Rod Adams

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

2005-03-28 Thread Rod Adams
Larry Wall wrote: On Sat, Mar 26, 2005 at 02:37:24PM -0600, Rod Adams wrote: : Please convince me your view works in practice. I'm not seeing it work : well when I attempt to define the relevent parts of S29. But I might : just be dense on this. Well, let's work through an example

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

2005-04-03 Thread Rod Adams
lay problem. I seriously doubt the someone working with a rtl language would ever wish to count the characters ltr. And note that we are calling the positions "start" and "end", not "left" and "right". If I'm missing something basic here, let me know. -- Rod Adams

Re: [S29] pick on other things than junctions

2005-04-04 Thread Rod Adams
pair is more useful.) Most likely a pair. Now if I could only find some more time to work on S29. I've been making progress (slowly) on getting the string functions written up, but life seems to be conspiring against rapid progress. -- Rod Adams

Re: [S29] update

2005-04-10 Thread Rod Adams
list of lists is still just a list. An array of arrays is a different story. So this behavior is what I meant to say in S29. If it's unclear, I'm open to suggestions. -- Rod Adams (who still needs more time to work on S29. Looks like I'll have some in a few weeks. In the meant

Re: Question about list context for String.chars

2005-04-11 Thread Rod Adams
e individual chars. Consider: $a = $b = "All good boys go to heaven."; substr($a,9,3) = "girl"; $b[9..11] = "girl"[]; say "A: $a"; say "B: $b"; A: All good girls go to heaven. B: All good girs go to heaven. -- Rod Adams

Re: Question about list context for String.chars

2005-04-11 Thread Rod Adams
I see them as solving all kinds of corner cases. Unfortunately, I don't have a solid proposal handy, which has kept me from posting it. But since there is some interest in this, I'll throw the concept out there, and see if anyone else has a good idea what they should look like, and exactly how they should work. -- Rod Adams

Re: subscripts are.... objects?

2005-04-12 Thread Rod Adams
;, and that was on Feb 22, one can be left to assume that Damian is suffering from a very long week. Poor Damian. Sadly, my recent weeks have felt as if they were 2 months long. Here's to a return of the 7 day week! -- Rod Adams

Re: trim() and words() functions?

2005-04-12 Thread Rod Adams
's a possibility and no one seems to be disputing those, so I apologize if I just need to be pointed to where methods v functions is clarified. Many of them will happen in S29, since there's an odd duality that class based multi subs exist in. I don't pretend to fully understand

Re: should we change [^a-z] to <-[a..z]> instead of <-[a-z]>?

2005-04-15 Thread Rod Adams
David Wheeler wrote: But the first person to write <[a...]> gets what's comin' to 'em. Is that nothing (since '.' lt 'a'), or everything after 'a'? -- Rod Adams

Re: Truely temporary variables

2005-04-15 Thread Rod Adams
or the block, but that starts getting to look a lot like {my $sql = '...'} CATCH {default}; Except that one is run-time, the other compile-time. So one could interpret this thread as a cry for a compile-time exception handler. I see some interesting uses for this in conjunction with C, but I doubt I'm seeing the whole story. -- Rod Adams

Re: Hyper-slices?

2005-04-18 Thread Rod Adams
n core. Didn't S09 take care of that w/ the [ ; ; ] syntax? -- Rod Adams

Re: junctions as indicies

2005-04-18 Thread Rod Adams
$j];# \(b..d) $ju = juncture @ar[$j]; # 'b'|'c'|'d' @v = %hash{$k}; # (1,7) %v = %hash{$k}.kv; # (a=>1,c=>7) $v = %hash{$k}; # \(1,7) $jv = juncture %hash{$k}; # 1|7 Am I way off base here? What would you propose @v[all(any(4,5),one(1,2,3),none(7,8,9))] return? -- Rod Adams

Re: -X's auto-(un)quoting?

2005-04-23 Thread Rod Adams
rforming magical disappearing acts all over the place, and the ^ ties in with the $^x of parameters. As for shortcuts to $OUTER::_, perhaps $-, if it's not put to some better usage, but anything beyond that is getting too obscure for common usage. -- Rod Adams

<    1   2   3   >