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

2007-01-07 Thread larry
Author: larry Date: Sun Jan 7 19:13:17 2007 New Revision: 13518 Modified: doc/trunk/design/syn/S03.pod Log: [particle]++ points out that an autocalled top method should be called TOP. Modified: doc/trunk/design/syn/S03.pod

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

2007-01-07 Thread jerry gay
On 1/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: +Matching against a C object will call the C method +defined in the grammar. The C method may either be a rule +itself, or may call the actual top rule automatically. How the +C determines the top rule is up to the grammar, but normal +Per

Re: 99problems: 9, 11, 13

2007-01-07 Thread Ovid
--- gabriele renzi <[EMAIL PROTECTED]> wrote: > Hi people, > > I implemented 13 from scratch because I didn't know it was already > solved, in this way > I think it's cleaner, shall I commit? I definitely think your solution is cleaner, but I'd be more inclined to see multiple solutions to pro

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

2007-01-07 Thread Luke Palmer
On 1/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote Author: larry Date: Sun Jan 7 00:50:30 2007 New Revision: 13515 Modified: doc/trunk/design/syn/S03.pod +$_$xType of Match Implied Match if +=== = = +Any

Re: perl6-ish idiom for code and tests in one file

2007-01-07 Thread gabriele renzi
Larry Wall ha scritto: but the autocall into MAIN is not yet implemented. You can emulate by putting something like this as the last line in your file: MAIN(@ARGS), exit if $?FILE eq $*PROGRAM_NAME; or maybe MAIN(@ARGS), exit unless caller; if/when that works as in Perl 5. When the

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

2007-01-07 Thread Larry Wall
On Sun, Jan 07, 2007 at 11:42:05AM +, Luke Palmer wrote: : >+Any .foo method truth?any($_.foo) : : So... why the any() ? (0,"",undef,0) should be considered false? Just trying to carry the "intersection" idea through to a method that might return a list of things.

Re: perl6-ish idiom for code and tests in one file

2007-01-07 Thread gabriele renzi
Larry Wall ha scritto: On Fri, Jan 05, 2007 at 01:40:44PM +0200, Gaal Yahas wrote: : > I think it should be possible and nice to use a macro (possibly a : > standard subroutine, I'm not sure) like : > : > testing { : > ok foo; : > } : > : > would it make sense or I'm just crazy? : : I like

99problems: 9, 11, 13

2007-01-07 Thread gabriele renzi
Hi people, I implemented 13 from scratch because I didn't know it was already solved, in this way sub encode_direct([EMAIL PROTECTED] is copy) returns Str { my ($packed, $count); while @array { if @array[0] eq @array[1] { $count++; } else { $packed

Re: [perl #41198] [TODO] tools/dev/mk_manifest_and_skip.pl should be aware of MANIFEST.generated

2007-01-07 Thread jerry gay
On 1/7/07, via RT Bernhard Schmalhofer <[EMAIL PROTECTED]> wrote: # New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #41198] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=41198 > Hi, the files

Re: use diff for string in some test

2007-01-07 Thread Lee Duhem
On Sun, Jan 07, 2007 at 12:51:46PM +, Nicholas Clark wrote: > > I'm not convinced that allowing slop in expected output is a good idea. Sometime allow some slop is convenient, like the situation in t/examples/past.t > It introduces (more) complexity into the tests, which increases the chance

Re: [perl #41195] [BUG]: Change to Configure.pl causing 'make' to fail on Darwin

2007-01-07 Thread James Keenan
On Jan 7, 2007, at 8:44 AM, Steve Peters via RT wrote: What is your c++ symlink pointing at? [parrot] 512 $ ls -l /usr/bin/c++ lrwxr-xr-x 1 root wheel 7 Aug 9 2004 /usr/bin/c++ -> g++-3.3 [parrot] 513 $ ls -l /usr/bin/g++-3.3 -r-xr-xr-x 1 root wheel 135816 May 14 2006 /usr/bin/g

[perl #41201] [TODO] Remove temporary conf hack in Configure.pl

2007-01-07 Thread via RT
# New Ticket Created by Paul Cochrane # Please include the string: [perl #41201] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=41201 > In Configure.pl there is a mention of $Parrot::Configure::Step::conf being a temporary

Re: Patterns

2007-01-07 Thread Larry Wall
On Sun, Jan 07, 2007 at 03:33:19AM -0800, Jonathan Lang wrote: : IIRC, you don't even need .accepts for this. You could just say : : given $pattern { :when $a ~~ $_ { ... } :when $b ~~ $_ { ... } :when $c ~~ $_ { ... } : } : : ...since an explicit smart-match is a boolean expressio

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

2007-01-07 Thread larry
Author: larry Date: Sun Jan 7 08:16:06 2007 New Revision: 13517 Modified: doc/trunk/design/syn/S03.pod Log: Typos from (Aaron and Nick)ยป++ Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod

[perl #41195] [BUG]: Change to Configure.pl causing 'make' to fail on Darwin

2007-01-07 Thread Steve Peters via RT
What is your c++ symlink pointing at?

Re: use diff for string in some test

2007-01-07 Thread Bernhard Schmalhofer
Nicholas Clark schrieb: On Sun, Jan 07, 2007 at 03:34:41PM +0800, Lee Duhem wrote: I think we need some diff-like facility for string in Test::More (or somewhere else appropriate), these options of diff for files will be wanted: -E --ignore-tab-expansion Ignore changes due to tab expansio

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

2007-01-07 Thread Aaron Crane
[EMAIL PROTECTED] writes: > +the top rule. This may be overridden in either the base grammar or a > +derived grammer by explicitly naming a rule "top", or defining your There's a typo there -- "grammer" for "grammar". -- Aaron Crane

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

2007-01-07 Thread Nicholas Clark
On Sun, Jan 07, 2007 at 12:50:32AM -0800, [EMAIL PROTECTED] wrote: > +Num Num numeric equality+$_ == $x I don't think that you need that plus sign ^ You don't write ~ for the analogous Str/Str case below: > +Capture Num numeric equality+$_ == $

Re: use diff for string in some test

2007-01-07 Thread Nicholas Clark
On Sun, Jan 07, 2007 at 03:34:41PM +0800, Lee Duhem wrote: > I think we need some diff-like facility for string in Test::More > (or somewhere else appropriate), these options of diff for files > will be wanted: > > -E --ignore-tab-expansion Ignore changes due to tab expansion. > -b --ignore-s

[perl #41198] [TODO] tools/dev/mk_manifest_and_skip.pl should be aware of MANIFEST.generated

2007-01-07 Thread via RT
# New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #41198] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=41198 > Hi, the files compilers/imcc/imcparser.c comp

use diff for string in some test

2007-01-07 Thread Lee Duhem
I think we need some diff-like facility for string in Test::More (or somewhere else appropriate), these options of diff for files will be wanted: -E --ignore-tab-expansion Ignore changes due to tab expansion. -b --ignore-space-change Ignore changes in the amount of white space. -w --ignore

[BUG]: io/io_win32.c

2007-01-07 Thread Xi Wang
There are 4 calls to _close on io->fd in functions PIO_win32_send and PIO_win32_recv. However, the CRT function _close should not be applied on SOCKET, which crashes here. I suggest to replace "_close((SOCKET)io->fd);" by "PIO_win32_close(interp, layer, io);" or "closesocket((SOCKET)io->fd); io->

Re: Patterns

2007-01-07 Thread Jonathan Lang
Larry Wall wrote: Lots of interesting ideas. But I don't think the reverse-test situation will arise all that frequently. How 'bout we let the user just say: my macro statement_control: { "when .accepts: " } or some such... IIRC, you don't even need .accepts for this. You could just sa

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

2007-01-07 Thread larry
Author: larry Date: Sun Jan 7 01:39:34 2007 New Revision: 13516 Modified: doc/trunk/design/syn/S03.pod Log: Clarification on how a Grammar pattern finds its top rule. Modified: doc/trunk/design/syn/S03.pod == --- do