Re: Nested captures

2005-05-09 Thread Damian Conway
Patrick R. Michaud wrote: On Mon, May 09, 2005 at 09:14:02AM -0700, Larry Wall wrote: : m/ (don't) (ray) (me) (for) (solar tea), (d'oh!) : | (every) (green) (BEM) (devours) (faces) : /; This seems like a rather ugly syntax for what is essentially a label, or a rule. I wonder

Re: Nested captures

2005-05-09 Thread Damian Conway
Larry Wall wrote: On Mon, May 09, 2005 at 12:14:35PM -0700, Larry Wall wrote: : On Mon, May 09, 2005 at 02:08:31PM -0500, Patrick R. Michaud wrote: : : Hmmm, then would $x.$j.2 then be equivalent to $x[$j-1][1] ? : : Ouch. Maybe that's a good reason to switch from 1-based to 0-based $ vars. No

Re: [perl #35361] [PATCH] Skip svn revision number if none exists

2005-05-09 Thread Leopold Toetsch
Andy Dougherty (via RT) wrote: In a release tarball, the .svn directories don't exist, so config/gen/revision.pl can't find the svn revision number. That's fine, but it's probably wiser in that case to not report "failed" during the Configure.pl process, but to simply skip over the missing numbe

Re: Zero-day rules implementation status in Pugs

2005-05-09 Thread Ph. Marek
On Monday 09 May 2005 19:36, Autrijus Tang wrote: > On Mon, May 09, 2005 at 10:51:53PM +1000, Damian Conway wrote: > > Autrijus wrote: > > >/me eagerly awaits new revelation from Damian... > > > > Be careful what you wish for. Here's draft zero. ;-) > > ...and here is my status report of the Zero-D

Re: Nested captures

2005-05-09 Thread Uri Guttman
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: DC> grammar Shell::Commands { DC> my $lastcmd; DC> rule cmd { $/:= | $/:= } DC> rule mv { $lastcmd:=(mv) $:=[ ]+ $:= } DC> rule cp { $lastcmd:=(cp) $:=[ ]+ $:= } DC> s

Re: Bug in Boolean.pmc

2005-05-09 Thread Juergen Boemmels
On Friday 06 May 2005 18:17, John Lenz wrote: > Hi, the following test fails because boolean.pmc actually registers the > global True as a false boolean, and no boolean for False. It is fixed with > the patch below. > > John > > > find_global P0, "True" > find_global P1, "False" > >

[PATCH] imcc/docs using .pir

2005-05-09 Thread Dino Morelli
On Mon, 9 May 2005, jerry gay wrote: >the '.imc' extension has recently fallen out of favor and is being >replaced with '.pir'. otherwise, looks good and works on >win32--msvc-7.1--perl-5.8.6. > I modified some of the .pod files in imcc/docs/ to reflect using .pir instead of .imc Patch attached.

Re: [PATCH] PGE::Hs for Pugs PGE support

2005-05-09 Thread Autrijus Tang
On Sun, May 08, 2005 at 10:25:43PM -0500, Patrick R. Michaud wrote: > On Mon, May 09, 2005 at 07:24:49AM +0800, Autrijus Tang wrote: > > Greetings. Attached is a patch that I'm currently using in Pugs's > > bundled PGE.pbc, in order to make PGE output properly escaped strings, > > in a format read

Re: Nested captures

2005-05-09 Thread Patrick R. Michaud
On Mon, May 09, 2005 at 08:43:39PM +, [EMAIL PROTECTED] wrote: > Can I say $*1, $*2, etc, to get perl5 flattened peren counting captures? > We need something like that to make perl5->perl6 translation easier; > otherwise we'd have to parse perl5 RE instead of just slapping on a ":p5". > Unle

[perl #35361] [PATCH] Skip svn revision number if none exists

2005-05-09 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #35361] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=35361 > In a release tarball, the .svn directories don't exist, so config/gen/revision.pl ca

Re: [PATCH] Cosmetic updates to MD5 library

2005-05-09 Thread Nick Glencross
jerry gay wrote: On 5/9/05, Nick Glencross <[EMAIL PROTECTED]> wrote: - load_bytecode "library/Digest/MD5.imc" + load_bytecode "Digest/MD5.imc" the '.imc' extension has recently fallen out of favor and is being replaced with '.pir'. otherwise, looks good and works on win32--msvc-7.1--perl

Re: [PATCH] Cosmetic updates to MD5 library

2005-05-09 Thread jerry gay
On 5/9/05, Nick Glencross <[EMAIL PROTECTED]> wrote: > - load_bytecode "library/Digest/MD5.imc" > + load_bytecode "Digest/MD5.imc" the '.imc' extension has recently fallen out of favor and is being replaced with '.pir'. otherwise, looks good and works on win32--msvc-7.1--perl-5.8.6. ~jerry

Re: [PATCH] Cosmetic updates to MD5 library

2005-05-09 Thread Nick Glencross
Nick Glencross wrote: Guys, this patch makes some small updates to the MD5 files. ... It would also be interesting for benchmarking, but I haven't got around to trying As a rough comparison running the md5sum.imc located in the examples directory (on Linux/AMD Athlon), I get: Empty file (to mea

Re: Nested captures

2005-05-09 Thread mark . a . biggar
Can I say $*1, $*2, etc, to get perl5 flattened peren counting captures? We need something like that to make perl5->perl6 translation easier; otherwise we'd have to parse perl5 RE instead of just slapping on a ":p5". Unless ":p5" also means that you get a single already fattened match objct.

[perl #35365] [PATCH] allow array of args for spawnw

2005-05-09 Thread via RT
# New Ticket Created by Jeff Horwitz # Please include the string: [perl #35365] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=35365 > the attached patch adds a new signature for spawnw so it can take a PMC array of argume

[PATCH] allow array of args for spawnw (fwd)

2005-05-09 Thread Jeff Horwitz
-- Forwarded message -- Date: Mon, 9 May 2005 14:32:22 -0400 (EDT) From: Jeff Horwitz <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PATCH] allow array of args for spawnw the attached patch adds a new signature for spawnw so it can take a PMC array of arguments rather than a

[PATCH] Cosmetic updates to MD5 library

2005-05-09 Thread Nick Glencross
Guys, this patch makes some small updates to the MD5 files. * Remove some code which was retained in case changes for 64-bit processors didn't work * Convert some macro temps to be .locals in calling function * Omit 'library' path in load_bytecode calls * General cleanup Leo's previously rep

Re: Nested captures

2005-05-09 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> On Mon, May 09, 2005 at 12:14:35PM -0700, Larry Wall wrote: LW> : On Mon, May 09, 2005 at 02:08:31PM -0500, Patrick R. Michaud wrote: LW> : : Hmmm, then would $x.$j.2 then be equivalent to $x[$j-1][1] ? LW> : LW> : Ouch. LW>

Re: Nested captures

2005-05-09 Thread Larry Wall
On Mon, May 09, 2005 at 12:14:35PM -0700, Larry Wall wrote: : On Mon, May 09, 2005 at 02:08:31PM -0500, Patrick R. Michaud wrote: : : Hmmm, then would $x.$j.2 then be equivalent to $x[$j-1][1] ? : : Ouch. Maybe that's a good reason to switch from 1-based to 0-based $ vars. Not sure what that w

Re: Nested captures

2005-05-09 Thread Larry Wall
On Mon, May 09, 2005 at 02:08:31PM -0500, Patrick R. Michaud wrote: : Hmmm, then would $x.$j.2 then be equivalent to $x[$j-1][1] ? Ouch. Larry

Re: Nested captures

2005-05-09 Thread Patrick R. Michaud
On Mon, May 09, 2005 at 11:34:10AM -0700, Larry Wall wrote: > On Mon, May 09, 2005 at 10:33:33AM -0500, Patrick R. Michaud wrote: > : After thinking on this a bit, I'm hoping we don't do this -- at least not > : initially. I'm not sure there's a lot of advantage of C< $1.1 > over > : C< $1[0] >,

Re: Nested captures

2005-05-09 Thread Larry Wall
On Mon, May 09, 2005 at 10:33:33AM -0500, Patrick R. Michaud wrote: : After thinking on this a bit, I'm hoping we don't do this -- at least not : initially. I'm not sure there's a lot of advantage of C< $1.1 > over : C< $1[0] >, and one starts to wonder about things like $1.$j.2 and : $1[$j].2 a

Re: stdio

2005-05-09 Thread Aaron Sherman
Nothing makes you re-think your reply length like having your mailer lose your message ;-) A lot of your message revolves around this idea that there's a "normal file open" semantic. What I've tried (but clearly failed) to articulate previously is that this notion is becoming archaic in what is sh

Re: Nested captures

2005-05-09 Thread Uri Guttman
> "PRM" == Patrick R Michaud <[EMAIL PROTECTED]> writes: PRM> After thinking on this a bit, I'm hoping we don't do this -- at least not PRM> initially. I'm not sure there's a lot of advantage of C< $1.1 > over PRM> C< $1[0] >, and one starts to wonder about things like $1.$j.2 and P

Zero-day rules implementation status in Pugs

2005-05-09 Thread Autrijus Tang
On Mon, May 09, 2005 at 10:51:53PM +1000, Damian Conway wrote: > Autrijus wrote: > > >/me eagerly awaits new revelation from Damian... > > Be careful what you wish for. Here's draft zero. ;-) ...and here is my status report of the Zero-Day exploit, err, implementation, in Pugs. :-) Note that th

Re: NULL deference in real_exception

2005-05-09 Thread Nicholas Clark
On Thu, Apr 28, 2005 at 02:14:17PM +0200, Leopold Toetsch wrote: > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > > (gdb) p interpreter->exceptions > > $5 = (struct parrot_exception_t *) 0x0 > > > what should have initialised that? > > An exception structure is created per entering a run-loop, se

Re: Nested captures

2005-05-09 Thread Patrick R. Michaud
On Mon, May 09, 2005 at 09:14:02AM -0700, Larry Wall wrote: > : m/ (don't) (ray) (me) (for) (solar tea), (d'oh!) > : | (every) (green) (BEM) (devours) (faces) > : /; > > This seems like a rather ugly syntax for what is essentially a label, > or a rule. I wonder if we can com

Re: Nested captures

2005-05-09 Thread Patrick R. Michaud
On Mon, May 09, 2005 at 11:02:58AM -0500, Patrick R. Michaud wrote: > On Mon, May 09, 2005 at 09:47:14AM -0600, Paul Seamons wrote: > > > =item * > > > > > > Quantifiers (except C and C) cause a matched subrule or subpattern > > > to > > > return an array of C objects, instead of just a single obj

Re: Nested captures

2005-05-09 Thread Larry Wall
On Mon, May 09, 2005 at 10:33:33AM -0500, Patrick R. Michaud wrote: : > =head2 Subpattern numbering : > [...] : > Of course, the leading Cs that Perl 5 would produce do convey : > (albeit awkwardly) which alternative actually matched. If that : > information is important, Perl 6 has several far cle

Re: [perl #35330] [PATCH] Move Tcl PMCs out of dynclasses/

2005-05-09 Thread Leopold Toetsch
Matt Diephouse (via RT) wrote: This was done with the help of `svn mv`. It may be easier to give me a committer bit Yep. Confirmed. The ususal caveats apply: always "make test" before committing and don't forget to update MANIFEST, if files are added, moved, or deleted. This isn't meant to addr

Re: Nested captures

2005-05-09 Thread Larry Wall
On Mon, May 09, 2005 at 09:47:14AM -0600, Paul Seamons wrote: : > =item * : > : > Quantifiers (except C and C) cause a matched subrule or subpattern to : > return an array of C objects, instead of just a single object. : : What is the effect of the quantifiers C<**{0,1}> and C<**{0,1}?> ? That wo

Re: Nested captures

2005-05-09 Thread Patrick R. Michaud
On Mon, May 09, 2005 at 09:47:14AM -0600, Paul Seamons wrote: > > =item * > > > > Quantifiers (except C and C) cause a matched subrule or subpattern to > > return an array of C objects, instead of just a single object. > > What is the effect of the quantifiers C<**{0,1}> and C<**{0,1}?> ? Will th

Re: [PATCH] "Name not found" vs. "No applicable method"

2005-05-09 Thread Leopold Toetsch
Bob Rogers wrote: The following patch makes Parrot_get_name report a different error message if Parrot_MMD_search_default_func finds nothing, to distinguish this from the case where nothing is found. I am finding this helpful in debugging. But this seems like a band-aid, for two reasons:

Re: Nested captures

2005-05-09 Thread Paul Seamons
> =item * > > Quantifiers (except C and C) cause a matched subrule or subpattern to > return an array of C objects, instead of just a single object. What is the effect of the quantifiers C<**{0,1}> and C<**{0,1}?> ? Will they behave like ? and ?? and return a single object - or will they cause t

Re: Nested captures

2005-05-09 Thread Patrick R. Michaud
Here's some more commentary to draft zero of the capturing semantics (thanks, Damian!), based partially on PGE's current implementation. On Mon, May 09, 2005 at 10:51:53PM +1000, Damian Conway wrote: > [...] > =head2 Nested subpattern captures > [...] > There may also be shortcuts for accessing ne

Re: Fwd: Re: Pugs 6.2.0 released.

2005-05-09 Thread Rob Kinyon
What's really odd is that document links to http://en.wikipedia.org/wiki/Exclusive_disjunction which ends up stating that chained xors are associative and commutative, meaning that instead of acting as one(), it counts parity. Rob On 5/9/05, David Landgren <[EMAIL PROTECTED]> wrote: > Jonathan Wo

Re: [perl #34994] [TODO] make useful parts of Parrot config available at runtime

2005-05-09 Thread Leopold Toetsch
Leopold Toetsch (via RT) wrote: If you are embedding or extending Parrot and linked against libparrot you now have to additionally link with one of: src/null_config.o src/parrot_config.o # prefix := build-dir src/install_config.o # prefix := --prefix dir leo

Re: Fwd: Re: Pugs 6.2.0 released.

2005-05-09 Thread David Landgren
Jonathan Worthington wrote: "Juerd" <[EMAIL PROTECTED]> wrote: You both use "iff". What does that mean? I believe it's to be read "if and only if". Yes, but that doesn't explain what it means. Rather than me try to explain it (poorly)... http://en.wikipedia.org/wiki/If_and_only_if David

Re: [perl #34994] [TODO] make useful parts of Parrot config available at runtime

2005-05-09 Thread Leopold Toetsch
Leopold Toetsch (via RT) wrote: 3) "make install" creates src/parrot_config_install.c and links that into parrot_install$EXE, which during installation becomes .../bin/parrot$EXE. With this step we get rid of the problem with runtime vs build directory library usage. Done (rev 8028), with slight

Re: Nested captures

2005-05-09 Thread Damian Conway
Autrijus wrote: /me eagerly awaits new revelation from Damian... Be careful what you wish for. Here's draft zero. ;-) Note that there may still be bugs in the examples, or even in the design. @Larry has thrashed this through pretty carefully, and Patrick has implemented it for PGE, but it's 10.30

Re: Building a module with tests

2005-05-09 Thread Robert
"Andy Lester" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, May 06, 2005 at 11:43:53AM -0400, Robert ([EMAIL PROTECTED]) > wrote: >> > Go look at Module::Starter. >> >> Seems it is not available as a PPM for ActiveStates Perl distro. > > Please don't let that be an impedim

Re: runtime/parrot/library

2005-05-09 Thread Leopold Toetsch
Jonathan Scott Duff wrote: Is there some reason that runtime/parrot/library isn't in the list of search paths for both include_paths and dynext_paths? Fixed. load_bytecode "PGE.pbc"# should work now i.e. load_bytecode searches now: - runtime/parrot/library/ - runtime/parrot/ - ./ curren

Re: Nested captures

2005-05-09 Thread Autrijus Tang
On Mon, May 09, 2005 at 12:15:30PM +0100, Carl Franks wrote: > Are you subscribed to perl6-compiler? Yes, of course I am. :-) > Yesterday Patrick Michaud posted "PGE features update (corrections)" > which describes the results you've got: Ahh. I must've missed it. Thanks for the pointer. /me

Re: Nested captures

2005-05-09 Thread Damian Conway
I will be releasing a full description of the new capturing semantics in the next day or two. It will be appended to the appropriate Synopsis, but I'll also post it here. It may be as soon as tomorrow, but I'm away teaching this week, so my time is restricted. Damian

Re: Nested captures

2005-05-09 Thread Carl Franks
Are you subscribed to perl6-compiler? Yesterday Patrick Michaud posted "PGE features update (corrections)" which describes the results you've got: * Match objects for nested captures are nested into the surrounding capture object. Thus, given rulesub = p6rule(":w (let) ( (\w+) \:= (\S+) )"

Nested captures

2005-05-09 Thread Autrijus Tang
As Pugs now has Rule support via PGE (either with external parrot or a faster, linked libparrot), I've been playing with the new capturing semantics. Currently, matching "123" against /(.(.(.)))/ produces this: $0: 123 $1: 123 $1[0]: 23 $1[0][0]: 3 Instead of the Perl 5 behaviou

Re: [perl #34994] [TODO] make useful parts of Parrot config available at runtime

2005-05-09 Thread Leopold Toetsch
Leopold Toetsch (via RT) wrote: 1) We have F, which is a frozen image of the config hash generated by F. Creating the frozen image needs already parrot (a possibly already existing parrot or miniparrot in the long run). But locating this file needs the library or include path, with resides in t

Re: patch to is_cclass for offset beyond end of string

2005-05-09 Thread Leopold Toetsch
Patrick R. Michaud wrote: On Sun, May 08, 2005 at 11:45:08PM +0200, Jens Rieks wrote: Hi, C is now implemented. The second part (find_(not_)cclass) will follow tomorrow. Wow, that's fast The attached patch file adjusts C to always return false for offsets beyond the end of the string, and updates

patch to is_cclass for offset beyond end of string

2005-05-09 Thread Patrick R. Michaud
On Sun, May 08, 2005 at 11:45:08PM +0200, Jens Rieks wrote: > Hi, > > C is now implemented. The second part (find_(not_)cclass) will > follow tomorrow. The attached patch file adjusts C to always return false for offsets beyond the end of the string, and updates t/op/string_cclass.t to test th

Re: [PATCH] PGE::Hs for Pugs PGE support

2005-05-09 Thread Patrick R. Michaud
On Mon, May 09, 2005 at 07:24:49AM +0800, Autrijus Tang wrote: > Greetings. Attached is a patch that I'm currently using in Pugs's > bundled PGE.pbc, in order to make PGE output properly escaped strings, > in a format ready to be used form Haskell FFI. > > I'd appreciate comments, and if it's oka

Re: possible change to is_digit, is_wordchar, etc

2005-05-09 Thread Patrick R. Michaud
On Sun, May 08, 2005 at 11:45:08PM +0200, Jens Rieks wrote: > Hi, > > C is now implemented. The second part (find_(not_)cclass) will > follow tomorrow. Wow, yippee -- that is fast! There were several times yesterday when I really wished for find_not_cclass, so this will really clean up (and spe