Re: The Sort Problem

2004-02-14 Thread Austin Hastings
--- Uri Guttman [EMAIL PROTECTED] wrote: @out = sort key( %lookup{ .{remotekey} } ), key:insensitive:descending:locale( 'somewhere' )( .{priority} ), key:float ( substr( 0, 10 ) ), key:integer ( /foo(\d+)bar/ ),

Re: The Sort Problem

2004-02-14 Thread Uri Guttman
AH == Austin Hastings [EMAIL PROTECTED] writes: AH --- Uri Guttman [EMAIL PROTECTED] wrote: @out = sort key:compare( \my_compare_sub ) ( /(\d+)$/ ), @in ; note that the custome compare callbacks can be a block or a sub name/ref. the callback sub would be passed 2 args as usual.

Re: The Sort Problem

2004-02-14 Thread Austin Hastings
--- Uri Guttman [EMAIL PROTECTED] wrote: AH == Austin Hastings [EMAIL PROTECTED] writes: AH --- Uri Guttman [EMAIL PROTECTED] wrote: @out = sort key:compare( \my_compare_sub ) ( /(\d+)$/ ), @in ; note that the custome compare callbacks can be a block or a sub

Re: The Sort Problem

2004-02-14 Thread Uri Guttman
AH == Austin Hastings [EMAIL PROTECTED] writes: AH --- Uri Guttman [EMAIL PROTECTED] wrote: there are rare times when you need a computed comparison, say with a specialized collation sequence. if this sequence isn't supported by locale or whatever, you need to do a callback

Re: The Sort Problem

2004-02-14 Thread Rod Adams
Austin Hastings wrote: Off the top of my head, I can't think of a case where the compare sub would be needed unless the key was not well-ordered. Does anyone have an example of a case where the key-extraction sub approach doesn't reduce the problem to a Scalar comparison? I can't find the P5

Re: Compiling parrot, cvs head

2004-02-14 Thread Leopold Toetsch
Alberto Manuel Brandao Simoes [EMAIL PROTECTED] wrote: I know head can not compile at all, but maybe this can help to know that the following tests fail on my Slackware Linux: t/pmc/signalNOK 2# Failed test (t/pmc/signal.t at line 44) These signal tests are a big hack. Parrot

Re: Object spec

2004-02-14 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: While I'm still working on the vtable and supporting code section, most of the revamp of PDD15 (objects!) is checked into the repository. It'd be worth checking it out and checking it out, as this would be the time to get comments in. 1) Why is the

Re: JIT branches under the Sun

2004-02-14 Thread Stephane Peiry
On Fri, Feb 13, 2004 at 10:48:09AM +0100, Leopold Toetsch wrote: I don't know suns JIT code nor the assembler syntax, but it seems that the two subcc lines are broken: emitm_subcc_r(NATIVECODE, MAP[1], emitm_g(0), emitm_g(0)); If I understand that correctly it should read:

Re: JIT branches under the Sun

2004-02-14 Thread Leopold Toetsch
Stephane Peiry [EMAIL PROTECTED] wrote: whats a good way to debug jit? s. docs/jit.pod /Debugging docs/debug.pod /jit Thanks, Stephane leo

Re: JIT branches under the Sun

2004-02-14 Thread Stephane Peiry
On Sat, Feb 14, 2004 at 02:35:02PM +0100, Leopold Toetsch wrote: docs/debug.pod /jit saw that one, but jit doesn't generate a .o file under sparc? Stéphane

Re: JIT branches under the Sun

2004-02-14 Thread Leopold Toetsch
Stephane Peiry [EMAIL PROTECTED] wrote: On Sat, Feb 14, 2004 at 02:35:02PM +0100, Leopold Toetsch wrote: docs/debug.pod /jit saw that one, but jit doesn't generate a .o file under sparc? Calling Parrot_jit_debug() is enabled for __GNUC__ and __IBMC__. If your system doesn't define one of

Re: Object spec

2004-02-14 Thread LF
While I'm still working on the vtable and supporting code section, most of the revamp of PDD15 (objects!) is checked into the repository. It'd be worth checking it out and checking it out, as this would be the time to get comments in. great to see this, i guess everyone will agree. well, i have

Re: Rules for method resolution?

2004-02-14 Thread Michal Wallace
On Fri, 13 Feb 2004, Dan Sugalski wrote: We also have to have a way to fetch the method PMC for a named method for later use, which is where the interesting bits come in. This is required for a number of reasons, including Python, so we have to have it. The question is... *When* is the name

Re: Rules for method resolution?

2004-02-14 Thread Michal Wallace
On Sat, 14 Feb 2004, Michal Wallace wrote: class Alice: def whoami(self): return Alice class Bruce: def whoami(self): return Bruce a = Alice() b = Bruce() a.whoami, b.whoami = b.whoami, a.whoami assert a.whoami()==Bruce

Re: Rules for method resolution?

2004-02-14 Thread Luke Palmer
Michal Wallace writes: On Fri, 13 Feb 2004, Dan Sugalski wrote: We also have to have a way to fetch the method PMC for a named method for later use, which is where the interesting bits come in. This is required for a number of reasons, including Python, so we have to have it. The