Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Wolfgang Laun
If a programmer calls a function with an argument that has a well-established type, s/he may very well expect a result according to that type, (considering that overloading isn't just a word for not caring about type). So, calling sqrt with a real < 0, should not come back with a complex number. C

Re: [perl #60692] Recently introduced slowness

2008-11-20 Thread Vasily Chekalkin
chromatic wrote: On Thursday 20 November 2008 00:21:01 Andreas J. Koenig via RT wrote: According to examples/benchmarks/primes2.pir there was a nearly 30x slowdown in the last weeks. Two random data points: https://svn.perl.org/parrot/[EMAIL PROTECTED] was fast (~ 8 secs) https://svn.perl.org/

Should a closure-in-a-string get the placeholder parameters from its surroundings?

2008-11-20 Thread Carl Mäsak
I expected this to DWIM today: $ perl6 -e 'my $cl = { "$^name upcased becomes {$^name.uc}" }; say $cl("larry")' ...but it doesn't in Rakudo r32938: too few arguments passed (0) - 1 params expected ...and for understandable (if not good) reasons: the closure inside the string expects a parameter

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread TSa
HaloO, Moritz Lenz via RT wrote: On Wed Nov 19 07:35:48 2008, masak wrote: what should the behaviour of sign($x) be when $x is complex? I'd argue that it's a Failure. This is a bit drastic. If one computes in the complex domain a complex valued sign function is appropriate. multi sub s

Re: [perl #60692] Recently introduced slowness

2008-11-20 Thread luben
chromatic wrote: On Thursday 20 November 2008 00:21:01 Andreas J. Koenig via RT wrote: According to examples/benchmarks/primes2.pir there was a nearly 30x slowdown in the last weeks. Two random data points: https://svn.perl.org/parrot/[EMAIL PROTECTED] was fast (~ 8 secs) https://svn.perl.o

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Will Coleda
On Thu, Nov 20, 2008 at 4:12 PM, Will Coleda <[EMAIL PROTECTED]> wrote: > On Thu, Nov 20, 2008 at 3:45 PM, Peter Schwenn <[EMAIL PROTECTED]> wrote: >> Will Coleda >> >> You can drop this thread if you like. This is a waste of your time. What I >> need to do is to find someone who is building parr

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Will Coleda
On Thu, Nov 20, 2008 at 3:45 PM, Peter Schwenn <[EMAIL PROTECTED]> wrote: > Will Coleda > > You can drop this thread if you like. This is a waste of your time. What I > need to do is to find someone who is building parrot with XP, Cygwin or > mingw -- who has been through most of what I'm going t

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Peter Schwenn
Will Coleda You can drop this thread if you like. This is a waste of your time. What I need to do is to find someone who is building parrot with XP, Cygwin or mingw -- who has been through most of what I'm going to encounter. Thank you On 11/20/08, Will Coleda via RT <[EMAIL PROTECTED]> wrote

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Peter Schwenn
Will Coleda, 1. To correct myself and be more precise, out of the approx 3700 files in the MANIFEST, my running of Perl Configure.pl only shows those (~126) below as missing (but they aren't missing): [and 2. It looks like the files "not found" in the manifest check don't have the same upper/lowe

[perl #60702] parrot-0.8.1 rakudo crashes glibc-2.7 (repeat from the parrot list)

2008-11-20 Thread via RT
# New Ticket Created by Ross Alexander # Please include the string: [perl #60702] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60702 > Hello, I have already sent this to the parrot list but I noticed a post saying rakodo

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Peter Schwenn
I tried it with version 5.10.0 (build 1004), and under Cygwin. Same result. Am I right in assuming that virtually none of the parrot/rakudo developers is using Windows or Cygwin -- if someone WERE using Windows, he or she might have encountered this. It seems like such a simple, and "early in th

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Peter Schwenn
I'm using Version 5.8.8; the full -Version report is: - This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 25 registered patches, see perl -V for more detail) Copyright 1987-2006, L

examples/tutorial/80_closure.pir

2008-11-20 Thread Andrew Whitworth
With closures deprecated, we can kill this example from the tutorial? --Andrew Whitworth.

Re: [perl #60692] Recently introduced slowness

2008-11-20 Thread chromatic
On Thursday 20 November 2008 00:21:01 Andreas J. Koenig via RT wrote: > According to examples/benchmarks/primes2.pir there was a nearly 30x > slowdown in the last weeks. Two random data points: > > https://svn.perl.org/parrot/[EMAIL PROTECTED] was fast (~ 8 secs) > https://svn.perl.org/parrot/[EMA

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Mark J. Reed
I'd rather retain the dwimmishness of p5. $ perl -MMath::Complex -le 'print sqrt(-1)' i Note that I didn't have to pass in Math::Complex->make(-1,0). Just -1. On 11/20/08, Chris Dolan <[EMAIL PROTECTED]> wrote: >> Mark (>): >>> I think the most sensible thing is to be consistent. sgn() fails

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Chris Dolan
> Mark (>): >> I think the most sensible thing is to be consistent. sgn() fails for >> non-real input as long as sqrt() returns NaN for negative input. >> Change the latter behavior (via a pragma or whatever) so that sqrt() >> returns complex numbers, and then sgn() should start behaving on such >

Re: [perl #60642] [CAGE] add a codingstd test to ensure TODOed tests have an RT ticket number

2008-11-20 Thread Mark Glines
James Keenan via RT wrote: On Wed Nov 19 23:13:27 2008, [EMAIL PROTECTED] wrote: James Keenan via RT wrote: On Tue Nov 18 10:22:25 2008, [EMAIL PROTECTED] wrote: This will probably be quite challenging. Let's assume that all tests are found in files with names ending in '.t'. Those .t files

Re: [perl #60592] [TODO] change :lexid into :subid.

2008-11-20 Thread Will Coleda
On Thu, Nov 20, 2008 at 11:36 AM, Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: > I'm not entirely sure whether it was *just* a rename... ISTR there was also > something to do with a look-up of names. Pm knows more about it :-) > (admittedly, the topic is not well-defined then.) > kjs The note in the

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread TSa
HaloO, Moritz Lenz via RT wrote: On Wed Nov 19 07:35:48 2008, masak wrote: what should the behaviour of sign($x) be when $x is complex? I'd argue that it's a Failure. This is a bit drastic. If one computes in the complex domain a complex valued sign function is appropriate. multi sub s

Re: [perl #60592] [TODO] change :lexid into :subid.

2008-11-20 Thread Klaas-Jan Stol
I'm not entirely sure whether it was *just* a rename... ISTR there was also something to do with a look-up of names. Pm knows more about it :-) (admittedly, the topic is not well-defined then.) kjs On Thu, Nov 20, 2008 at 4:21 PM, Will Coleda via RT < [EMAIL PROTECTED]> wrote: > On Sun Nov 16 11:

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Larry Wall
On Thu, Nov 20, 2008 at 04:31:22PM +0100, Carl Mäsak wrote: : Mark (>): : > I think the most sensible thing is to be consistent. sgn() fails for : > non-real input as long as sqrt() returns NaN for negative input. : > Change the latter behavior (via a pragma or whatever) so that sqrt() : > returns

[svn:parrot-pdd] r32941 - in trunk: . compilers/imcc compilers/pct/src/POST docs/pdds editor include/parrot languages/perl6/src/builtins src/pmc t/op t/pmc

2008-11-20 Thread coke
Author: coke Date: Thu Nov 20 08:20:24 2008 New Revision: 32941 Modified: trunk/docs/pdds/pdd19_pir.pod Changes in other areas also in this revision: Modified: trunk/DEPRECATED.pod trunk/compilers/imcc/imcc.l trunk/compilers/imcc/imcc.y trunk/compilers/imcc/imclexer.c trunk/comp

Use Pointer instead of UnManagedStruct for void ** opaque out pointer in SQLite

2008-11-20 Thread Kevin Tew
I think use of "V" in your signature will allow you to do away with your C code grep for nci_vVi in t/pmc/nci.t and src/nci_test.c for an example. Note that it used Pointer not UnmanagedStruct Kevin

[svn:parrot-pdd] r32939 - in trunk: . compilers/imcc docs/pdds t/dynpmc t/oo t/pmc

2008-11-20 Thread coke
Author: coke Date: Thu Nov 20 07:38:44 2008 New Revision: 32939 Modified: trunk/docs/pdds/pdd19_pir.pod trunk/docs/pdds/pdd20_lexical_vars.pod trunk/docs/pdds/pdd21_namespaces.pod Changes in other areas also in this revision: Modified: trunk/DEPRECATED.pod trunk/compilers/imcc/imcc

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Carl Mäsak
Mark (>): > I think the most sensible thing is to be consistent. sgn() fails for > non-real input as long as sqrt() returns NaN for negative input. > Change the latter behavior (via a pragma or whatever) so that sqrt() > returns complex numbers, and then sgn() should start behaving on such > numbe

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Mark J. Reed
On Thu, Nov 20, 2008 at 8:34 AM, Carl Mäsak <[EMAIL PROTECTED]> wrote: > I guess the question is more about the programmer's expectations. Is > this a case where we serve the programmer better by returning Failure, > or by generalizing the C function to the complex plane? This is parallel to the c

[perl #60682] [PATCH] rewrite of subclass.t to PIR

2008-11-20 Thread via RT
# New Ticket Created by Bruce Stockwell # Please include the string: [perl #60682] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60682 > rewrite of t/oo/subclass.t to PIR. subclass.t | 886 +--

Re: [perl #60688] examples/benchmarks/array_access.pir broken

2008-11-20 Thread Will Coleda
On Wed, Nov 19, 2008 at 11:21 PM, Andreas J. Koenig via RT <[EMAIL PROTECTED]> wrote: > ./parrot examples/benchmarks/array_access.pir > error:imcc:syntax error, unexpected DOT, expecting COMMA or ')' ('.') >in file 'examples/benchmarks/array_access.pir' line 43 Thanks for the report. Fixed

Re: [perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread Will Coleda
On Wed, Nov 19, 2008 at 1:09 PM, via RT Peter Schwenn <[EMAIL PROTECTED]> wrote: > # New Ticket Created by Peter Schwenn > # Please include the string: [perl #60678] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=60678 > >

Re: [perl #60686] Parallel make broken

2008-11-20 Thread Will Coleda
On Wed, Nov 19, 2008 at 11:12 PM, Andreas J. Koenig via RT <[EMAIL PROTECTED]> wrote: > # New Ticket Created by (Andreas J. Koenig) > # Please include the string: [perl #60686] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Carl Mäsak
Wolfgang (>): > There is a definition for the signum function for a complex argument. > > sign( z ) = z / |z| for all z != 0 > sign( 0 ) = 0 > > See e.g. http://en.wikipedia.org/wiki/Sign_function > > Shouldn't be too difficult to implement. It isn't, and note that I also proposed it in my first e

[perl #60688] examples/benchmarks/array_access.pir broken

2008-11-20 Thread Andreas J. Koenig
# New Ticket Created by (Andreas J. Koenig) # Please include the string: [perl #60688] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60688 > --- osname= linux osvers= 2.6.18-6-xen-amd64 arch= x86_64-linux-gnu-thread-mult

[perl #60692] Recently introduced slowness

2008-11-20 Thread Andreas J. Koenig
# New Ticket Created by (Andreas J. Koenig) # Please include the string: [perl #60692] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60692 > According to examples/benchmarks/primes2.pir there was a nearly 30x slowdown in t

Re: [perl #60642] [CAGE] add a codingstd test to ensure TODOed tests have an RT ticket number

2008-11-20 Thread Will Coleda
On Thu, Nov 20, 2008 at 7:16 AM, James Keenan via RT <[EMAIL PROTECTED]> wrote: > 2. I've heard a lot of talk lately about languages moving into their > own repositories. If so, then we have to ask whether we should be > instituting new coding standards for .t files under ./languages/. At > what

[perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #60674] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60674 > what should the behaviour of sign($x) be when $x is complex? rakudo: say sign($_) for

RE: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Wolfgang Laun
There is a definition for the signum function for a complex argument. sign( z ) = z / |z| for all z != 0 sign( 0 ) = 0 See e.g. http://en.wikipedia.org/wiki/Sign_function Shouldn't be too difficult to implement. -Original Message- From: Carl Mäsak [mailto:[EMAIL PROTECTED] Sent: Mittw

[perl #60686] Parallel make broken

2008-11-20 Thread Andreas J. Koenig
# New Ticket Created by (Andreas J. Koenig) # Please include the string: [perl #60686] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60686 > --- osname= linux osvers= 2.6.18-6-xen-amd64 arch= x86_64-linux-gnu-thread-mult

[perl #60676] Win32 parrot-0.8.1 installation won't run perl6

2008-11-20 Thread via RT
# New Ticket Created by Peter Schwenn # Please include the string: [perl #60676] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60676 > This is a binary win32 installation of parrot-0.8.1. The binary installation was made

[perl #60678] Configure.pl manifest problem on Win32

2008-11-20 Thread via RT
# New Ticket Created by Peter Schwenn # Please include the string: [perl #60678] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60678 > In attempting to build Parrot (to run Rakudo) on Win32,in a Dos box, from the root dir

[perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Moritz Lenz via RT
On Wed Nov 19 07:35:48 2008, masak wrote: > what should the behaviour of sign($x) be when $x is complex? I'd argue that it's a Failure. If you care about complex numbers, you usually want an angle instead, which you can get with Complex.polar. (And it's easier to give it a another meaning later t

[perl #60670] Implement Texas quotes («») i n Rakudo

2008-11-20 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #60670] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60670 > Rakudo r32873 cannot parse the Unicode version of Texas quotes («»), and misunderstands

[perl #60672] Implement %C in sprintf in Rakudo

2008-11-20 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #60672] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60672 > According to S29, there should be an sprintf directive %C, but Rakudo r32874 doesn't rec

[perl #60642] [CAGE] add a codingstd test to ensure TODOed tests have an RT ticket number

2008-11-20 Thread James Keenan via RT
On Wed Nov 19 23:13:27 2008, [EMAIL PROTECTED] wrote: > James Keenan via RT wrote: > > On Tue Nov 18 10:22:25 2008, [EMAIL PROTECTED] wrote: > > > > This will probably be quite challenging. Let's assume that all tests > > are found in files with names ending in '.t'. Those .t files can be > > wr