Re: Hackathon notes

2005-07-08 Thread Patrick R. Michaud
On Thu, Jul 07, 2005 at 06:37:58PM +0800, Autrijus Tang wrote: > During the Pugs Hackathon at YAPC::NA 2005, I managed to get various > unspecced tests and features reviewed by Larry, and posted them in my > journal. The original notes is attached; I'd be very grateful if you or > other p6l people

Re: Proposal: split ternary ?? :: into binary ?? and //

2005-09-06 Thread Patrick R. Michaud
On Tue, Sep 06, 2005 at 07:26:37AM +1000, Damian Conway wrote: > Thomas Sandlass wrote: > > >I'm still contemplating how to get rid of the :: in the > >ternary > > > >Comments? > I believe that the single most important feature of the ternary operator is > that it is ternary. That is, unlike an

Re: Proposal: split ternary ?? :: into binary ?? and //

2005-09-07 Thread Patrick R. Michaud
On Wed, Sep 07, 2005 at 08:32:39AM -0700, Larry Wall wrote: > > I think that's a powerful argument even if we don't have an infix:<::>. > Plus I hate all infix "nor" operators due to my English-speaking bias > that requires a "neither" on the front. So let's go ahead and make > it ??!!. (At leas

Re: syntax for accessing multiple versions of a module

2005-10-21 Thread Patrick R. Michaud
On Thu, Oct 20, 2005 at 09:14:15PM -0400, John Adams wrote: > From: Luke Palmer <[EMAIL PROTECTED]> > > > But $1 in Perl 5 wasn't the same as $1 in a shell script. > > I'm all for breaking things that need breaking, which is why I > keep my mouth shut most of the time--either I see the reason or

Re: \x{123a 123b 123c}

2005-11-20 Thread Patrick R. Michaud
On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote: > On Sun, Nov 20, 2005 at 01:26:21AM +0100, Juerd wrote: > : Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100): > : > Maybe > : > "\x{123a 123b 123c}" > : > is a nice alternative of > : > "\x{123a} \x{123b} \x{123c}". > > We

Re: \x{123a 123b 123c}

2005-11-21 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 03:23:35PM +0100, TSa wrote: > Patrick R. Michaud wrote: > >There's also , unless someone redefines the subrule. > >And in the general case that's a slightly more expensive mechanism > >to get a space (it involves at least a subrule look

Re: apo5

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 12:08:08PM -0800, Larry Wall wrote: > On Mon, Nov 21, 2005 at 07:57:59PM +0100, Ruud H.G. van Tol wrote: > : There is a "[[:alpha:][:digit:]" and a "[[:alpha:][:digit]]" on the > : A5-page. > > Hmm, well, thanks--I went to fix it and I see Patrick beat me to > the fix. But

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote: > : There's also , unless someone redefines the subrule. > > But you can't use in a character class. Well, that is, unless > you write it: > > <+[ a..z ]+> > > or some such. Maybe that's good enough. Er, that's now <+[ a..z ]+s

Re: apo5

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 07:57:59PM +0100, Ruud H.G. van Tol wrote: > > There is a "[[:alpha:][:digit:]" and a "[[:alpha:][:digit]]" on the > A5-page. Now fixed. > > Besides, you have to be able to distinguish > > s/^/foo/ from s/$/foo/. > > 's/$/foo/' becomes 's//foo/' > Uh, no, because is s

Re: apo5

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 11:19:48PM +0100, Ruud H.G. van Tol wrote: > Patrick R. Michaud: > > >> 's/$/foo/' becomes 's//foo/' > >> > > > > Uh, no, because is still a zero width assertion. :-) > > That's why I chose it. It is n

Re: apo5

2005-11-22 Thread Patrick R. Michaud
On Tue, Nov 22, 2005 at 01:09:40AM +0100, Ruud H.G. van Tol wrote: > 's/$/foo/' becomes 's//foo/' > >>> > >>> Uh, no, because is still a zero width assertion. :-) > >> > >> That's why I chose it. It is not at the end-of-string? > > > > Because ".*" matches "", // would be true at > > every p

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Tue, Nov 22, 2005 at 07:52:24AM -0800, Larry Wall wrote: > > I think we'll leave both _ and \_ meaning the same thing, just to avoid > that confusion path [...] Yay! > : Whatever shortcuts we introduce, I'll be happy if we can just > : rule that backslash+space (i.e., "\ ") is a literal space

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Tue, Nov 22, 2005 at 10:30:20AM -0800, Larry Wall wrote: > On Tue, Nov 22, 2005 at 09:46:59AM -0800, Dave Whipp wrote: > : Larry Wall wrote: > : > : >And there aren't that many regexish languages anyway. So I think :syntax > : >is relatively useless except for documentation, and in practice pe

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote: > On Sun, Nov 20, 2005 at 10:27:17AM -0600, Patrick R. Michaud wrote: > : On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote: > : > We already have, from A5, \x[0a;0d], so you can supposedly say > : >

Re: Matching a literal # in a rule

2005-12-02 Thread Patrick R. Michaud
On Fri, Dec 02, 2005 at 09:26:12PM +0100, Brad Bowman wrote: > How can you match a literal "#" in a rule? > \# or only \x{23}? > > S05 seems clear "# now always introduces a comment", > and \# is not listed in the escapes. > > But then Perl 5 has \# so I assume it's just an omission... Short an

Re: Match objects

2005-12-26 Thread Patrick R. Michaud
On Fri, Dec 23, 2005 at 02:09:19PM +, Luke Palmer wrote: > What sort of match object should this return, supposing that it didn't > infinite loop: > > "x" ~~ / [ [ (x) ]* ]* / > > Should $/[0][0] be "x", or should $/[0][0][0] be "x"? If it's the > latter, then when do new top-level eleme

Re: Match objects

2005-12-26 Thread Patrick R. Michaud
On Mon, Dec 26, 2005 at 07:34:06PM +, Luke Palmer wrote: > On 12/26/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > On Fri, Dec 23, 2005 at 02:09:19PM +, Luke Palmer wrote: > > > "x" ~~ / [ [ (x) ]* ]* / > > > > As I understand thing

Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Patrick R. Michaud
On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote: > I've changed the flipflop operator/macro to "ff", short for "flipflop". > This has several benefits. ... ...another of which is that we can use "ff" and "fff" to mean "loud" and "really loud" in our perl poetr^H^H^H^H^Hmusic. :-) Pm

Re: Is S05 correct?

2006-02-06 Thread Patrick R. Michaud
On Mon, Feb 06, 2006 at 08:29:54PM -0500, Joe Gottman wrote: >This may be a stupid question, but where can I view the fixed Synopsis? > When I go to http://dev.perl.org/perl6/doc/design/syn/S05.html, I see that > the modification date is November 16, 2005. Is this the most up-to-date > version?

Re: Implementation of :w in regexes and other regex questions

2006-02-14 Thread Patrick R. Michaud
On Tue, Feb 14, 2006 at 11:35:18AM -0800, David Romano wrote: > On 2/14/06, Luke Palmer <[EMAIL PROTECTED]> wrote: > > On 2/14/06, David Romano <[EMAIL PROTECTED]> wrote: > > > I don't want to just skip tags wholly, because they do > > > serve a purpose, but only in a particular context. (Can >

Re: some newbie questions about synopsis 5

2006-02-15 Thread Patrick R. Michaud
On Wed, Feb 15, 2006 at 10:09:05AM +0100, H. Stelling wrote: > - Capture numbering: > > /(a) [ (b) (c) (d) | (e) & (f) ] (g)/ capture.t suggests something like > $0$1 $2 $3$1$2$4, but I'm only guessing about the > "&" bit. Yes. > In the following, > > / (a) [ (b) (c) | $5 :

Re: some newbie questions about synopsis 5

2006-02-17 Thread Patrick R. Michaud
On Fri, Feb 17, 2006 at 02:33:12PM +0100, H. Stelling wrote: > Patrick R. Michaud wrote: > >>In the following, > >> > >>/ (a) [ (b) (c) | $5 := (d) $0 := (e) ] (f) / > >> > >>does the first alias have any effect on where the f's will go > &

Re: $a.foo() moved?

2006-04-06 Thread Patrick R. Michaud
On Thu, Apr 06, 2006 at 03:38:59PM -0400, John Macdonald wrote: > On Thu, Apr 06, 2006 at 12:10:18PM -0700, Larry Wall wrote: > > The current consensus on #perl6 is that, in postfix position only (that > > is, with no leading whitespace), m:p/\.+ \s / lets you embed > > arbitrary whitespace, commen

Re: Another dotty idea

2006-04-07 Thread Patrick R. Michaud
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 Patrick R. Michaud
On Fri, Apr 07, 2006 at 07:00:29PM -0700, Jonathan Lang wrote: > Patrick R. Michaud wrote: > > Jonathan wrote: > > > If a delimiter is included, the > > > comment is terminated by the matching quote delimiter; if absent, the > > > comment is terminated by the n

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

2006-04-20 Thread Patrick R. Michaud
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 assertion - see below) > +However, if C<$var> contains a rule object, rather attem

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

2006-04-20 Thread Patrick R. Michaud
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 r

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

2006-04-20 Thread Patrick R. Michaud
On Thu, Apr 20, 2006 at 09:19:48AM -0700, Larry Wall wrote: > : > +Any other value causes the match to fail. In particular, shorter keys > : > +are not tried if a longer one matches and fails. > : > : Is there a way to say to continue with the next shortest key? > > Yeah, use <@rules> rather tha

Re: A rule by any other name...

2006-05-10 Thread Patrick R. Michaud
On Wed, May 10, 2006 at 06:07:54PM +1000, Damian Conway wrote: > > >Including :skip(//). Yes, agreed, it's a huge > >improvement. I'd be more comfortable if the default rule to > >use for skipping was named instead of . > >(On IRC was also proposed, but the connection between > >:skip and is

Re: A rule by any other name...

2006-05-10 Thread Patrick R. Michaud
On Wed, May 10, 2006 at 05:58:57PM -0700, Allison Randal wrote: > To summarize a phone call today, the more intelligent defaults we add to > differently named rule keywords the more comfortable I am with having > different names. So, here's what we have so far (posted both as an FYI > and to con

Re: A rule by any other name...

2006-05-11 Thread Patrick R. Michaud
On Thu, May 11, 2006 at 08:57:53PM +0800, Audrey Tang wrote: > Patrick R. Michaud wrote: > >> - is a single character of obligatory whitespace > > Hmm, it's literal ' ' (that is, \x20), not "whitespace" in general, > right? For "obligatory whit

Re: About default options ':ratchet' and ':sigspace' on rules

2006-06-02 Thread Patrick R. Michaud
On Fri, Jun 02, 2006 at 02:17:25PM +0800, Shu-chun Weng wrote: > 1. Spaces at beginning and end of rule blocks should be ignored > since space before and after current rule are most likely be > defined in rules using current one. > 1a. I'm not sure if it's "clear" to define as this, but t

Re: grammar: difference between rule, token and regex

2006-06-02 Thread Patrick R. Michaud
On Fri, Jun 02, 2006 at 01:56:55PM -0700, jerry gay wrote: > On 6/2/06, Rene Hangstrup Møller <[EMAIL PROTECTED]> wrote: > >I am toying around with Parrot and the compiler tools. The documenation > >of Perl 6 grammars that I have been able to find only describe rule. But > >the grammars in Parrot 0

Re: lexical lookup and OUTER::

2006-06-24 Thread Patrick R. Michaud
On Sat, Jun 24, 2006 at 04:52:26PM -0700, Audrey Tang wrote: > $x = 1 if my $x; > > The compiler is "allowed" to complain, but does that means it's also > okay to not die fatally, and recover by pretending as if the user has > said this? > > # Current Pugs behaviour > $OUTER::x =

Re: Motivation for /+/ set Array not Match?

2006-09-22 Thread Patrick R. Michaud
On Fri, Sep 22, 2006 at 10:22:52PM +0800, Audrey Tang wrote: > Moreover: > >/ bar bar +/ > > should set $ to an Array with two Match elements, the first being a > simple match, and the second has multiple positional submatches. > > The thinking behind the separate treatment is that in a cont

Re: special named assertions

2006-09-27 Thread Patrick R. Michaud
On Wed, Sep 27, 2006 at 11:59:32AM -0700, David Brunton wrote: > A quick scan of S05 reveals definitions for these seven special named > assertions: > [...] I don't think that <'...'> or <"..."> are really "named assertions". I think that (as well as <+xyz> and <-xyz>) are simply special form

Re: special named assertions

2006-09-27 Thread Patrick R. Michaud
rtain named assertions receive special treatment in the engine. Thanks, Pm > ------ Original message -- > From: "Patrick R. Michaud" <[EMAIL PROTECTED]> > > On Wed, Sep 27, 2006 at 11:59:32AM -0700, David Brunton wrote: > > > A qu

Re: Major bullet biting on | vs || within regex

2007-01-16 Thread Patrick R. Michaud
On Tue, Jan 16, 2007 at 10:41:03AM -0800, Larry Wall wrote: > Note, in case you don't read synopsis checkins: the previous checkin > majorly changes the semantics of | within regex to support required > longest-token matching semantics rather than left-to-right matching. > This is nearly on the sam

Parrot 0.4.9 released!

2007-02-22 Thread Patrick R. Michaud
On behalf of the Parrot team, I'm proud to announce Parrot 0.4.9, "Socorro." Parrot (http://parrotcode.org) is a virtual machine aimed at running all dynamic languages. Parrot 0.4.9 can be obtained via CPAN (soon), or follow the download instructions at http://www.parrotcode.org/source.html . For

Re: perl6-synopsis svn

2007-02-22 Thread Patrick R. Michaud
On Fri, Feb 23, 2007 at 12:35:15AM +, Blair Sutton wrote: > Hi Larry > > Sorry if this is a silly question but I haven't been able to find the > answer. Is the perl6-synopsis SVN repository publicly available or is it > in the same repository as that of Parrot or Pugs? The versions that app

Re: What criteria mark the closure of perl6 specification

2007-02-25 Thread Patrick R. Michaud
On Sun, Feb 25, 2007 at 09:42:22AM +0300, Richard Hainsworth wrote: > > While perl6 remains unstable in its specification (or is perceived to be > that way) and is looking (from outside a select group?) like a unending > road, wont this act as a deterrent to those who want to help hack it > int

Re: Packed array status?

2007-02-26 Thread Patrick R. Michaud
On Sun, Feb 25, 2007 at 03:48:47PM -0800, chromatic wrote: > On Sunday 25 February 2007 12:40, Geoffrey Broadwell wrote: > > > What backends support packed native arrays at this point? And what's > > the performance like? > > I don't know if Patrick has using PIR libraries working in Perl 6 > y

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

2007-08-04 Thread Patrick R. Michaud
On Thu, Aug 02, 2007 at 04:19:18PM -0700, [EMAIL PROTECTED] wrote: > Increment of a C (in a suitable container) works similarly to > Perl 5, but is generalized slightly. First, the string is examined > to see if it could be the string representation of a number in > any common representation,

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

2007-08-04 Thread Patrick R. Michaud
On Sat, Aug 04, 2007 at 12:56:06PM -0700, Larry Wall wrote: > for '❶' .. '❿' { .say } > > But it's not clear what to do if you try to increment ❿ though. > Probably just return a failure. Assuming that '❶' .. '❿' is a range similar to '0'..'9', then consistency with the other ranges would see

Parrot 0.4.15 "Augean Stable" released!

2007-08-22 Thread Patrick R. Michaud
On behalf of the Parrot team, I'm proud to announce Parrot 0.4.15 "Augean Stable." Parrot (http://parrotcode.org/) is a virtual machine aimed at running all dynamic languages. Parrot 0.4.15 can be obtained via CPAN (soon), or follow the download instructions at http://parrotcode.org/source.html.

Re: &, &&, and backtracking.

2007-09-06 Thread Patrick R. Michaud
On Wed, Sep 05, 2007 at 09:36:24PM -0500, Jonathan Scott Duff wrote: > How do C<&> and C<&&> differ with respect to backtracking? For instance, > > "foobar" ~~ / <[a..z]>+ & [ ... ] /; > > Both sides of the C<&> happen in parallel, so I would guess that they > both match "foo" then stop. Ple

Re: &, &&, and backtracking.

2007-09-06 Thread Patrick R. Michaud
On Thu, Sep 06, 2007 at 12:37:37PM -0700, Larry Wall wrote: > On Thu, Sep 06, 2007 at 01:25:12PM -0500, Patrick R. Michaud wrote: > : On a somewhat similar question, what happens with a pattern > : such as > : > : "foobar" ~~ / foo.+? | fooba / > : > : The LH

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

2007-09-07 Thread Patrick R. Michaud
On Thu, Sep 06, 2007 at 05:12:03PM -0700, [EMAIL PROTECTED] wrote: > Log: > old is now <+foo> to suppress capture > new now is zero-width like I really like the change from to <+foo>, but I think there's a conflict (or at least some confusion) in the way the new spec is worded, especially as i

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

2007-09-07 Thread Patrick R. Michaud
Some other minor notes about the S05.pod update: > +In particular, also matches the null string, and always fails. Perhaps these should be quoted with "C<< ... >>" so that it's clear that "" and "" are the tokens? When looking at the .pod file I had to think about it a couple of times to make

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

2007-09-07 Thread Patrick R. Michaud
On Fri, Sep 07, 2007, Larry Wall writes: > If we stick with +, one approach might be to simply disallow whitespace > in composite character classes. Of the choices presented thus far, I like this one the best. Although I did like being able to stick whitespace in the character classes for readabil

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

2007-09-07 Thread Patrick R. Michaud
On Fri, Sep 07, 2007 at 04:05:55PM -0600, Paul Seamons wrote: > I'd vote for <:ws> which is vaguely reminiscent of the former non-capturing > parens (?:). > > It (<:ws>) also bears little similarity to any other regex construct - > although it looks a bit like a Perl 6 pair. For completeness it

languages/perl6 doesn't run (was: xml and perl 6)

2007-11-28 Thread Patrick R. Michaud
On Wed, Nov 28, 2007 at 07:42:29PM +0100, James Fuller wrote: > in the meantime, I have yet to get latest trunk perl6 running > properly, on parrot, or freebsd then I will start thinking of such a > task (everything compiles fine). as an aside I am getting an; > > "load_bytecode" couldn't find fi

Re: xml and perl 6

2007-11-29 Thread Patrick R. Michaud
On Thu, Nov 29, 2007 at 10:20:00AM -0500, Mark J. Reed wrote: > The module could even, I suppose, insert a filter into the compiler so > that your proposed literal syntax would work, but I don't really see > the advantage of that over this: > > my $doc = Document.new(< here > END Or even: my

Re: perl 6 grammar

2007-12-03 Thread Patrick R. Michaud
On Mon, Dec 03, 2007 at 12:20:02PM +, Smylers wrote: > cdumont writes: > > I don't really think using the column in a ternary means that you > > cannot use it else where. > > We started off with that, and it was changed specifically because it was > causing a problem; I can't remember exactly

Re: Concerns about "{...code...}"

2007-12-20 Thread Patrick R. Michaud
On Thu, Dec 20, 2007 at 11:35:44AM -0600, Jonathan Scott Duff wrote: > On Thu, Dec 20, 2007 at 11:23:05AM -0600, Jonathan Scott Duff wrote: > > Adriano answered #1 I think: $yaml = Q:!c"{ $key: 42 }"; > > Er, I just looked over the spec again and realized that Q does > absolutely no interpolation

Re: Concerns about "{...code...}"

2007-12-20 Thread Patrick R. Michaud
On Thu, Dec 20, 2007 at 06:01:53PM -0500, Mark J. Reed wrote: >On Dec 20, 2007 4:30 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > Just to add another perspective, PHP uses curlies inside of > double-quoted strings to indicate various forms of >

Re: calling parrot from perl6

2008-01-01 Thread Patrick R. Michaud
On Mon, Dec 31, 2007 at 11:17:53PM +0300, Richard Hainsworth wrote: > Not sure whether this should be p6-lan or p6-users. Posted to p6l only. Since the question is specific to perl6 and Parrot, it probably belongs on perl6-compiler. But I'll answer it here for now, as it may spark a language rela

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

2008-01-17 Thread Patrick R. Michaud
On Thu, Jan 17, 2008 at 01:18:32PM -0800, [EMAIL PROTECTED] wrote: > +=item * > + > +The definition of C<.true> for the most ancestral type (that is, the > +C type) is equivalent to C<.defined>. Would we normally consider prefix: to be defined in terms of C<.true>, or vice versa? Is there a pre

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Patrick R. Michaud
On Sat, Jan 26, 2008 at 08:58:43AM -0800, Larry Wall wrote: > After a recent exchange on PerlMonks about join, I've been thinking > about the problem of pluralization in interpolated strings, where we > get things like: > > say "Received $m message{ 1==$m ?? '' !! 's' }." > > My first thought

Parrot 0.5.3 "Way of the Parrot" released!

2008-02-20 Thread Patrick R. Michaud
On behalf of the Parrot team, I'm proud to announce Parrot 0.5.3 "Way of the Parrot." Parrot (http://parrotcode.org/) is a virtual machine aimed at running all dynamic languages. Parrot 0.5.3 can be obtained via CPAN (soon), or follow the download instructions at http://parrotcode.org/source.html

Typo in S06?

2008-03-29 Thread Patrick R. Michaud
S06.pod says (line 2698): : Ordinarily a top-level Perl "script" just evaluates its anonymous : mainline code and exits. During the mainline code, the program's : arguments are available in raw form from the C<@ARGS> array. At the end of : the mainline code, however, a C subroutine will be calle

Re: Query re: duction and precedence.

2008-03-30 Thread Patrick R. Michaud
On Sun, Mar 30, 2008 at 08:21:39AM -0700, Mark A. Biggar wrote: > The reduce meta-operator over - in APL gives alternating sum, similarly > alternating quotient for /, which only works if you right associate > things. > > [-] 1,2,3,4,5,6 => 1-2+3-4+5-6 # pseudo-apl > > [/] 1,2,3,4,5,6 => (1*3*5

Re: Getting Started - What to try?

2008-03-31 Thread Patrick R. Michaud
On Mon, Mar 31, 2008 at 10:23:45AM +0200, Moritz Lenz wrote: > John M. Dlugosz wrote: > > I understand the most official grammar is being developed there. > > Not quite. The "official" grammar is in the pugs repo in src/perl6/, but > it can't really run on anything yet. This is correct -- the "of

Re: question on max | min op

2008-04-01 Thread Patrick R. Michaud
On Tue, Apr 01, 2008 at 05:39:36AM -0400, Mark J. Reed wrote: > On Tue, Apr 1, 2008 at 1:44 AM, Xiao Yafeng <[EMAIL PROTECTED]> wrote: > > I've read Synopsis and I wondered why to treat max and min as > > operator. IMHO, view them as list functions is more reasonable. Like > > below: > > > > @te

Re: STD.pm

2008-04-05 Thread Patrick R. Michaud
On Sat, Apr 05, 2008 at 07:59:36PM -, John M. Dlugosz wrote: > I'm trying to fathom STD.pm. > > Maybe someone can help me trace through this one? > > How is > $obj!privA = 1; > parsed? > > Reading expect_term, it trys , then sees the > "$" and commits to the decision, reads "obj" as

Re: STD.pm

2008-04-05 Thread Patrick R. Michaud
On Sat, Apr 05, 2008 at 05:32:27PM -0500, Patrick R. Michaud wrote: > On Sat, Apr 05, 2008 at 07:59:36PM -, John M. Dlugosz wrote: > > I'm trying to fathom STD.pm. > > > > Maybe someone can help me trace through this one? > > > > How is > >

Re: syntax question on parameter lists

2008-04-10 Thread Patrick R. Michaud
On Thu, Apr 10, 2008 at 09:18:38PM -0700, Larry Wall wrote: > On Fri, Apr 11, 2008 at 03:26:02AM -, John M. Dlugosz wrote: > : S06 shows how to define named-only parameters, "marked with a prefix :". > But no example shows anything more than a bare parameter name. No type is > ever given! >

Re: Chained Comparisons ?

2008-04-16 Thread Patrick R. Michaud
On Wed, Apr 16, 2008 at 07:49:48AM -, John M. Dlugosz wrote: > I know how comparisons are chained in Perl 6. There is a very > short section on it in S03. > > So, are the operators infix:{'<'} etc. written in the normal > way to take two arguments? Then the language transforms > A op B op

Re: Chained Comparisons ?

2008-04-17 Thread Patrick R. Michaud
On Wed, Apr 16, 2008 at 11:19:33PM -0400, Bob Rogers wrote: > Pardon a lurker, but I'm not sure I understand the point of this. In: > > if $x < $y < $z { ... } > > I would expect a sensible compiler short-circuit the "$x < $y" part, and > indeed the "Chained comparisons" section of S03 (ve

Re: Compile-time checking of assignment to read-only variables (Re: MMD distances)

2008-05-09 Thread Patrick R. Michaud
On Fri, May 09, 2008 at 03:02:28PM +0200, Carl Mäsak wrote: > TSa (>): > > sub bar ($x) > > { > >$x = 3; # error, $x is readonly > >foo($x); # error, could hit rw Str > > } > > By the way, I hope it's possible to make the assignment `$x = 3` to > the read-only variable $x a compile-time

Re: Compile-time checking of assignment to read-only variables (Re: MMD distances)

2008-05-09 Thread Patrick R. Michaud
On Fri, May 09, 2008 at 05:09:31PM +0200, Carl Mäsak wrote: > Pm (>): > > In Rakudo's case, we just haven't implemented read-only traits > > on variables yet. > > Goodie. I guessed as much. > > > But yes, I expect that it will be caught as > > a compile-time error. > > And do you agree it's rea

possible clarification of item(), list(), etc.

2008-06-21 Thread Patrick R. Michaud
I think we need a slight wording improvement in S03. Currently S03:1772 says that the C contextualizer is equivalent to C<@()>. However, S05:2328 also says that C<@()> is a shorthand for C<@($/)>. Taken together, these would seem to imply that C is equivalent to C<@($/)>, which I suspect is not

.join on Array

2008-06-26 Thread Patrick R. Michaud
Following up to a thread on p6c regarding method fallbacks and .join: * What should [1,3,5].join('-') produce? * How about ([1,3,5], 20).join('-') ? Thanks! Pm

Re: Rakudo test miscellanea

2008-06-26 Thread Patrick R. Michaud
On Thu, Jun 26, 2008 at 10:40:53AM -0400, Trey Harris wrote: > In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: > >I assume that 'Num' is meant to be a non-complex. > >Then it seems to make sense to assume: > >Int is Rat > >Rat is Num > >Num is Complex > >or am I off again? > > S29 seems t

Should C and C work in C ?

2008-06-29 Thread Patrick R. Michaud
Do C and C act like the C method, in that they work for C object and not just objects of type C? In other words,, should C< $x.grep(...) > work even if $x isn't normally a list type? Pm

Re: Should C and C work in C ?

2008-06-30 Thread Patrick R. Michaud
On Mon, Jun 30, 2008 at 01:43:11PM +0200, Moritz Lenz wrote: > Ovid wrote: > > --- On Sun, 29/6/08, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > > >> Do C and C act like the > >> C method, in that > >> they work for C object and not just o

Re: Should C and C work in C ?

2008-06-30 Thread Patrick R. Michaud
On Mon, Jun 30, 2008 at 07:25:11AM -0500, Patrick R. Michaud wrote: > Moritz is correct -- in order to get ('foo').join(':') to work as > people will expect, it was decided to define "universal" methods > in the Any class as part of the prelude [1]. I f

Re: Should C and C work in C ?

2008-07-01 Thread Patrick R. Michaud
On Tue, Jul 01, 2008 at 05:36:26PM +0200, TSa wrote: > This would save lots of overloads in Any in favor of a handful of > standard coercions. These need proper anchorage in the dispatch > system, of course. That to me means we need some definition of > "conversion quality" and "conversion distance

Re: Interrogating signatures

2008-07-08 Thread Patrick R. Michaud
On Tue, Jul 08, 2008 at 12:47:57PM +0200, Jonathan Worthington wrote: > Hi, > > Is there an introspection interface for signatures defined anywhere? > I've looked through the synopses and don't see one. I'm thinking things > like: > > * Can you do .arity and .count of a signature? > * Can you i

Question about .sort and .reduce

2008-07-11 Thread Patrick R. Michaud
t/spec/S29-list/sort.t has the following test: my @a = (2, 45, 6, 1, 3); my @e = (1, 2, 3, 6, 45); my @s = { $^a <=> $^b }.sort: @a; is(@s, @e, '... with closure as direct invocant'); S29 doesn't show a 'sort' method defined on block/closure invocants... should there be? Note

Re: Question about .sort and .reduce

2008-07-11 Thread Patrick R. Michaud
On Fri, Jul 11, 2008 at 03:27:26PM +0200, TSa wrote: > >Note that we already have: > > > >my @s = sort { $^a <=> $^b }, @a; > >my @s = @a.sort { $^a <=> $^b }; > > Is that the adverbial block syntax? If not how > would it look? The adverbial block syntax would be: @a.sort:{ $^a <=> $

S04-related closure question

2008-07-12 Thread Patrick R. Michaud
What would be the expected output from the following? my $a = foo(); my $b; { my $x = 1; sub get_x() { return $x; } sub foo() { return &get_x; } $b = foo(); } my $c = foo(); say "a: ", $a(); say "b: ", $b(); say "c: ", $c(); As

Re: Quick question: (...) vs [...]

2008-08-09 Thread Patrick R. Michaud
On Fri, Aug 08, 2008 at 11:08:51PM -0400, Brandon S. Allbery KF8NH wrote: > > On 2008 Aug 8, at 22:53, John M. Dlugosz wrote: > >> What is the difference between (1,2,3) and [1,2,3] ? > > IIRC one is a list, the other a reference to a list --- which in perl6 > will be hidden for the most part. so

Re: Closure vs Hash Parsing

2008-08-09 Thread Patrick R. Michaud
On Fri, Aug 08, 2008 at 07:32:52AM +0200, Carl Mäsak wrote: > Jonathan (>): > > That this means the { $_ => uc $_; } above would end up composing a Hash > > object (unless the semicolon is meant to throw a spanner in the > > hash-composer works?) It says you can use sub to disambiguate, but > > > >

arrayref/hashref in spectest suite

2008-08-18 Thread Patrick R. Michaud
There are quite a few tests in the spectest suite that make mention of "arrayref" and "hashref", and that expect things to work like references do in Perl 5. I'd like to get some confirmation/clarification on them. Here's one example: my $foo = [ 42 ]; my $bar = { a => 23 }; $foo[1]

Re: whats wrong with this code?

2008-08-22 Thread Patrick R. Michaud
On Fri, Aug 22, 2008 at 04:34:04PM -0500, Andy Colson wrote: > sub xsum (@list) > { > my $i = 0; > print "summing: "; > for @list > { > $i += $_; > print $_,","; > } > say " = $i"; > return $i; > } > say "sum =

Re: Does tha capture object $/ retain a live tie to the string it matched?

2008-08-23 Thread Patrick R. Michaud
On Sat, Aug 23, 2008 at 12:55:44PM +0200, Moritz Lenz wrote: > Carl Mäsak wrote: > > # should $/ really keep ties to $s like this? > > rakudo: my $s = "hello"; $s ~~ /hello/; $s = "goodbye"; say $/ > > rakudo 29834: OUTPUT[goodb␤] > > I'm pretty sure it's a bug in rakudo. It's a bug somewhere,

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-24 Thread Patrick R. Michaud
On Sun, Aug 24, 2008 at 03:00:54PM -0700, Larry Wall wrote: > : Question to p6l: do && and || autothread? Or do they collapse the > : junction prior to evaluation? (I hope the latter, since I think it's > : more dwimmy). > : > : Also do prefix: and prefix: collapse the junction? > > I think it wo

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-24 Thread Patrick R. Michaud
On Mon, Aug 25, 2008 at 12:15:05AM +0200, Moritz Lenz wrote: > Larry Wall wrote: > > I think it would be best if all boolean contexts collapse consistently, > > and I would consider all of those to be boolean contexts. More > > precisely, && and || are boolean on the left, but not on the right. >

Re: Speccing Test.pm?

2008-09-02 Thread Patrick R. Michaud
On Tue, Sep 02, 2008 at 02:10:39PM +0200, Moritz Lenz wrote: > The test suite is considered "official" as in "everything that passes > the (completed) test suite may name itself Perl 6", and nearly all of > these files 'use Test'; However we don't ship an "official" Test.pm, nor > do we define whic

Re: Speccing Test.pm?

2008-09-02 Thread Patrick R. Michaud
On Tue, Sep 02, 2008 at 12:32:49PM -0700, Darren Duncan wrote: > Patrick R. Michaud wrote: >> I think it's good to have a prototype Test.pm that we can point to as >> a reference, but I don't think we need to try to designate it as being >> "official".

Re: Regex repetition controlled by characters

2008-09-05 Thread Patrick R. Michaud
On Sun, Aug 31, 2008 at 08:33:48AM -0600, Stephen Simmons wrote: > In S05, I found this regarding the generalized repetition specifier: > > ** '|'# repetition controlled by presence of character > > I tried it out with > > rule thislist { ** '|' }; > > and got (with Rakudo): > >

Iterator semantics

2008-09-09 Thread Patrick R. Michaud
I think my question can be best understood by example -- what does the following produce? my @a = 1,2,3,4,5; for @a { .say; @a = (); } My question is whether the change to @a inside the for loop affects the iterator created at the beginning of the for loop. In other words, would the above

Re: Deep equivalence test of data structures

2008-09-14 Thread Patrick R. Michaud
On Sun, Sep 14, 2008 at 03:08:57PM +0200, Carl Mäsak wrote: > Recently, in November, we've had reason to clone the Rakudo Test.pm > and add an implementation (viklund++) of is_deeply, for testing > whether two arrays, pairs or hashes are deeply -- recursively -- > equivalent. The method does what y

How to define a new value type?

2008-09-14 Thread Patrick R. Michaud
In [1], Larry writes: > [...] we left = in the language > to provide (to the extent possible) the same semantics that it > does in Perl 5. And when it comes to non-value types, there really > are still references, even if we try not to talk about them much. > So I think assignment is basically ab

Re: How to define a new value type?

2008-09-14 Thread Patrick R. Michaud
On Sun, Sep 14, 2008 at 09:08:19AM -0500, Patrick R. Michaud wrote: > In [1], Larry writes: Oops, I forgot the reference: 1. http://groups.google.com/group/perl.perl6.language/msg/3f8efc31e4830f42 Pm

Re: Recommended Perl 6 best practices?

2008-09-14 Thread Patrick R. Michaud
On Sun, Sep 14, 2008 at 04:18:44PM +0200, Carl Mäsak wrote: > Conrad (>): > > Is there something more up-to-date concerning "Perl 6 best practices" that > > are presently-recommended (by p6l or @Larry) than the following item on the > > Perl 6 wiki? > [...] > That said, I do have one Perl 6-specifi

What should +":2<1a>" produce?

2008-09-14 Thread Patrick R. Michaud
Given that we have say +'12';# 12 say +'0b1100';# 12 say +'0x0c'; # 12 what should the following produce? say +':2<1a>';# 0? Failure? 12? Pm

Re: Deep equivalence test of data structures

2008-09-14 Thread Patrick R. Michaud
On Sun, Sep 14, 2008 at 01:59:22PM -0700, Michael G Schwern wrote: > Eric Wilhelm asked me to chime in here. > > is_deeply() is about checking that two structures contain the same values. > This is different from checking that they're the same *things*, that they are > in fact the same object or r

Re: Offerings - edits pending

2008-09-15 Thread Patrick R. Michaud
On Mon, Sep 15, 2008 at 06:08:37PM -0500, John M. Dlugosz wrote: > This is just a reminder that I have files posted at > waiting for someone in > authority to inspect and merge. Would it be worthwhile to provide them as diffs? That way we could easily

  1   2   3   4   >