Octal in p6rules (and strings)

2005-11-07 Thread Patrick R. Michaud
In p6rules, how should specify characters (glyphs, bytes, whatever) using octal notation? Currently S02 says that integer constants in octal are written with as "0o" prefix (as in 0o123), just as we would use the "0x" prefix to specify integers using base-16. It doesn't seem to be written anywher

Re: Octal in p6rules (and strings)

2005-11-07 Thread Patrick R. Michaud
On Mon, Nov 07, 2005 at 11:13:21AM -0800, Larry Wall wrote: > On Mon, Nov 07, 2005 at 10:51:59AM -0600, Patrick R. Michaud wrote: > : It doesn't seem to be written anywhere, but I think it's assumed > : that in string literals one would use "\o123", just as we use

Re: Octal in p6rules (and strings)

2005-11-07 Thread Patrick R. Michaud
On Mon, Nov 07, 2005 at 12:37:02PM -0800, Larry Wall wrote: > On Mon, Nov 07, 2005 at 02:18:24PM -0600, Patrick R. Michaud wrote: > : Having a shortcut for seems like a very good idea; it > : certainly makes things a lot simpler for the optimizer. However, > : a reminder that A

Re: Octal in p6rules (and strings)

2005-11-08 Thread Patrick R. Michaud
On Mon, Nov 07, 2005 at 03:05:06PM -0800, Larry Wall wrote: > On Mon, Nov 07, 2005 at 02:47:05PM -0600, Patrick R. Michaud wrote: > : > : But for the :w issue, we can always solve it with the colon: > : > : > : > : \d:065 = A digit (cut) followed by "065" &

Re: Octal in p6rules (and strings)

2005-11-08 Thread Patrick R. Michaud
On Tue, Nov 08, 2005 at 12:57:18PM +, [EMAIL PROTECTED] wrote: > "Patrick R. Michaud" <[EMAIL PROTECTED]> wrote: > :And we also get \d:0123 as a cheap way of saying \d0123. > > I think the ':' changes the meaning of the rule, so you still need >

Re: Octal in p6rules (and strings)

2005-11-08 Thread Patrick R. Michaud
On Tue, Nov 08, 2005 at 10:55:05AM -0500, Matt Fowles wrote: > Patrick~ > > On 11/8/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > On Tue, Nov 08, 2005 at 12:57:18PM +, [EMAIL PROTECTED] wrote: > > > "Patrick R. Michaud" <[EMAIL PROTECTED]&

Re: [perl #31181] [TODO] Strings - character class & properties testing

2005-11-14 Thread Patrick R. Michaud
On Fri, Nov 11, 2005 at 11:23:34AM -0800, Jerry Gay via RT wrote: > has this been addressed, even partially? it seems that it has, but this > ticket, nor the related email thread > (http://www.nntp.perl.org/group/perl.perl6.internals/29394) has been > updated since may 2005. The ticket can be clos

Re: context matters

2005-11-15 Thread Patrick R. Michaud
On Mon, Nov 14, 2005 at 06:59:51PM -0800, jerry gay wrote: > while adding some shiny new pge tests for return context, i came > across this PIRism: > > ##... > rulesub = p6rule('$:=(.)') > match = rulesub('abc') > .local string res > res = match['A'] > print res > ##

Re: context matters

2005-11-15 Thread Patrick R. Michaud
On Tue, Nov 15, 2005 at 10:26:05AM -0800, jerry gay wrote: > > Thus, while PGE::Match currently defines a C<__get_pmc_keyed_int> > > method, it's doesn't yet define a C<__get_string_keyed_int> method. > > So, a statement like > > > >.local string res > >.local pmc match > >res = match[0

Re: context matters

2005-11-15 Thread Patrick R. Michaud
On Tue, Nov 15, 2005 at 12:28:30PM -0800, Larry Wall wrote: > On Tue, Nov 15, 2005 at 12:32:38PM -0600, Patrick R. Michaud wrote: > : On Tue, Nov 15, 2005 at 10:26:05AM -0800, jerry gay wrote: > : > > Thus, while PGE::Match currently defines a C<__get_pmc_keyed_int> > :

Re: PGE::glob borked?

2005-11-16 Thread Patrick R. Michaud
On Wed, Nov 16, 2005 at 01:29:21AM -0500, Will Coleda wrote: > All but one test are passing again in tcl. The failing test boils > down to this PIR: > [...] > > So, are all these ways of preparing arguments to Glob incorrect? (and > if so, what's the right way?), or does this behavior point to

Re: pge named subrules and builtin rule behavior

2005-11-16 Thread Patrick R. Michaud
On Wed, Nov 16, 2005 at 08:11:24AM -0800, jerry gay wrote: > from a read of the spec, the expected behavior of this code is unclear to me. > > in the rule, i'm matching the builtin whitespace rule, creating an > alias with the same name as the named rule, and matching the builtin > rule again. thi

[perl #37371] [PATCH] update for t/op/string_cs.t to find word boundaries

2005-11-16 Thread Patrick R. Michaud
Attached is a patch that changes the "find word" test in string_cs.t to use the find_cclass and find_not_cclass opcodes to locate word boundaries. This test doesn't work exactly the way Leo has envisioned it (creating a special .CCLASS_* value for word boundaries), but it demonstrates how I th

PGE now using "compreg" opcode, new S05 posted

2005-11-17 Thread Patrick R. Michaud
Today we've switched PGE to start using the compreg opcode, instead of using find_global to locate the compiler. As a result, compiling a rule is now performed as: load_bytecode "PGE.pbc" $P0 = compreg "PGE::P6Rule" $P1 = $P0("pattern") The PGE.pbc file defines two compilers, "PGE::P

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: 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 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: \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: [perl #37745] [BUG] PGE::P5Regexp test failing

2005-11-24 Thread Patrick R. Michaud
On Wed, Nov 23, 2005 at 03:08:31PM -0800, jerry gay wrote: > # New Ticket Created by jerry gay > # Please include the string: [perl #37745] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/rt3/Ticket/Display.html?id=37745 > > > > test 502 causes p

Re: currently failing tests r10168

2005-11-24 Thread Patrick R. Michaud
On Fri, Nov 25, 2005 at 01:06:43AM +0100, Leopold Toetsch wrote: > Likely due to the stricter label checking we have these test failures > now: > > Failed Test Stat Wstat Total Fail Failed List > of Failed > --

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Patrick R. Michaud
On Tue, Nov 29, 2005 at 12:08:01PM -0800, Chip Salzenberg wrote: > Therefore, I propose requiring people to spell aliasing as ':='. This will > affect all code generated to use P and S registers. It should be an easy fix > (albeit an extensive one). And if we don't do it now, it'll just get hard

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Patrick R. Michaud
On Tue, Nov 29, 2005 at 02:18:17PM -0600, Patrick R. Michaud wrote: > Personally I haven't had much trouble with '=' and I don't think > I ever use ':='. Perhaps I've just trained myself to the current > implementation, but I like that the shorter '

Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Patrick R. Michaud
On Tue, Nov 29, 2005 at 12:36:03PM -0800, Chip Salzenberg wrote: > On Tue, Nov 29, 2005 at 02:18:17PM -0600, Patrick R. Michaud wrote: > > Second comment: how about access to keyed items -- does this mean: > > > > P0 := P1[S1] # alias > > S0 = P1[S1]# as

Re: pdd03 and Overflow/Underflow - r10269

2005-11-30 Thread Patrick R. Michaud
On Wed, Nov 30, 2005 at 11:00:36AM -0800, Chip Salzenberg wrote: > On Wed, Nov 30, 2005 at 12:18:40PM +0100, Leopold Toetsch wrote: > > Parrot didn't throw exceptions on param or result count mismatch > > until now, and still doesn't. [1] > > [1] all PGE and PGE-based stuff is failing, when both ar

Re: pdd03 and Overflow/Underflow - r10269

2005-11-30 Thread Patrick R. Michaud
On Wed, Nov 30, 2005 at 03:27:52PM -0500, Will Coleda wrote: > On Nov 30, 2005, at 2:50 PM, Patrick R. Michaud wrote: > >Short answer: something like a ":last" flag would be excellent. > > > >Longer answer: In PGE, each rule is a parrot sub, and some rules >

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: PGE::Text::bracketed added to PGE

2005-12-07 Thread Patrick R. Michaud
On Wed, Dec 07, 2005 at 03:17:10PM -0800, Allison Randal wrote: > On Oct 17, 2005, at 14:15, Patrick R. Michaud wrote: > > >I've just added a subrule to PGE, > >which is roughly analogous to the "bracketed" function in > >Perl 5's Text::Balanc

Re: PGE::Text::bracketed added to PGE

2005-12-07 Thread Patrick R. Michaud
On Wed, Dec 07, 2005 at 05:17:23PM -0800, Allison Randal wrote: > >But at the moment, a string can be matched based on balanced and > >nested parentheses using > > > > > > Ah-ha! This works: > > p6rule('\d+ | ', 'PunieGrammar', 'term') > > (I experimented with several variations of syntax

Re: PGE::Text::bracketed added to PGE

2005-12-08 Thread Patrick R. Michaud
On Wed, Dec 07, 2005 at 05:34:50PM -0600, Patrick R. Michaud wrote: > On Wed, Dec 07, 2005 at 03:17:10PM -0800, Allison Randal wrote: > > Shouldn't it contain C? That is, shouldn't it > > remove the bracketing characters? Or at least hold the string without > >

Re: Three more shoot outs

2005-12-15 Thread Patrick R. Michaud
On Thu, Dec 15, 2005 at 11:15:20PM -0600, Joshua Isom wrote: > I noticed a slight glitch with the regex-dna benchmark. The benchmark > spec says to account for case insensitivity. So I added the :i > modifier to the patterns and just stuck to the p6 rules. But using the > :i modifier makes it

Re: Q: String.get_integer

2005-12-16 Thread Patrick R. Michaud
Leopold Toetsch wrote: >What is correct: > > new P0, .PerlString > set P0, "1E5" > set I0, P0# 1 or 100_000 100_000, please. But also note that for .PerlString, we ought to also have (from S02): "0x" # 65535 "0b100010001000" # 2184 "0o4210"

Re: [perl #37965] ^^ and PGE's P6 rules

2005-12-16 Thread Patrick R. Michaud
On Fri, Dec 16, 2005 at 04:08:27PM -0800, Joshua Isom wrote: > # New Ticket Created by Joshua Isom > # Please include the string: [perl #37965] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/rt3/Ticket/Display.html?id=37965 > > > > Is PGE's ^^ b

Re: Three more shoot outs

2005-12-16 Thread Patrick R. Michaud
On Fri, Dec 16, 2005 at 10:56:21PM -0600, Joshua Isom wrote: > Anyway, I've got it working uses all the regexes. I stuck to the p6 > rules, and kept the hash to print out the regex they want to see. It's > been running now for an hour now and it hasn't even reached the main > matching yet for

Re: PGE infinite loop bug

2005-12-26 Thread Patrick R. Michaud
On Fri, Dec 23, 2005 at 12:17:16PM +, Luke Palmer wrote: > The following causes PGE to infinite loop: > > "x" ~~ /[ [ x ]* ]*/ > Thanks -- PGE doesn't yet handle repetitions of zero-length substrings. It's on the TODO list; I worked on it a couple of weeks ago but had to stop to re-think

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: Threading PDD?

2005-12-26 Thread Patrick R. Michaud
On Fri, Dec 23, 2005 at 09:33:42PM +0100, Klaas-Jan Stol wrote: > Hi, > > I'm wondering, is there a PDD about Thread implementation in Parrot? I > searched the list archive, and found a lot of info. Dan even mentioned > writing a PDD on the subject, but I havent' been able to find it. This ques

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: [perl #38406] [BUG] PGE - truncating PIR code generated by p6rule

2006-02-02 Thread Patrick R. Michaud
On Thu, Feb 02, 2006 at 11:33:25AM +0100, Leopold Toetsch wrote: > On Feb 2, 2006, at 2:33, Allison Randal (via RT) wrote: > > >I've spent too much time on this error, so I'm routing around it, but > >I'd love to figure out what's causing it. In my local version of > >Punie I get this error when I

Re: [perl #38406] [BUG] PGE - truncating PIR code generated by p6rule

2006-02-02 Thread Patrick R. Michaud
On Thu, Feb 02, 2006 at 01:32:49PM -0800, jerry gay wrote: > > This may or may not be related, but I'm getting a segfault for > > building PGE itself (x86_64/linux), when trying to run mklib.pir > > to generate the built-in rules. > > > i'm getting this, too, on win32. as are others, i think, on ma

Re: [perl #38406] [BUG] PGE - truncating PIR code generated by p6rule

2006-02-02 Thread Patrick R. Michaud
On Wed, Feb 01, 2006 at 05:33:29PM -0800, Allison Randal wrote: > # New Ticket Created by Allison Randal > # Please include the string: [perl #38406] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/rt3/Ticket/Display.html?id=38406 > > > > I've sp

Re: [perl #38406] [BUG] PGE - truncating PIR code generated by p6rule

2006-02-04 Thread Patrick R. Michaud
On Fri, Feb 03, 2006 at 03:47:11PM -0800, Allison Randal wrote: > > It's only in my local svk repository. I'll push it so others can work > on the bug (and try it out on multiple platforms). I temporarily > added a test file language/punie/t/problematic.t that isolates the > failing test (ma

Re: PGE vs bindings (was Re: embparrot still has two failures)

2006-02-05 Thread Patrick R. Michaud
On Sun, Feb 05, 2006 at 11:34:33AM +0800, Audrey Tang wrote: > That seems to be a fatal error at PGE's side: > >$ echo 'rule $x:=[]' | parrot demo.pir >error:imcc:syntax error, unexpected ']' >in file 'EVAL_2' line 79 I've now updated PGE (r11427) so that it provides a more useful e

Re: PGE vs bindings (was Re: embparrot still has two failures)

2006-02-06 Thread Patrick R. Michaud
On Mon, Feb 06, 2006 at 08:50:02AM +0800, Audrey Tang wrote: > On 2/6/06, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > On Sun, Feb 05, 2006 at 11:34:33AM +0800, Audrey Tang wrote: > > > That seems to be a fatal error at PGE's side: > > > > >

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: Perl 6 Summary for 2006-01-24 though 2006-02-07

2006-02-07 Thread Patrick R. Michaud
On Tue, Feb 07, 2006 at 10:08:46PM -0500, Matt Fowles wrote: >PGE Binding > Audrey noticed a problem convincing PGE to alias a scalar. Patrick > explained that it was not yet implemented. Oops! I forgot to mention to the list(s) that I've since fixed PGE so that it is able to parse sc

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: Next release ...

2006-02-15 Thread Patrick R. Michaud
On Thu, Feb 16, 2006 at 01:42:50AM +0100, Leopold Toetsch wrote: > The next release is delayed a bit, you might already have noticed that. > > The reason is: GPW (German Perl Workshop) is at the beginning of March, > then a hackaton with Audrey will follow. This would collide with the > March re

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: Allowing push/pop across sub calls

2006-02-22 Thread Patrick R. Michaud
On Wed, Feb 22, 2006 at 09:52:34PM -0500, Bob Rogers wrote: Content-Description: message body text >The good news is that the attached patch makes this work. The bad > news is that it also breaks PGE, albeit in a small way. Six of the > "" tests (mostly, but not exclusively, involving "") in

Re: Allowing push/pop across sub calls

2006-02-22 Thread Patrick R. Michaud
On Wed, Feb 22, 2006 at 09:52:34PM -0500, Bob Rogers wrote: Content-Description: message body text >The good news is that the attached patch makes this work. The bad > news is that it also breaks PGE, albeit in a small way. Six of the > "" tests (mostly, but not exclusively, involving "") in

Re: Allowing push/pop across sub calls

2006-02-22 Thread Patrick R. Michaud
On Wed, Feb 22, 2006 at 09:52:34PM -0500, Bob Rogers wrote: Content-Description: message body text >The good news is that the attached patch makes this work. The bad > news is that it also breaks PGE, albeit in a small way. Six of the > "" tests (mostly, but not exclusively, involving "") in

Re: Allowing push/pop across sub calls

2006-02-22 Thread Patrick R. Michaud
On Wed, Feb 22, 2006 at 10:06:22PM -0600, Patrick R. Michaud wrote: > Based on the trace I just looked at, it appears that a save opcode > executed inside a coroutine -- the coroutine generated to handle > the subrule -- is indeed affecting the results of a > restore in the caller an

Re: Allowing push/pop across sub calls

2006-02-23 Thread Patrick R. Michaud
On Thu, Feb 23, 2006 at 10:37:00AM +0100, Leopold Toetsch wrote: > > On Feb 23, 2006, at 5:06, Patrick R. Michaud wrote: > >PGE does not expect that a sub will restore the state of the user > >stack, but it does expect that *coroutines* get their own copy of > >the user

Re: User stack: Worthwhile?

2006-03-02 Thread Patrick R. Michaud
On Mon, Feb 27, 2006 at 09:46:42AM -0800, Chip Salzenberg wrote: > On Fri, Feb 24, 2006 at 12:57:24AM +0100, Leopold Toetsch wrote: > > On Feb 24, 2006, at 0:23, Patrick R. Michaud wrote: > > >>[...] > > >I've just committed an update (r11722) that eliminates PGE

Re: more pdd21 questions (PIR users: please read)

2006-03-14 Thread Patrick R. Michaud
On Tue, Mar 14, 2006 at 08:03:02AM -0800, Chip Salzenberg wrote: > (NOTE: I invite PIR users to read this msg, and especially item #5, and let > me know whether you'll suffer any breakage when/if Parrot default namespaces > go untyped, i.e. when you're no longer allowed to have a namespace and a >

Re: Support for S05's new "result object"?

2006-03-14 Thread Patrick R. Michaud
On Wed, Mar 15, 2006 at 06:50:53AM +0800, Audrey Tang wrote: > Heya. Today I noted with delight that PGE supports interpolation of > closures: > > $ parrot demo.pir > rule Foo {{ print "Hello" }} > > Though the Perl 6 form is {...} instead of {{...}} -- is that intentional? Yes, it's in

Combining :slurpy and :optional

2006-03-16 Thread Patrick R. Michaud
This is a message primarily for Chip -- Question: As a possibly useful optimization, can we declare that :slurpy parameters can also be :optional, as in...? .param pmc argv :slurpy :optional .param int has_argv :opt_flag .param pmc modifiers :slurpy :named :opt

PGE internal attributes change

2006-03-17 Thread Patrick R. Michaud
Just a quick note that in r11916 I've updated PGE's internal attribute names to match the new secondary sigils identified by S12. Thus, @:capt is now @!capt, &:corou is now &!corou, etc. (For the pugs folks, I updated the Hs.pir file as well.) This shouldn't have much of an impact on anyone usi

PGE: return values in embedded closures

2006-03-17 Thread Patrick R. Michaud
I've just applied a change (r11921) to PGE that allows embedded closures in rules to designate a "return value" for a match (recently added to S05). Essentially this means that a rule such as /:lang(PIR) foo {{ .return "bar" }} / will match a string containing "foo" but gives the returned ma

PGE update fails some tests under x86_64

2006-03-17 Thread Patrick R. Michaud
On Fri, Mar 17, 2006 at 07:08:55PM -0600, Patrick R. Michaud wrote: > I've just applied a change (r11921) to PGE that allows > embedded closures in rules to designate a "return value" for > a match (recently added to S05). > [...] I neglected to mention in my previous

Re: [perl #38800] Strange dump output from PGE (x86_64 related?)

2006-03-26 Thread Patrick R. Michaud
On Sun, Mar 26, 2006 at 03:10:31PM +0200, Leopold Toetsch wrote: > > On Mar 25, 2006, at 5:11, Patrick R.Michaud (via RT) wrote: > > >I'm running a fresh checkout of r12014. I wrote a simple test > >program (t.pir attached) that uses "dumper.pir" to dump the > >contents of one of PGE's internal

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: [perl #32507] [TODO] ResizableIntegerArray missing vtables (e.g., pop)

2006-04-06 Thread Patrick R. Michaud
On Thu, Apr 06, 2006 at 01:46:09PM -0700, Bernhard Schmalhofer via RT wrote: > As PGE nowadays happily works with Parrot standard PMCs, I assume that > this old issue has been taken care of. Actually, this particular todo item didn't have anything to do with PGE. Leo and I were conversing about

Re: [perl #32642] [TODO] Remove Perl* PMCs from parrot's basic PMCs, src and languages

2006-04-06 Thread Patrick R. Michaud
On Thu, Apr 06, 2006 at 02:04:06PM -0700, Bernhard Schmalhofer via RT wrote: > Hi, > > as far as I see, the Perl* PMCs are no longer used in the Parrot core. > > There is still some usage in unmaintained language implementations: > > BASIC/compiler unmaintained ? > BASIC/interpreter unma

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: [perl #38888] PGE::P5Regexp failures.

2006-04-09 Thread Patrick R. Michaud
On Sun, Apr 09, 2006 at 12:13:23PM -0700, Will Coleda wrote: > Tcl test suite has some failures. At least some of these are due to > the following issue in PGE::P5Regexp : > > $ cat foo.tcl >array set a [list a b] > puts [array get a] > $ ../../parrot tcl.pbc foo.tcl Global 'parse_ws_l

Re: [perl #38896] [TODO] Integer PMC missing math methods.

2006-04-11 Thread Patrick R. Michaud
On Tue, Apr 11, 2006 at 08:30:09PM +0100, Nicholas Clark wrote: > On Tue, Apr 11, 2006 at 07:05:33AM -0700, Will Coleda wrote: > > > P1 = new .Float > > P1 = 123 > > > The assignment of 123 autoconverts the float to an integer, which > > doesn't support the 'exp' method that's defined in the Fl

Re: [perl #38888] PGE::P5Regexp failures.

2006-04-11 Thread Patrick R. Michaud
On Mon, Apr 10, 2006 at 10:41:50AM +0100, Jonathan Worthington wrote: > "Patrick R. Michaud" <[EMAIL PROTECTED]> wrote: > >At any rate, I suspect pbc_merge is the culprit. > > > If you have any simple(-ish ;-) test cases that demonstrate the particular > issue

Re: [perl #38931] [RFE] Double-quoted strings automatically determine string type

2006-04-16 Thread Patrick R. Michaud
On Sun, Apr 16, 2006 at 11:36:10AM -0700, Nicholas Clark via RT wrote: > IIRC having ASCII as the default was a deliberate design choice to avoid > the confusion of "is it iso-8859-1 or is it utf-8" when encountering a > string literal with bytes outside the range 0-127. Reasonable. Essentially

Re: [perl #38931] [RFE] Double-quoted strings automatically determine string type

2006-04-16 Thread Patrick R. Michaud
On Sun, Apr 16, 2006 at 04:41:05PM -0500, Patrick R. Michaud wrote: > > If PGE is always outputting UTF-8 literals, what stops it from always > > prefixing every literal "unicode:", even if it only uses Unicode characters > > 0 to 127? > [...] > Also, once i

Re: [svn:parrot] r12294 - trunk/languages/perl6/lib

2006-04-17 Thread Patrick R. Michaud
On Mon, Apr 17, 2006 at 07:25:27PM +0100, Nicholas Clark wrote: > On Mon, Apr 17, 2006 at 10:15:40AM -0700, [EMAIL PROTECTED] wrote: > > * grammar_rules.pge - support for POD sections. > > ## This rule handles whitespace and comments between tokens. > > -## XXX: Add pod directive handling > > >

Re: [perl #38931] [RFE] Double-quoted strings automatically determine string type

2006-04-18 Thread Patrick R. Michaud
On Sun, Apr 16, 2006 at 06:24:58PM -0700, Audrey Tang via RT wrote: > Nicholas Clark wrote: > > IIRC having ASCII as the default was a deliberate design choice to avoid > > the confusion of "is it iso-8859-1 or is it utf-8" when encountering a > > string literal with bytes outside the range 0-127.

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

Updated PGE

2006-04-26 Thread Patrick R. Michaud
I've just checked in (r12442) a large set of updates to PGE; these updates are in response to recent changes in S05, as well as to allow PGE to take advantage of recently-added Parrot features (e.g. named argument passing). As part of the update I also patched any language and/or other componen

Re: Hundreds of errors?

2006-04-28 Thread Patrick R. Michaud
On Fri, Apr 28, 2006 at 11:02:53AM -0400, Andy Dougherty wrote: > Something's gone horribly wrong after the recent PGE check-in. I don't > actually think it's in PGE, just that the new PGE is triggering some other > bugs elsewhere in parrot (that have been showing up in t/library/dumper.t > rec

Updates to perl6/pge compiler

2006-05-03 Thread Patrick R. Michaud
For those who have not been following along closely in the Parrot repository, the languages/perl6/ directory contains the fledgling beginnings of an entirely Parrot-based compiler for Perl 6. It's able to parse and execute most expressions and some simple statements, and will likely expand rapidl

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: HLL's, PMCs...

2006-05-14 Thread Patrick R. Michaud
On Sun, May 14, 2006 at 04:17:31PM -0400, Will Coleda wrote: > Is it possible to load a languages PMCs and create the .PMCtype > constants without using the .HLL pragma? Try :immediate. .sub _immediate :immediate $P1 = loadlib 'tcl_group' .end .sub main :main $P1 =

Re: [perl #39135] Problem with concat on Match objects

2006-05-15 Thread Patrick R. Michaud
On Mon, May 15, 2006 at 03:29:23AM -0700, Leopold Toetsch via RT wrote: > Patrick R.Michaud (via RT) wrote: > > > I've run into the following problem using concat with > > Match objects from PGE. The code below performs a match, > > then attempts to concatenate a string with the results > > of th

Re: lvalues and "is rw" parameter passing

2006-05-16 Thread Patrick R. Michaud
On Tue, May 16, 2006 at 09:00:17AM -0700, Chip Salzenberg wrote: > On Fri, Apr 14, 2006 at 06:17:01PM -0500, Patrick R. Michaud wrote: > > How would you envision doing something like the following > > Perl 6 in PIR? > > > > sub foo($x is rw) { &g

Re: :immediate behaviour

2006-05-19 Thread Patrick R. Michaud
On Thu, May 18, 2006 at 01:01:13PM +0200, Klaas-Jan Stol wrote: > hi, > > if I understand correctly, the :immediate pragma makes the sub which has > this pragma run immediately after parsing (well, at least before running > the program) > > Suppose I have this code: > >.sub loadstuff :imme

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: [perl #39483] [TODO] fix PGE::OpTable comments, test.

2006-06-21 Thread Patrick R. Michaud
On Thu, Jun 15, 2006 at 07:58:39AM -0700, Will Coleda wrote: > > This is a valid PGE::OpTable grammar: > > grammar _Tcl::Grammar::Expr; > > ##proto 'prefix:-' is precedence('1=') {...} > > ... > > This is not: > > grammar _Tcl::Grammar::Expr; > > #proto 'prefix:-' is precedence('1=') {...}

Re: lexical lookup and OUTER::

2006-06-23 Thread Patrick R. Michaud
On Fri, Jun 23, 2006 at 01:16:22PM -0700, Chip Salzenberg wrote: > On Fri, Jun 23, 2006 at 08:27:04AM -0700, jerry gay wrote: > > audreyt++ pointed out on #parrot that there doesn't seem to be a way > > to specify where to start finding lexicals, in support of perl's > > OUTER::. eg. (from S04): >

Re: lexical lookup and OUTER::

2006-06-24 Thread Patrick R. Michaud
On Sat, Jun 24, 2006 at 08:03:47AM -0700, Audrey Tang wrote: > 2006/6/24, Nicholas Clark <[EMAIL PROTECTED]>: > >Is Parrot assembler considered a more productive language to write in than > >C? > >If yes, is it logical to write opcodes such as this one in Parrot assembler > >itself? > > Err, well

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 =

  1   2   3   4   5   6   7   8   9   10   >