Re: [perl #30683] t/pmc/fixedpmcarray.t test 9 counts system qsort hence fails

2004-07-13 Thread Leopold Toetsch
Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] wrote: See attached patch, which changes the test to use output_like instead of output_is. I really wish qr// worked with heredocs... Thanks, applied. BTW same problem as with b3.py, which compares compares leo

Re: cvs commit: parrot/src inter_run.c

2004-07-13 Thread Leopold Toetsch
Nicholas Clark [EMAIL PROTECTED] wrote: Log: C ne Perl - add in the missing return to a non-void function. Great, thanks. I'm currently permanently switching between C, Perl, and Python. That hurts sometimes. leo

enhanced open-funktion

2004-07-13 Thread perl6-all-return-52158-archive=jab . org
Hello, I have a wish for Perl 6. I would like if the open-funktion opens only a file if it doesn't exist. Of course, I can first test if the file exist. if (-e $filename) { print file already exists!; } else { open (FH, $filename) } My suggestion is to have a character for the

Re: scalar subscripting

2004-07-13 Thread Hans Ginzel
On Fri, Jul 09, 2004 at 05:02:48PM +0100, Jonathan Worthington wrote: Are there plans in Perl 6 for string modifiers? Not exactly. But method calls can be interpolated into strings, so most As they are in bash eg.: ${var%glob_or_regexp} ${var%%glob_or_regexp} my

regexp abbreviations matching

2004-07-13 Thread Hans Ginzel
Hello, I am missing, in Perl5, some shortcut for matching not whole word, e.g.: /^--v(?:e(?:r(?:s(?:i(?:on?)?)?)?)?)?$/ Would there be something in Perl6? For Perl5 I suggest somenthing like this /--v(?-ersion)$/ Best regards

wish: Parrot_sprintf_format %-XX{...%d...}

2004-07-13 Thread Hans Ginzel
Hello, I noticed recently a discusion about *printf*() function. I wish to be able to specify formating of groups of parameters. Eg. printf(Date: %11{%d.%d. %4d}, City: %s\n, $day, $mounth, $year); Variables $day and $mounth could be one or two digits. There should not be

Re: scalar subscripting

2004-07-13 Thread Luke Palmer
my $newfile = $str.subst(rx|\.\w+$|, '')\.bin; But what about the value of $str after interpolation? In shall it stays it's original value! I would often need, to use a little modified value of $str for a particular expression. I like the way shell does it, to be able to write

Re: enhanced open-funktion

2004-07-13 Thread Luke Palmer
[EMAIL PROTECTED] writes: Hello, I have a wish for Perl 6. I would like if the open-funktion opens only a file if it doesn't exist. Of course, I can first test if the file exist. if (-e $filename) { print file already exists!; } else { open (FH, $filename) } My

Re: regexp abbreviations matching

2004-07-13 Thread Luke Palmer
Luke Palmer writes: Hans Ginzel writes: Hello, I am missing, in Perl5, some shortcut for matching not whole word, e.g.: /^--v(?:e(?:r(?:s(?:i(?:on?)?)?)?)?)?$/ Would there be something in Perl6? Well, I don't think there's an *exact* substitute for that maximally

Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Michele Dondi
I apologize in advance for posting yet another suggestion without having full knowledge of all apocalypses, and I fear (for a very positive meaning of fear) that the answer will be: but that is already available. Well, the point is that I wonder wether Perl6 will support cartesian products

Re: enhanced open-funktion

2004-07-13 Thread Michele Dondi
On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote: I have a wish for Perl 6. I would like if the open-funktion opens only a file if it doesn't exist. Of course, I can first test if the file exist. I rather have a much bigger wish for an open-like operator that to be fair I would like to see

Re: enhanced open-funktion

2004-07-13 Thread Michele Dondi
On Tue, 13 Jul 2004, Michele Dondi wrote: I rather have a much bigger wish for an open-like operator that to be Of course that should be function. I'm thinking of an operator that returns a magical FH working like the

Re: enhanced open-funktion

2004-07-13 Thread Jonathan Scott Duff
On Tue, Jul 13, 2004 at 03:41:54PM +0200, Michele Dondi wrote: On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote: I have a wish for Perl 6. I would like if the open-funktion opens only a file if it doesn't exist. Of course, I can first test if the file exist. I rather have a much bigger

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Austin Hastings
--- Michele Dondi [EMAIL PROTECTED] wrote: I apologize in advance for posting yet another suggestion without having full knowledge of all apocalypses, and I fear (for a very positive meaning of fear) that the answer will be: but that is already available. Using google(+perl6 +cartesian

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Jonathan Scott Duff
On Tue, Jul 13, 2004 at 03:31:57PM +0200, Michele Dondi wrote: Put more clearly, it is now common to see things like: for my $x (1..10) { for my $y (5..20) { for my $text (qw/foo bar baz/) { do_stgh_with $x, $y, $text; } } } and it would be

Re: enhanced open-funktion

2004-07-13 Thread Michele Dondi
On Tue, 13 Jul 2004, Jonathan Scott Duff wrote: I rather have a much bigger wish for an open-like operator that to be fair I would like to see *also* in Perl5: nothing that one can do in well more than one way in any case (also including creating a module that will ^

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Michele Dondi
On Tue, 13 Jul 2004, Austin Hastings wrote: Using google(+perl6 +cartesian product) would have led you to the conclusion that this is already included. I hope this is horribly wrong, since the syntax is a little bewildering. [...] See Luke Palmer's Outer product considered useful post:

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Luke Palmer
Jonathan Scott Duff writes: On Tue, Jul 13, 2004 at 03:31:57PM +0200, Michele Dondi wrote: Put more clearly, it is now common to see things like: for my $x (1..10) { for my $y (5..20) { for my $text (qw/foo bar baz/) { do_stgh_with $x, $y, $text; }

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Austin Hastings
--- Michele Dondi [EMAIL PROTECTED] wrote: On Tue, 13 Jul 2004, Austin Hastings wrote: Using google(+perl6 +cartesian product) would have led you to the conclusion that this is already included. I hope this is horribly wrong, since the syntax is a little bewildering. [...] See Luke

Re: enhanced open-funktion

2004-07-13 Thread Austin Hastings
--- Larry Wall [EMAIL PROTECTED] wrote: While that probably works, I think better style would be to use a comma: my $fh = open $filename, :excl; That explicitly passes :excl to open as a term in a list rather than relying on the magical properties of :foo to find the preceding

Re: enhanced open-funktion

2004-07-13 Thread Larry Wall
On Tue, Jul 13, 2004 at 10:41:32AM -0700, Austin Hastings wrote: : --- Larry Wall [EMAIL PROTECTED] wrote: : While that probably works, I think better style would be to use a : comma: : : my $fh = open $filename, :excl; : : That explicitly passes :excl to open as a term in a list

Re: enhanced open-funktion

2004-07-13 Thread Juerd
Luke Palmer skribis 2004-07-13 7:24 (-0600): But in Perl 6, you don't have to specify things like that through the mode string: you can specify them through named parameters: my $fh = open $filename :excl; I was hoping we could finally get rid of mode characters, and especially combined

Re: [subject mangled to keep RT clean] t/pmc/fixedpmcarray.t test ...

2004-07-13 Thread Nicholas Clark
On Tue, Jul 13, 2004 at 08:04:01PM +0200, Jerome Quelin wrote: On Monday 12 July 2004 22:40, Nicholas Clark wrote: osname= darwin osvers= 7.0 arch= darwin-thread-multi-2level cc= cc --- Flags: [...] --- Summary of my parrot 0.1.0 configuration: [...] --- Environment:

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Juerd
Luke Palmer skribis 2004-07-13 10:28 (-0600): for outer(1..3, 4..6) - $x, $y { say $x,$y; } 1,4 1,5 1,6 2,4 2,5 2,6 3,4 3,5 3,6 So outer is somewhat like {} in shell globs? perl -le'print for glob {1,2,3},{4,5,6}' Juerd

Re: enhanced open-funktion

2004-07-13 Thread Larry Wall
On Tue, Jul 13, 2004 at 09:25:52PM +0200, Juerd wrote: : Luke Palmer skribis 2004-07-13 7:24 (-0600): : But in Perl 6, you don't have to specify things like that through the : mode string: you can specify them through named parameters: : my $fh = open $filename :excl; : : I was hoping we

[perl #30694] [PATCH] 2 more general questions + 1 answer for compiler_faq

2004-07-13 Thread via RT
# New Ticket Created by TOGoS # Please include the string: [perl #30694] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30694 Just a quick little addition to the compiler_faq like so: =head2 How am I supposed to

[licensing@fsf.org: [gnu.org #206060] GMP licensing for parrot / perl6]

2004-07-13 Thread Armin Obersteiner
hi! I did some research on GMP and LGPL, the results are attached. I don't know if this is a go/nogo for GMP, but it is pretty clear now. Further the FSF asks for perl6/parrot to use Artistic 2.0, what is the discussion state on that? (RFC 346) If somebody else wants to talk to FSF please use

Re: enhanced open-funktion

2004-07-13 Thread Juerd
Larry Wall skribis 2004-07-13 14:04 (-0700): The combined form is definitely problematic in various ways, and we haven't really redesigned open yet, since we haven't got to A29 yet. :-) Well, open being much like IO::All::io would really make me happy. That is: my $fh = open 'foo.txt';

Re: enhanced open-funktion

2004-07-13 Thread John Williams
On Tue, 13 Jul 2004, Larry Wall wrote: On Tue, Jul 13, 2004 at 07:24:55AM -0600, Luke Palmer wrote: : But in Perl 6, you don't have to specify things like that through the : mode string: you can specify them through named parameters: : : my $fh = open $filename :excl; While that

Re: push with lazy lists

2004-07-13 Thread David Green
On 7/12/04, Austin Hastings wrote: --- Larry Wall [EMAIL PROTECTED] wrote: The hard part being to pick a random number in [0,Inf) uniformly. :-) Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which collapses to the range [Inf, Inf). Returning Inf seems to satisfy the uniform

Re: The .bytes/.codepoints/.graphemes methods

2004-07-13 Thread David Green
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Larry Wall) wrote: On Tue, Jun 29, 2004 at 10:52:34AM -0500, Jonathan Scott Duff wrote: : :u0 # use bytes (. is byte) : :u1 # level 1 support (. is codepoint) : :u2 # level 1 support (. is

Re: push with lazy lists

2004-07-13 Thread Luke Palmer
David Green writes: On 7/12/04, Austin Hastings wrote: --- Larry Wall [EMAIL PROTECTED] wrote: The hard part being to pick a random number in [0,Inf) uniformly. :-) Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which collapses to the range [Inf, Inf). Returning Inf seems

Re: push with lazy lists

2004-07-13 Thread Ph. Marek
--- Larry Wall [EMAIL PROTECTED] wrote: The hard part being to pick a random number in [0,Inf) uniformly. :-) Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which collapses to the range [Inf, Inf). Returning Inf seems to satisfy the uniform distribution requirement: if you