Re: where will we die to?

2006-03-23 Thread Larry Wall
On Thu, Mar 23, 2006 at 02:27:07PM +0200, Yuval Kogman wrote: : on the #catalyst channel today we had lots of pains debugging where : a die will go to eventually, within a cascade of eval { }s and what : not. : : In Perl 6 one thing that could ease this is to be able to easily : know where we will

Re: why no negative (auto reversed) ranges?

2006-03-23 Thread Larry Wall
On Mon, Mar 20, 2006 at 01:26:03PM +0100, TSa wrote: : HaloO, : : S03 does explicitly disallow auto-reversed ranges. : And I'm not sure if the upto operator has a downto : cousin where ^-4 == (-1, -2, -3, -4) returns a list : that is suitable for indexing an array from the back. : Why is that so?

Re: UNIX commands: chmod

2006-03-26 Thread Larry Wall
On Sat, Mar 25, 2006 at 01:22:18PM +0200, Gabor Szabo wrote: : On 3/25/06, Nicholas Clark <[EMAIL PROTECTED]> wrote: : > On Sat, Mar 25, 2006 at 12:58:30PM +0200, Gabor Szabo wrote: : > > 4) "filename".chmod(MODE) should also work and I guess : > > .chmod(MODE) should also work on those 3 file

Re: UNIX commands: chmod

2006-03-26 Thread Larry Wall
On Sun, Mar 26, 2006 at 02:40:03PM -0800, Larry Wall wrote: : On the original question, I see it more as a junctional issue. : Assuming we have only chmod($,$), this sould autothread: : : unless chmod MODE, all(@files) -> $oops { : ???; : profit(); : } Except that junctio

Re: 'temp $x;' with no assignment

2006-03-27 Thread Larry Wall
On Mon, Mar 27, 2006 at 02:54:05PM -0600, Jonathan Scott Duff wrote: : On Mon, Mar 27, 2006 at 10:46:02PM +0200, Yuval Kogman wrote: : > On Mon, Mar 27, 2006 at 14:35:52 -0600, Jonathan Scott Duff wrote: : > > I think that if C is the new C, then immediately after the : > > C line, $x should hold w

replacement of $

2006-04-01 Thread Larry Wall
Recently I had time to think about the $ symbol we use in Perl. I think Perl has been using the USD symbol for too long, and I'm now sure that it's time to replace it. After some research I came to the conclusion that the best fit is the euro symbol (€). So, spread the word, Perl 6 will requir

Re: replacement of $

2006-04-01 Thread Larry Wall
On Sat, Apr 01, 2006 at 03:11:27PM -0800, Larry Wall wrote: : : : Recently I had time to think about the $ symbol we use in Perl. : : I think Perl has been using the USD symbol for too long, and I'm now sure : that it's time to replace it. After some research I came to the conclusi

Re: replacement of $

2006-04-01 Thread Larry Wall
On Sat, Apr 01, 2006 at 03:42:11PM -0800, Darren Duncan wrote: : Perhaps what we need is a more universal currency. I suggest gold. : : So every relevant symbol name could start with : 'Au' instead of '$', and an advantage of this is : that it is still easy to type on any keyboard. For those o

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

2006-04-01 Thread Larry Wall
On Sun, Apr 02, 2006 at 02:15:46AM +0200, Ruud H.G. van Tol wrote: : Uri Guttman wrote: : : > When cast into an array, you can access all the positional : > arguments; Into a hash, all named arguments; Into a scalar, the : > invocant; Into code, into slurpy nameless block. : : The las

Re: curly-quotes

2006-04-03 Thread Larry Wall
On Sun, Apr 02, 2006 at 02:32:03AM -0800, Jonathan Lang wrote: : Given perl6's use of unicode as a basis, could we get "curly quotes", : both single and double, to do the same things that straight quotes do? Depends on what "same thing" means, I suppose. Looks like you want them directional, whic

Re: Context and coercion

2006-04-03 Thread Larry Wall
On Mon, Apr 03, 2006 at 07:23:28PM -0700, Joshua Choi wrote: : Kudos to all on the Perl 6 mailing list, : : What's the conceptual difference (or relationship) between context and type : coercion? Is : $moose.prefix:<~> : the same as : $moose.coerce:(Str) : for instance? No difference. :

Re: Context and coercion

2006-04-03 Thread Larry Wall
On Mon, Apr 03, 2006 at 08:24:51PM -0700, Larry Wall wrote: : There's some discussion about whether it should simply be: : : method as (Str) {...} : method as (Int) {...} : : maybe with an "is deep" thrown in for good measure, but we haven't : quite got there yet.

Re: Do junctions support determining interesections of lists

2006-04-04 Thread Larry Wall
On Tue, Apr 04, 2006 at 09:16:23AM -0400, Joshua Gatcomb wrote: : Almost a year ago (2005-04-27), I wrote the list asking a question about : junctions. : Specifically, the ability to find the intersection, union, etc of a list. Junctions are not intended for that use. We have Sets for that now. J

Re: Do junctions support determining interesections of lists

2006-04-04 Thread Larry Wall
On the other hand, if junctions really are sets of sets, then maybe it's a mistake to autocoerce junctions to sets by swiping their internal set of values. Arguably any(1,2,3) should coerce not to (1,2,3) but to ( (1), (2), (3), (1,2), (1,3),

Re: Set Theory (Was: Do junctions support determining interesections of lists)

2006-04-04 Thread Larry Wall
On Tue, Apr 04, 2006 at 11:02:55AM -0700, Jonathan Lang wrote: : Will perl6 Sets include set negation and/or a universal set? In : effect, an internal flag that says, "this set contains every possible : element _except_ the ones listed"? Arguably, that's what none() is. And all() is the only jun

Re: Set Theory (Was: Do junctions support determining interesections of lists)

2006-04-04 Thread Larry Wall
On Tue, Apr 04, 2006 at 11:23:14AM -0700, Jonathan Lang wrote: : Larry Wall wrote: : > On Tue, Apr 04, 2006 at 11:02:55AM -0700, Jonathan Lang wrote: : > : Will perl6 Sets include set negation and/or a universal set? In : > : effect, an internal flag that says, "this set contains

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

2006-04-06 Thread Larry Wall
On Thu, Apr 06, 2006 at 10:18:48PM +0800, Audrey Tang wrote: : TSa wrote: : > Note that a prominent, typical foo actually reads: : > : > self .bar; : > : > And a self($_.bar) is pretty much useless. In other words : > wrongly huffmanized. : : FWIW, I agree with both points. Some more points:

Re: $a.foo() moved?

2006-04-06 Thread Larry Wall
On Thu, Apr 06, 2006 at 01:58:55PM -0400, Matt Fowles wrote: : All~ : : I just noticed something claiming that C<$a. foo()> is actually : C<$a.foo()> (a method call on C<$a>) and that C<$a .foo()> is actually : C<$a $_.foo()> (likely a syntax error). : : When did this change? Why did this change

Re: $a.foo() moved?

2006-04-06 Thread Larry Wall
On Thu, Apr 06, 2006 at 02:35:53PM -0400, Matt Fowles wrote: : That makes a good deal of sense. I don't know what I would like more, : so I guess that I will wait till a more firm consensus is reached. The current consensus on #perl6 is that, in postfix position only (that is, with no leading whi

Re: 'temp $x;' with no assignment

2006-04-07 Thread Larry Wall
On Thu, Apr 06, 2006 at 05:36:56PM -0600, Luke Palmer wrote: : On 3/27/06, Larry Wall <[EMAIL PROTECTED]> wrote: : > The p5-to-p6 translator will turn : > : > local $x; : > : > into : > : > temp undefine $x; : : Are you sure that that's not: : : undef

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

2006-04-07 Thread Larry Wall
On Fri, Apr 07, 2006 at 01:04:38PM -0700, [EMAIL PROTECTED] wrote: : +The long dot form of the C<...> postfix is C<0. ...> rather than : +C<0. > because the long dot eats the first dot after the whitespace. : +It does not follow that you can write C<0> because that would : +take the first t

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

2006-04-07 Thread Larry Wall
On Fri, Apr 07, 2006 at 10:07:55PM +0100, Nicholas Clark wrote: : On Fri, Apr 07, 2006 at 01:11:15PM -0700, Larry Wall wrote: : > On Fri, Apr 07, 2006 at 01:04:38PM -0700, [EMAIL PROTECTED] wrote: : > : +The long dot form of the C<...> postfix is C<0. ...> rather than : > : +C

Another dotty idea

2006-04-07 Thread Larry Wall
Okay, after attempting and failing to take a nap, I think I know what's bugging me about "long dot". It seems just a little too specific. So here's another proposal. We've been saying forever that we don't need start/stop comments. But maybe, just maybe, if they also cure the delayed postfix pr

Re: Another dotty idea

2006-04-07 Thread Larry Wall
On Fri, Apr 07, 2006 at 06:31:44PM -0700, Jonathan Lang wrote: : Delimiter-terminated quotes. Really nice idea. : : I'd put the dot inside the comment: "#.x", with x being an optional : quote delimiter (excluding dots). If a delimiter is included, the : comment is terminated by the matching quot

Re: Another dotty idea

2006-04-07 Thread Larry Wall
On Fri, Apr 07, 2006 at 08:11:04PM -0700, Jonathan Lang wrote: : Larry Wall wrote: : > I really prefer the form where .#() looks like a no-op method call, : > and can provide the visual dot for a postfix extender. : : Although inline and multiline comments are very likely to be u

Re: The "whatever" context

2006-04-10 Thread Larry Wall
On Sun, Apr 09, 2006 at 02:43:16PM +0300, Yuval Kogman wrote: : Hi... : : I think that Perl 6 should have a "whatever" context, which is : essentially: : : I want either array or scalar or whatever... You choose : : so that functions like grep can return an array in "whatever" : context. T

Re: Another dotty idea

2006-04-10 Thread Larry Wall
On Tue, Apr 11, 2006 at 12:26:13PM +1200, Sam Vilain wrote: : This does mean that if you comment out blocks with s/^/#/, you mess up on: : : #sub foo : #{ : # if foo { } : #} Well, actually, that still works. To be certain though, you could always use s/^/##/ or s/^/# /. Even better is: =

Re: Another dotty idea

2006-04-10 Thread Larry Wall
On Tue, Apr 11, 2006 at 12:54:50PM +1200, Sam Vilain wrote: : Larry Wall wrote: : : >On Tue, Apr 11, 2006 at 12:26:13PM +1200, Sam Vilain wrote: : >: This does mean that if you comment out blocks with s/^/#/, you mess up on: : >: : >: #sub foo : >: #{ : >: # if foo { } :

Re: Another dotty idea

2006-04-10 Thread Larry Wall
On Mon, Apr 10, 2006 at 08:46:02PM -0400, John Siracusa wrote: : Do you care that it's harder to visually pick out the commented-out portions : of a file at a glance using that syntax? I really don't want to give up : s/^/#/ commenting. Double ##s seem like overkill to me. Then I have to use : t

Re: Another dotty idea

2006-04-10 Thread Larry Wall
On Tue, Apr 11, 2006 at 01:21:32PM +1200, Sam Vilain wrote: : Larry Wall wrote: : : >: But this fragment dies: : >: : >: #sub foo : >: #{ : >: # bar { } unless baz : >: #} : >I don't see how that's different at all from the first example. : > : > :

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

2006-04-10 Thread Larry Wall
On Mon, Apr 10, 2006 at 10:32:33PM -0400, Joe Gottman wrote: :How does the "sub" keyword fit in here? Is there any difference between : the lines : return {say "Hello World";}; : and : return sub {say "Hello World";}; : ? Effectively, no, for these examples. In the second case y

Re: int context ?

2006-04-11 Thread Larry Wall
On Tue, Apr 11, 2006 at 03:49:45AM +0200, herbert breunung wrote: : hello perlisticers : : (my first post) : i read in the perl6 book second edition something called : : /Integer context/ and /Numeric context/ : : Ican understand the difference but since nowhere in the synopses i read : a word

Re: foo..bar or long dot and the range operator

2006-04-11 Thread Larry Wall
On Tue, Apr 11, 2006 at 12:41:30PM +0200, TSa wrote: : I'm unsure what the outcome of the recent long dot discussions is : as far as the range operator is concerned. .. is always the range operator. The "dot wedge" just has a discontinuity in it there. I can't think of any wedgey applications th

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

2006-04-20 Thread Larry Wall
On Thu, Apr 20, 2006 at 09:24:09AM -0500, Patrick R. Michaud wrote: : First, let me say I really like the changes to S05. Good work : once again. : : Here are my questions and comments. : : On Thu, Apr 20, 2006 at 02:07:51AM -0700, [EMAIL PROTECTED] wrote: : > -(To get rule interpolation use an

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

2006-04-21 Thread Larry Wall
On Fri, Apr 21, 2006 at 12:45:13PM -0500, Jonathan Scott Duff wrote: : According to S05, "a /.../ matches immediately in a value context : (void, Boolean, string, or numeric)" and since : : (state $x) ||= / pattern /; : : is very much the same as : : state $x; $x = $x || /pattern/; :

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

2006-04-21 Thread Larry Wall
On Fri, Apr 21, 2006 at 03:15:12PM -0400, Uri Guttman wrote: : oy! the habits to be broken and relearned! Habits are no fun unless they're either good or bad. Larry

Re: =$fh vs *$fh

2006-04-22 Thread Larry Wall
On Sat, Apr 22, 2006 at 05:52:31PM +0800, Audrey Tang wrote: : During my S03 cleanup today, I noticed that because *$fh and **$fh : interpolates into the current argument list, it's always the same as : =$fh under list context. So I wrote this paragraph: : : [Conjectural: File handles interpolate

Re: S05: Interpolated hashes?

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 09:49:36AM -0500, Jonathan Scott Duff wrote: : But what if your subrule needs to know exactly which key matched or : needs to match the key again for some reason? The second passage says : that you may access they actual text that matched with $ and you : may again match the

Re: S05: Interpolated hashes?

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 05:22:25PM +0100, [EMAIL PROTECTED] wrote: : Why don't we just have work as an assertation, instead of having this : strange "as if" thing? 'Cause the point of most parsing is to rapidly move on, not to rehash the ground you already covered. And if you really do need to r

Re: S05: Interpolated hashes?

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 08:00:55AM -0700, Larry Wall wrote: : If you want to reset to before the key for some reason, you can always : set .pos to $.beg, or whatever the name of the method is. Hmm, : that looks like it's unspecced. I'm wrong, it's already specced as .from and .

Re: Adverbs

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 06:58:04PM -0700, Jonathan Lang wrote: : How do you define new adverbs, and how does a subroutine go about : accessing them? Adverbs are just optional named parameters. Most of the magic is in the call syntax. Larry

Re: Adverbs

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 08:30:04PM -0700, Jonathan Lang wrote: : Larry Wall wrote: : > Jonathan Lang wrote: : > : How do you define new adverbs, and how does a subroutine go about : > : accessing them? : > : > Adverbs are just optional named parameters. Most of the magic is in : &g

Re: S5 - Question about repetition qualifier

2006-04-26 Thread Larry Wall
On Wed, Apr 26, 2006 at 11:36:50AM +0100, [EMAIL PROTECTED] wrote: : Possibly we should make the syntax be a smart match, but only require that : conformat implementations implement ranges and integers. That is essentially the intent of the current spec, and why we defined **{} to run a closure.

Re: Perl 6 built-in types

2006-04-27 Thread Larry Wall
On Thu, Apr 27, 2006 at 01:10:05PM -0700, Darren Duncan wrote: : A couple of questions and suggestions about Perl 6 built-in data : types, following a look at the newest S06 ( : http://svn.perl.org/perl6/doc/trunk/design/syn/S06.pod ) ... : : 1. There doesn't seem to be an immutable bit-string

Re: Perl 6 built-in types

2006-04-27 Thread Larry Wall
On Fri, Apr 28, 2006 at 04:41:41AM +, Luke Palmer wrote: : It seems like a hash whose values are the unit type. Does Perl have a : unit type? I suppose if it doesn't, we could define one: : :subtype Unit of Int where 1; : : (Assuming that "where" groks whatever "when" does). : : Then y

Re: A shorter long dot

2006-04-30 Thread Larry Wall
On Sat, Apr 29, 2006 at 05:15:08PM +0200, Juerd wrote: : Larry indicated that changing the long dot would have to involve : changing the first character. The only feasible solution in the "tiny : glyphs" section was the backtick. I refrain from explaining why that : will widely be considered a bad

Re: A shorter long dot

2006-04-30 Thread Larry Wall
On Sun, Apr 30, 2006 at 06:33:01PM +0100, Nicholas Clark wrote: : On Sun, Apr 30, 2006 at 09:58:21AM -0700, Larry Wall wrote: : : > Neither of those are currently legal in infix position. The backslash : : > Backslash also has the advantage of making sense to a C programmer: : > : &

Re: using the newer collection types - Interval

2006-05-06 Thread Larry Wall
On Sat, May 06, 2006 at 01:41:41PM -0700, Darren Duncan wrote: : Some people may confuse it with a Range, but I don't think so since a : Range progresses in discrete increments, while an Interval would be : continuous. No, Range objects in Perl 6 are defined to be intervals unless used in a cont

Re: using the newer collection types - Interval

2006-05-06 Thread Larry Wall
On Sat, May 06, 2006 at 06:15:34PM -0700, Darren Duncan wrote: : Er, you should read 'Real' as 'Num' (I originally meant Rational, : which no longer exists in the newest S06); Rational still exists in S02--we just don't automatically promote anything to it currently. (A pragma could change that

Re: "normalized" hash-keys

2006-05-08 Thread Larry Wall
On Mon, May 08, 2006 at 12:34:26PM +0200, Dr.Ruud wrote: : What would be the way to define-or-set that a specific hash has : non-case-sensitive keys? Use a shaped hash with a key type that defines infix:<===> appropriately, since object hashes are based on infix:<===> rather than infix:. : Or bro

Re: Scans

2006-05-08 Thread Larry Wall
On Mon, May 08, 2006 at 05:30:23PM +0300, Gaal Yahas wrote: : We have a very nifty reduce metaoperator. Scans are a counterpart of : reduce that are very useful -- they are the (preferably lazy) list of : consecutive accumulated reductions up to the final result. But I can't : think of a convenient

Re: S02: generalized quotes and adverbs

2006-05-09 Thread Larry Wall
On Tue, May 09, 2006 at 11:15:24PM -0700, jerry gay wrote: : according to S02, under 'Literals', generalized quotes may now take : adverbs. in that section is the following comment: : : : [Conjectural: Ordinarily the colon is required on adverbs, but the : "quote" declarator allows you to combine

Re: A rule by any other name...

2006-05-10 Thread Larry Wall
On Wed, May 10, 2006 at 11:25:26AM +1000, Damian Conway wrote: : True. "Token" is the wrong word for another reason: a token is a : segments component of the input stream, *not* a rule for matching : segmented components of the input stream. The correct term for that is : "terminal". So a suitable

Provisional Foo [Was: [svn:perl6-synopsis] r9176 - doc/trunk/design/syn]

2006-05-11 Thread Larry Wall
On Thu, May 11, 2006 at 07:44:54AM -0400, Elyse M. Grasso wrote: : Is "but false" now spelled "but False"? If not, if there a reason for the : asymmetry? Yes, the false value is False now, just as the true value is not True. The reason for changing them is to avoid confusion with the built-in tru

Re: S02: generalized quotes and adverbs

2006-05-11 Thread Larry Wall
On Wed, May 10, 2006 at 08:09:45AM +0100, Daniel Hulme wrote: : > qX ::= "q:x:y:z"; : > : > as a simple, argumentless "word" macro. : But would that DWIM when I come to write : : qX(stuff, specifically not an adverb argument); : : ? Just looking at it, I would expect qX() to call a function

Re: A rule by any other name...

2006-05-11 Thread Larry Wall
On Thu, May 11, 2006 at 01:55:37PM -0700, Allison Randal wrote: : Oh, and since we're calling them "regexes", I suggest calling them : "regular expressions" too, since both "regex(p)" and "regular : expression" have taken on the popular meaning of "pattern matching". If : we're going to be anti-

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

2006-05-11 Thread Larry Wall
On Fri, May 12, 2006 at 01:50:59AM +0200, Ruud H.G. van Tol wrote: : Allison Randal schreef: : > larry: : : >> Changed :words/:w to :sigspace/:s and invented ss/// and ms// (or : >> maybe mm//). : > : > I keep expecting 'sigspace' to have something to do signatures. : : /me3, since it alliterat

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

2006-05-13 Thread Larry Wall
On Sat, May 13, 2006 at 10:52:00AM +0300, Markus Laire wrote: : On 5/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : > Argumentless C<**> in a multi-dimensional subscript indicates 0 or : >-more dimensions of C<*> where the number of dimension isn't necessarily : >-known: C<@foo[1;**;5]>. It

Re: packages vs. classes

2006-05-19 Thread Larry Wall
On Thu, May 18, 2006 at 03:17:36PM -0700, Chip Salzenberg wrote: : What's the relationship in perl6 between namespaces and classes? Hmm, well, that's hard to put one's finger on, but to the first approximation namespaces are for declarational names, while classes can really only name things operat

Re: packages vs. classes

2006-05-19 Thread Larry Wall
'Course, I left out everything about prototype objects there... The name Foo also (in context) represents an uninitialized object of the class in question. Any object, initialized or not, can get at its type handlers by saying Foo.meta $foo.meta and, in fact, the Foo.^bar syntax is just

Re: packages vs. classes

2006-05-19 Thread Larry Wall
On Fri, May 19, 2006 at 03:25:43PM -0700, Chip Salzenberg wrote: : Based on what I'm seeing, the Perl 6 "type object" is the thing that claims : the primary name associated with a class. Foo:: is the type object. : The metaobject seems to be anonymous. And the package seems to be fairly : questio

Re: Concurrency: hypothetical variables and atomic blocks

2006-06-01 Thread Larry Wall
On Thu, Jun 01, 2006 at 11:52:59AM +1200, Sam Vilain wrote: : The lock on entry approach will only be for non-threaded interpreters : that don't know how to do real STM. The way I see it, the fundamental difference is that with ordinary locking, you're locking in real time, whereas with STM you po

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Larry Wall
On Sat, Jun 03, 2006 at 03:51:45PM -0700, Paul Hodges wrote: : --- Ashley Winters <[EMAIL PROTECTED]> wrote: : > On 6/2/06, Paul Hodges <[EMAIL PROTECTED]> wrote: : > > : > > my @answer = map { async { &_() } } @jobs; : > : > That still seems too explicit. I thought we had hyperoperators to : > i

Re: Perl5 -> Perl 6 Translations Design Document

2006-06-05 Thread Larry Wall
On Tue, Jun 06, 2006 at 02:06:05AM +0100, Jonathan Worthington wrote: : "Sage La Torra" <[EMAIL PROTECTED]> wrote: : >I've got a design document detailing the first few translations I'll be : >handling, and I'd greatly appreciate feedback and advice. : > : I may be off base here, or in the alternat

Re: ~~ with *

2006-06-16 Thread Larry Wall
On Tue, Jun 06, 2006 at 05:11:26PM +0100, Daniel Hulme wrote: : I only vaguely recall the discussions a while back about what : smart-matching against Booleans should do. IIRC, there are two : positions, and a good argument for either side: : : C<$foo ~~ True> means C; C<$foo ~~ False> means C : o

Re: ~~ with *

2006-06-20 Thread Larry Wall
On Mon, Jun 19, 2006 at 08:51:24AM -0600, Eric wrote: : Just my two cents, but whenever i see "when True {...}" I expect $_ : to be true, so that i can do when True and when False. And I if see : when followed by a comparison i expect the when to be true when the : comparison is true. To me its

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

2006-07-01 Thread Larry Wall
On Sat, Jul 01, 2006 at 03:31:52PM +0300, Markus Laire wrote: : On 7/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : >+In particular, these forms disable the lookahead for an adverbial : >argument, : >+so while : >+ : >+q:n($foo) : >+ : >+will misinterpret C<$foo> as the C<:n> argument, :

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

2006-07-03 Thread Larry Wall
On Mon, Jul 03, 2006 at 05:31:34PM +0300, Markus Laire wrote: : On 7/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : >+But parens are special that way. (Even C is assumed to be a : >+function call rather than a quote.) Other bracketing characters are : >+special only if they can be mistaken

Re: sprintf and snake envy

2006-07-04 Thread Larry Wall
On Tue, Jul 04, 2006 at 05:06:54PM +1000, Brad Bowman wrote: : Hello, : : It seems that sprintf is will still be around in Perl 6 [1], : and that sprintf formats will be available using the .as() method. : While looking at some Python docs [2] I noticed two things that might : be worth stealing; a

Re: sprintf and snake envy

2006-07-04 Thread Larry Wall
On Tue, Jul 04, 2006 at 05:27:33PM +0100, Nicholas Clark wrote: : I'm not convinced that sprintf needs an operator. It's not commonly used in : any code I've looked at, which to me suggests that it's not good huffman : coding to use up a terse symbol for it, denying that symbol to something : else.

Re: namespaces, a single colon to separate HLL prefix?

2006-07-06 Thread Larry Wall
On Thu, Jul 06, 2006 at 10:40:21AM -0400, Audrey Tang wrote: : The : form is approved and canonical (line 303, the Modules spec, aka : S11.pm version 14). : : use perl5:DBI; : : However, currently it's only available at use/require line. : Afterwards, the user simply say: : : my $db

Re: namespaces, a single colon to separate HLL prefix?

2006-07-06 Thread Larry Wall
On Thu, Jul 06, 2006 at 09:09:08AM -0700, Larry Wall wrote: : use **perl5::DBI; which, if you don't like the two-character form, you can spell: ⁑perl5::DBI :-) Hmm, hmm, speaking of sanity, how 'bout user-defined sigils and twigils: sigil ¢ = Capture; twigil ¬ =

Re: Methods vs. Subs

2006-07-08 Thread Larry Wall
On Sat, Jul 08, 2006 at 07:42:06AM -0700, Jonathan Lang wrote: : Is there anything that you can do with a sub (first parameter being : some sort of object) that you cannot do with a method? Frex, given: : : multi method my_method($invocant:); : : would : : &topical_call := &my_method.assuming

Re: S29 update ready

2006-07-08 Thread Larry Wall
On Sat, Jul 08, 2006 at 06:04:40PM -0400, Aaron Sherman wrote: : I've gathered my ducks in a row, used the feedback that I've gotten so : far, and I think I'm ready to officially update S29. For that I need two : things: : : 1) I'd really like Larry to glance over the changes and $s29.bless but

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

2006-07-12 Thread Larry Wall
On Wed, Jul 12, 2006 at 08:40:53AM -0400, Aaron Sherman wrote: : Smylers wrote: : >[EMAIL PROTECTED] commits: : > : > : >>New Revision: 10077 : >>Modified: doc/trunk/design/syn/S02.pod : >>== : >> : >>-foo.bar

Re: Another quick one: .as

2006-07-12 Thread Larry Wall
On Wed, Jul 12, 2006 at 12:51:57PM -0400, Aaron Sherman wrote: : I would assume that all classes automatically define: : : multi submethod *infix: ($self: $?CLASS) { $self } Hmm, "as" is really only intended for explicit type mutation (which can work either by role mixin or by new object constru

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-13 Thread Larry Wall
On Thu, Jul 13, 2006 at 09:32:08PM +0300, Yuval Kogman wrote: : [1] My preferred ergonomics: : : 1. eqv goes away : 2. what was eqv is renamed to === : 3. === becomes =:=, which has a "constant" feel to it : 4. =:= is rarely useful IMHO, so you can just type : variabl

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-13 Thread Larry Wall
On Thu, Jul 13, 2006 at 12:50:19PM -0700, Larry Wall wrote: : Then $a eqv $b and $a leg $b both just default to a signature that selects : everything. Though arguably P5's string-forcing semantics should be C and the polymorphic semantics should probably be C. Larry

Re: Run time dispatch on ~~

2006-07-14 Thread Larry Wall
On Fri, Jul 14, 2006 at 04:34:26PM +0200, Dr.Ruud wrote: : Aaron Sherman schreef: : : > given $_ { : >when $x {...} : > } : > : > or : > : > $_ ~~ $x : : Can that be written as ".~~ $x"? No, but you might just possibly get away with writing: .infix:<~~>($x) assuming that the $_.foo(

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-14 Thread Larry Wall
On Thu, Jul 13, 2006 at 10:56:59PM -0700, Darren Duncan wrote: : Now, I didn't see them yet anywhere in Synopsis 3, but I strongly : recommend having negated versions of all these various types of : equality tests. Eg, !== for ===, nev for eqv, etc. They would be : used very frequently, I beli

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-14 Thread Larry Wall
On Thu, Jul 13, 2006 at 10:19:24PM -0600, David Green wrote: : On 7/13/06, Yuval Kogman wrote: : >So, Larry assisted by Audrey explained the purpose of === vs eqv vs =:=. : >It makes sense now, but I still feel that as far as ergonomics go : >this is not perfect. : : I think I understand it... (m

Re: Hyperoperators and the Each role

2006-07-18 Thread Larry Wall
On Mon, Jul 17, 2006 at 06:06:52PM -0400, Christopher Jeris wrote: : I have a couple of questions about what S03 says about hyperoperators : applying recursively to any object which matches the 'Each' role: : : [from S03] : Seq(3,8,[2,Seq(9,3)],8) >>-<< (1,1,2,1); # Seq(2,7,[0,Seq(7,1)],7) : : 1.

Re: S04 - forbidden coding-style

2006-07-21 Thread Larry Wall
On Thu, Jul 20, 2006 at 05:03:32PM +0100, Smylers wrote: : Markus Laire writes: : : > S04 seems to say that a style like this can't be used by : > perl6-programmers: : > : > loop : > { : >... : > } : > while $x; : > : > I like this style, as it lines up both the keywords and the curlies. :

Re: S04 - forbidden coding-style

2006-07-21 Thread Larry Wall
On Fri, Jul 21, 2006 at 12:07:52PM -0500, Jonathan Scott Duff wrote: : Or just give them some sort of syntactic marker ... I know! : : loop { : ... : } : :while $loopy; : : eat :if $hungry; : go_postal :when $aggravation > 10; : .sleep :until .rested; : : *Everybo

Re: Legacy Dereferencing Syntax Used in S05

2006-08-01 Thread Larry Wall
On Tue, Aug 01, 2006 at 11:17:21PM +0800, Agent Zhang wrote: : Hi, all~~ : : S05 makes widely use of the syntax @{ $capture } and %{ $capture } : while other synopses remarkably don't. : : According to S02, {...} should normall be a closure or a hash : subscript and S02 uses the syntax @( $arrayr

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

2006-08-09 Thread Larry Wall
On Thu, Aug 10, 2006 at 01:17:45PM +0800, Agent Zhang wrote: : On 8/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : >@@ -1339,8 +1339,8 @@ : > : > =head2 Undefined types : > : >-These can behave as values or objects of any class, but always return : >-a C<.valid> that evaluates to false. One

Re: underscores in the core lib

2006-08-10 Thread Larry Wall
On Thu, Aug 10, 2006 at 07:02:13PM +0200, Juerd wrote: : Eric skribis 2006-08-10 10:22 (-0600): : > I think .valid is an excellent argument for underscores all by itself. : : I think it's an argument for reconsidering the name of that method. : "valueid" is only 2 characters more. Okay, I'll just

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

2006-08-10 Thread Larry Wall
On Thu, Aug 10, 2006 at 10:17:59PM -0500, Jonathan Scott Duff wrote: : On Thu, Aug 10, 2006 at 06:21:31PM -0700, Darren Duncan wrote: : > At 5:11 PM -0700 8/10/06, [EMAIL PROTECTED] wrote: : > >Log: : > >First whack at defining semantics of MAIN subs. : > : > Congradulations! That is SUCH a great

Re: underscores in the core lib

2006-08-11 Thread Larry Wall
On Fri, Aug 11, 2006 at 11:28:08PM +0800, Audrey Tang wrote: : For other built-in types, I think underscore names are just fine. For example, : metaclass methods such as "Class.has_method" should indeed remain as such. :) That's fine--I don't think of anything behind the META curtain as "core", at

Re: designing a test suite for multiple implementations

2006-08-11 Thread Larry Wall
Just to avoid repeating some of the discussion, here's a link to #perl6: http://colabti.de/irclogger/irclogger_log/perl6?date=2006-08-07,Mon&sel=110#l193 The discussion goes on and off for most of the rest of the page, so you probably want to search for and highlight "todo" if you're using f

Re: designing a test suite for multiple implementations

2006-08-12 Thread Larry Wall
[Time to stop spamming multiple lists. Followups to p6c for bikeshedding.] On Sat, Aug 12, 2006 at 10:30:22AM +0300, Gaal Yahas wrote: : On Sat, Aug 12, 2006 at 02:06:27PM +0800, Agent Zhang wrote: : >is $got, $expected, todo :pugs<6.2.13>, :p6p5<0.110>; : > : > Happily, Audrey has already i

Re: === and array-refs

2006-08-16 Thread Larry Wall
On Wed, Aug 16, 2006 at 04:25:13PM +0200, Dr.Ruud wrote: : Comparing strings in Perl5, using NFKD: : : perl5 -MUnicode::Normalize -we ' : ($\, $,) = ("\n", "\t") ; : $x = qq{Henry IV} ; : $y = qq{Henry \x{2163}} ; : print qq{<$x>}, qq{<$y>}, length $x, length $y, $x eq $y ? 1 : 0 ; : # $x

Re: NEXT and the general loop statement

2006-08-16 Thread Larry Wall
On Wed, Aug 16, 2006 at 08:21:29PM -0400, Joe Gottman wrote: : Is a NEXT clause called before or after the update portion of a general loop : statement? For instance, consider the following code: : : : : loop $n = 0; $n < 5; ++$n { : : NEXT {print $n;} : : } : : : : Is the output 012

Re: Numerification of Order:: constants

2006-08-17 Thread Larry Wall
On Thu, Aug 17, 2006 at 11:27:21AM -0600, David Green wrote: : However, what I'm wondering is whether Order::Same is "but true" and : the others "but false"? (Which makes cmp in boolean context the same : as eqv, but it seems to make sense that way.) We should not be encouraging people to use c

Re: Numerification of Order:: constants

2006-08-17 Thread Larry Wall
I don't know if I've made this clear, but over the last few years I've been treating "but True" and "but False" as design smells. They're fine as a workaround for dire circumstances and uncooperative types, but you'll not find me designing very many of the core interfaces to use them, or other run

Re: === and array-refs

2006-08-17 Thread Larry Wall
On Thu, Aug 17, 2006 at 12:18:55PM -0600, David Green wrote: : So perhaps what I'm looking for is more syntactic : sugar for easily traversing nested data : structures in different ways. Quoth S03: If that's not enough flexibility, there is also an C function that can be passed addition

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

2006-08-18 Thread Larry Wall
On Fri, Aug 18, 2006 at 12:56:30PM +0300, Markus Laire wrote: : What about combined short switches like C<-abc> to mean C<-a -b -c>? : Will perl6 support this notation or not? Hmm, that opens up a world of hurt. Either you have to distinguish a --abc from -abc, or you have to have some kind of fa

Re: NEXT and the general loop statement

2006-08-18 Thread Larry Wall
On Fri, Aug 18, 2006 at 01:44:35AM -0600, Luke Palmer wrote: : On 8/17/06, Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: : >Depends on when it fires I guess. Your example might be equivalent to : >this perl5ish: : > : >while (1) { : >$num = rand; : >print $num; : >last

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

2006-08-18 Thread Larry Wall
On Fri, Aug 18, 2006 at 07:53:14PM +0300, Markus Laire wrote: : ps. Then there's the perl5-behaviour of "perl -n0e unlink" where also : the intervening switches can get arguments. This could be expanded so : that all chars for which there's no 1-char alias defined, are : parameters. So C<-aHellobWo

Re: multi-line comments, C macros, & Pod abuse

2006-08-18 Thread Larry Wall
On Fri, Aug 18, 2006 at 11:58:20AM -1000, Joshua Hoblitt wrote: : It occurred to me that other day that in our "in house" C code we : somewhat frequently use an idiom that's not easily translated into Perl : 5. Our rule is that if your commenting out more then 1 or 2 lines of : code that you wrap

<    1   2   3   4   5   6   7   8   9   10   >