Re: refcounts and DOD

2005-05-26 Thread Leopold Toetsch
Michal Wallace wrote: It seems that instead of looking at the *count* of references, the DOD system actually walks through the graph of references. So it seems you could fake refcounting just by adding references and removing pointers from somewhere in the tree that gets walked. Yes, as Nick

Re: [perl #35976] [PATCH] Add Unicode, Hex, and Octal escapes to Tcl

2005-05-26 Thread Leopold Toetsch
Will Coleda (via RT) wrote: The attached patch provides a (possibly naive) implementation of the remaining escape characters from: Withouht further looking: can't you use src/string.c:string_unescape_cstring(), which has all these escapes already? leo

Re: 'char constant' in PIR

2005-05-26 Thread Leopold Toetsch
Bob Rogers wrote: A syntax for specifying multiple characters without escapes seems like a useful thing, a la Perl5, but being unable to specify an encoding or charset seems less useful, even for a single character. This is probably rather simply to fix: attach the same lexer rules to

[perl #35980] [PATCH] configure GMP with MinGW32

2005-05-26 Thread François
# New Ticket Created by Franois PERRAD # Please include the string: [perl #35980] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35980 This small patch allows the configuration of GMP with MinGW32. And tests are

Re: (1,(2,3),4)[2]

2005-05-26 Thread Markus Laire
Rod Adams wrote: TSa (Thomas Sandlaß) wrote: You mean @a = [[1,2,3]]? Which is quite what you need for multi dimensional arrays anyway @m = [[1,2],[3,4]] and here you use of course @m[0][1] to pull out the 2. I'm not sure if this automatically makes the array multi-dimensional to the type

Re: (1,(2,3),4)[2]

2005-05-26 Thread Markus Laire
Rod Adams wrote: Austin Hastings wrote: --- Rod Adams [EMAIL PROTECTED] wrote: TSa (Thomas Sandlaß) wrote: @m = [[1,2],[3,4]] @m[0;1] is a multidim deref, referencing the 4. Referencing the 2, I hope? Doh! Yes, the 2. Really? @m here has _single_ array-ref so @m[0] returns that

Re: (1,(2,3),4)[2]

2005-05-26 Thread Rod Adams
Markus Laire wrote: Rod Adams wrote: TSa (Thomas Sandlaß) wrote: You mean @a = [[1,2,3]]? Which is quite what you need for multi dimensional arrays anyway @m = [[1,2],[3,4]] and here you use of course @m[0][1] to pull out the 2. I'm not sure if this automatically makes the array

Re: (1,(2,3),4)[2]

2005-05-26 Thread Juerd
Rod Adams skribis 2005-05-26 4:15 (-0500): From S02: Array and hash variable names in scalar context automatically produce references. Since [...] produces a scalar arrayref, we end up with an arrayref one both sides of the =. No. There is no scalar context on the LHS of the assignment

Re: [perl #35976] [PATCH] Add Unicode, Hex, and Octal escapes to Tcl

2005-05-26 Thread William Coleda
Because this appears to have been written primarily for perl implementors. It does the following escapes: 1 \xhh1..2 hex digits 2 \ooo1..3 oct digits 3 \cX control char X 4 \x{h..h}1..8 hex digits 5 \u 4 hex digits 6 \U 8 hex

Re: refcounts and DOD

2005-05-26 Thread Dan Sugalski
At 6:08 PM -0400 5/25/05, Michal Wallace wrote: So I'm still thinking about a generic wrapper for python modules. I would like to be able to recompile the python standard library (and other libraries) to run on parrot with only a few minor patches. If you're doing this to make the python

Re: (1,(2,3),4)[2]

2005-05-26 Thread Rob Kinyon
Is giving = a higher precedence than , still considered A Good Thing? I'm not familiar with the reasoning behind the current situation, but I'm struggling to come up with any good reasons for keeping it. Consider the alternative: my $a, $b = 1, 2; # $b should contain 2, not 1 I read

Re: Module suggestion

2005-05-26 Thread Adam Kennedy
Have you had a look at CGI::Capture? That may do some things you can abuse to get what you want. Adam K Vsevolod Ilyushchenko wrote: Hi, I'd like to suggest a module that I came up with to test CGI file uploading logic. I have not found anything else like it. If anyone has any thoughts on

Re: Syntax of using Perl5 modules?

2005-05-26 Thread Adam Kennedy
On the migration front, when someone ports Digest.pm to Perl6, I get a free upgrade, assuming the module author was kind enough to up the version number. You are making a pretty huge assumption here that whoever has a namespace in p5 CPAN has first dibs at the P6 namespace of the same name,

Re: Virtual methods

2005-05-26 Thread Aaron Sherman
On Wed, 2005-05-25 at 09:11, Piers Cawley wrote: Aaron Sherman [EMAIL PROTECTED] writes: There are many gotchas that fall out of that. For example, you might have a special role that overrides .print to handle structured data, so your code says: my Foo $obj; given $obj {

Re: [perl #35980] [PATCH] configure GMP with MinGW32

2005-05-26 Thread Leopold Toetsch
Franois PERRAD (via RT) wrote: This small patch allows the configuration of GMP with MinGW32. And tests are OK. But only on MinGW32 maybe ;-) On my linux box gmp isn't linked in any more. I'd say keep the OS test as is, but exclude MinGW. And there are a lot compilers that aren't gcc but

Re: comprehensive list of perl6 rule tokens

2005-05-26 Thread Patrick R. Michaud
On Tue, May 24, 2005 at 08:25:03PM -0400, Jeff 'japhy' Pinyan wrote: I have looked through the latest revisions of Apo05 and Syn05 (from Dec 2004) and come up with the following list: http://japhy.perlmonk.org/perl6/rules.txt I'll review the list below, but it's also worthwhile to read

Re: comprehensive list of perl6 rule tokens

2005-05-26 Thread Patrick R. Michaud
Rather than answer each message in this thread individually, I'll try to aggregate them here. Disclaimer: These are just my interpretations of how rules are defined; I'm not the one who decides how they *should* be defined. On Wed, May 25, 2005 at 10:55:59AM -0400, Jeff 'japhy' Pinyan wrote:

Re: Reductions, junctions, hashslices, and cribbage scoring

2005-05-26 Thread John Williams
On Wed, 25 May 2005, Rob Kinyon wrote: (This post references the discussion at http://www.perlmonks.org/?node_id=458728, particularly dragonchild's response at the bottom.) For those who don't know, cribbage is a game where each player has access to 4 cards, plus a community card. Various

Re: Perl6 and support for Refactoring IDE's

2005-05-26 Thread Piers Cawley
Stevan Little [EMAIL PROTECTED] writes: On May 25, 2005, at 5:39 AM, Piers Cawley wrote: One of the 'mental apps' that's been pushing some of the things I've been asking for in Perl 6's introspection system is a combined refactoring/debugging/editing environment for the language. Maybe I

Re: comprehensive list of perl6 rule tokens

2005-05-26 Thread Patrick R. Michaud
On Wed, May 25, 2005 at 08:28:11AM -0700, Mark A. Biggar wrote: Jeff 'japhy' Pinyan wrote: Yeah, that was going to be my next step, except that the unknowing person might make a sub-rule of their own called, say, Zs, and then which would take precedence? Perhaps prop:X is a good way of

Re: Perl development server

2005-05-26 Thread Marco Romano
Hi All! If you want access, please let me know. I will send you a temporary password by e-mail, that I expect you to change the first time you get the chance. May i have an account name nemux ? Thanks! Marco.

Re: Reductions, junctions, hashslices, and cribbage scoring

2005-05-26 Thread Rob Kinyon
Assuming you write the subset coroutine above, how about $score += ( subsets(0..4) == map { 2 * (15 == [+] @[EMAIL PROTECTED]) } == [+] ) Working on it last night and this morning, I ended up with the following, very similar rewrite. sub gen_idx_powerset (Int $size is copy) returns

Sets (was: Reductions, junctions, hashslices, and cribbage scoring)

2005-05-26 Thread Patrick R. Michaud
On Thu, May 26, 2005 at 11:03:15AM -0600, John Williams wrote: I proposed the following: # Fifteens $score += 2 * all( 15 == [EMAIL PROTECTED] any( 0 .. 4 ) } ); * Is this syntax legal? I think so. * Does it do what I want it to do? Definitely not. First, apologies in

Re: Syntax of using Perl5 modules?

2005-05-26 Thread Rod Adams
Adam Kennedy wrote: On the migration front, when someone ports Digest.pm to Perl6, I get a free upgrade, assuming the module author was kind enough to up the version number. You are making a pretty huge assumption here that whoever has a namespace in p5 CPAN has first dibs at the P6

Re: (1,(2,3),4)[2]

2005-05-26 Thread Rod Adams
Juerd wrote: Rod Adams skribis 2005-05-26 4:15 (-0500): From S02: Array and hash variable names in scalar context automatically produce references. Since [...] produces a scalar arrayref, we end up with an arrayref one both sides of the =. No. There is no scalar context on the LHS

Re: RFC - Class::Agreement

2005-05-26 Thread Adrian Howard
On 23 May 2005, at 15:33, Ian Langworth wrote: I'm working on a new module, Class::Agreement, and I've started by writing the documentation. If anyone has a few minutes, I'd like some feedback as to whether my descriptions of the concepts make sense and if you like the syntax. HTML:

$*OS and OS::* mixins

2005-05-26 Thread Rob Kinyon
I was thinking on the drive home how to write some of the File::Spec functions in P6. I realized that it would be really neat if $*OS did one of a bunch of mixins (maybe OS::unix, OS::win32, OS::vms, etc). That way, you could multimethod the various functions, using junctions and Any to provide a

Re: comprehensive list of perl6 rule tokens

2005-05-26 Thread Jeff 'japhy' Pinyan
On May 26, Patrick R. Michaud said: On Tue, May 24, 2005 at 08:25:03PM -0400, Jeff 'japhy' Pinyan wrote: I have looked through the latest revisions of Apo05 and Syn05 (from Dec 2004) and come up with the following list: http://japhy.perlmonk.org/perl6/rules.txt I'll review the list below,

Re: comprehensive list of perl6 rule tokens

2005-05-26 Thread Patrick R. Michaud
On Thu, May 26, 2005 at 07:05:41PM -0400, Jeff 'japhy' Pinyan wrote: Here the leading tokens are actually $, ::$, @, %, {, , and (, and I suspect we have ?$, ?::$, ?@, and !$, !::$, !@, etc. counterparts. Per your second message, [EMAIL PROTECTED] would mean !before @rules, right? I think

Re: Module suggestion

2005-05-26 Thread James E Keenan
Vsevolod Ilyushchenko wrote: Hi, I'd like to suggest a module that I came up with to test CGI file uploading logic. I have little experience with file uploads via CGI.pm, so let me pose some questions on more peripheral aspects of your proposal. test in what sense? Is this supposed to

Re: Pugs link error

2005-05-26 Thread Autrijus Tang
On Wed, May 25, 2005 at 09:29:56PM +0200, BRTHZI Andrs wrote: It helps for that error, but not for the other one. Still get this: I think rgs have fixed that one as well. Try again? You can use this as the test script -- it works for me: use DBI--perl5; unlink 'test.db'; my $dbh

BigInt.pmc patch

2005-05-26 Thread Kevin Tew
Adds tests and fixes incorrect implementation. Kevin Tew Index: classes/bigint.pmc === --- classes/bigint.pmc (revision 8168) +++ classes/bigint.pmc (working copy) @@ -203,44 +203,11 @@ } static void

Re: Sets

2005-05-26 Thread Sam Vilain
Patrick R. Michaud wrote: The continuing exchanges regarding junctions, and the ongoing tendency by newcomers to think of them and try to use them as sets, makes me feel that it might be worthwhile to define and publish a standard CSet class and operations sooner rather than later in Perl 6