Re: r8118: MSWin32 Test Results

2005-05-20 Thread Leopold Toetsch
Ron Blaschke wrote: Ron Blaschke wrote: t\pmc\bigint.t1 256221 4.55% 22 The problem seems to be caused by the Cfree(s); in Fbigint.pmc/get_string. Well, not the actual cause, but that's where we fail. mpz_get_str() returned a string that was very likely allocated by a

foo(1: 2: 3: 4:) ?

2005-05-20 Thread Autrijus Tang
So I'm finally starting to implement multi-level invocants in MMDs. I'd like to sanity check some cases first, though. Are these two assumed to be identical? multi sub foo ($x, $y) multi sub foo ($x, $y : ) But these two are _not_ identical? multi sub foo ($x : $y : $z) multi

Re: hyperoperators and multi-dimensional datastructures

2005-05-20 Thread Anthony Heading
Uri Guttman wrote: i can't spit out the syntax but here is the conceptual way i would do it. we do have multidimensional slices so we could grab each slice (maybe with zip?) and pass that to [+] and then grab the list of results back into a array/matrix with one less dimension than the original.

[perl #35892] [PATCH] Updated submissions.pod

2005-05-20 Thread via RT
# New Ticket Created by Dino Morelli # Please include the string: [perl #35892] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35892 file: docs/submissions.pod Updated the How To Submit Something New section to

rev 8132: .pragma n_operators (was: unary and infix ops summary and todo)

2005-05-20 Thread Leopold Toetsch
Leopold Toetsch [EMAIL PROTECTED] wrote: 3) Proposal: PIR syntax enhancement .pragma n_operators ... Px = Py + 1 ... [EOF] Within this pragma (valid inside and until end of file) the shortcuts '+', '-', ... should translate to n_add, n_sub, ... This simplifies the

Re: How do I... create a new meta operator?

2005-05-20 Thread TSa (Thomas Sandlaß)
HaloO Luke, you wrote: I wonder how we specify meta operators that only work on comparators, or only on assignment forms, or etc. etc. etc. Well, Perl6 has got first class Code types, hasn't it? So it's a matter of defining a type hierarchy among the operators and then you can dispatch on them

Re: Parrot as an extension language

2005-05-20 Thread Colin Paul Adams
Autrijus == Autrijus Tang [EMAIL PROTECTED] writes: Autrijus On Tue, May 17, 2005 at 03:00:14PM +0100, Colin Paul Autrijus Adams wrote: But when I look at http://www.parrotcode.org/docs/embed.html, I can see no way of getting information back from the script - not even an

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Fri, May 20, 2005 at 10:34:39AM +0100, Colin Paul Adams wrote: I have a problem with this - namely that the function is variadic, and the interface generator can't cope with this. Hmm, in Haskell FFI, we hard-coded two cases of invocation, treating the function as two distinct, non-variadic

Re: Parrot as an extension language

2005-05-20 Thread Leopold Toetsch
Colin Paul Adams [EMAIL PROTECTED] wrote: I have a problem with this - namely that the function is variadic, and the interface generator can't cope with this. Have a look at src/inter_run.c e.g. void * Parrot_runops_fromc_arglist(Parrot_Interp interpreter, PMC *sub, const char *sig,

Re: [perl #35892] [PATCH] Updated submissions.pod

2005-05-20 Thread Leopold Toetsch
Dino Morelli [EMAIL PROTECTED] wrote: Updated the How To Submit Something New section to include patching the MANIFEST file. Thanks, applied. leo

Re: Parrot as an extension language

2005-05-20 Thread Colin Paul Adams
Autrijus == Autrijus Tang [EMAIL PROTECTED] writes: Autrijus On Fri, May 20, 2005 at 10:34:39AM +0100, Colin Paul Autrijus Adams wrote: I have a problem with this - namely that the function is variadic, and the interface generator can't cope with this. Autrijus Hmm, in

Re: Parrot as an extension language

2005-05-20 Thread Colin Paul Adams
Leopold == Leopold Toetsch [EMAIL PROTECTED] writes: Leopold Colin Paul Adams [EMAIL PROTECTED] wrote: I have a problem with this - namely that the function is variadic, and the interface generator can't cope with this. Leopold Have a look at src/inter_run.c e.g. Leopold

Re: r8118: MSWin32 Test Results

2005-05-20 Thread Ron Blaschke
Leopold Toetsch wrote: Ron Blaschke wrote: Ron Blaschke wrote: t\pmc\bigint.t1 256221 4.55% 22 The problem seems to be caused by the Cfree(s); in Fbigint.pmc/get_string. Well, not the actual cause, but that's where we fail. mpz_get_str() returned a string that

Re: reduce metaoperator on an empty list

2005-05-20 Thread Randal L. Schwartz
Mark == Mark A Biggar [EMAIL PROTECTED] writes: Mark The usual definition of reduce in most languages that support it, is Mark that reduce over the empty list produces the Identity value for the Mark operation. In Smalltalk, the equivalent of reduce is inject:into:, so a sum reduce looks like:

Re: reduce metaoperator on an empty list

2005-05-20 Thread Randal L. Schwartz
Randal == Randal L Schwartz merlyn@stonehenge.com writes: Randal For example, if I wanted the identity hash (where all values are 1, Randal but keys are original list elements), I could do: Randal my %hash = @somelist.inject({}, { $^a{$^b} = 1; $^a }); And yes, I know I can spell this as: my

wanted: hash stress tests

2005-05-20 Thread Leopold Toetsch
I'm currently rewriting the hash implementation in src/hash.c. The new hash structure has just one piece of malloced memory with bucket pointers and buckets in one piece. But before comitting I'd like to have some stress and benchmarks tests that first show that my implementation is correct

How to compile to PIR or byte codes

2005-05-20 Thread Colin Paul Adams
I am trying to work out how to compile a perl script using pugs. (Am I on the right mailing list?) If I do pugs -h, then it suggests to me the -C option will do the trick, but does not say what value the backend might be. But I'm also having trouble running the script. It runs OK with perl 5,

Re: reduce metaoperator on an empty list

2005-05-20 Thread John Macdonald
On Fri, May 20, 2005 at 06:09:55AM -0700, Randal L. Schwartz wrote: Mark == Mark A Biggar [EMAIL PROTECTED] writes: Mark The usual definition of reduce in most languages that support it, is Mark that reduce over the empty list produces the Identity value for the Mark operation. In

Re: r8118: MSWin32 Test Results

2005-05-20 Thread jerry gay
On 5/20/05, Ron Blaschke [EMAIL PROTECTED] wrote: t/pmc/bigint now passes, but with Rev 8133 there are several other failures (even with a fresh checkout). Failed Test Stat Wstat Total Fail Failed List of Failed

Re: reduce metaoperator on an empty list

2005-05-20 Thread TSa (Thomas Sandlaß)
John Macdonald wrote: ... (and there may be additional operator attributes that make sense there too, although none come immediately to mind). Well, I wonder why people neglect the fact that the neutral/identity element is not a property of the operator alone?! Besides the associativity and

Experimental Coroutine support landed.

2005-05-20 Thread Autrijus Tang
A highly experimental implementation of coroutines has landed to Pugs. The `coro` keyword denotes a coroutine. It may appear at any place where `sub` may appear, i.e. in both named and anonymous forms. I borrowed the semantics from Coro::Cont on CPAN, with the following restriction that you

Re: How to compile to PIR or byte codes

2005-05-20 Thread Autrijus Tang
On Fri, May 20, 2005 at 03:13:52PM +0100, Colin Paul Adams wrote: I am trying to work out how to compile a perl script using pugs. (Am I on the right mailing list?) Well, yes and no. To run Perl 5 in Parrot, you want the ponie-dev mailing list -- this is perl6-compiler after all. :-) If I do

Re: reduce metaoperator on an empty list

2005-05-20 Thread Mark A. Biggar
John Macdonald wrote: Is there a built-in operator that doesn't have a meaningful identity value? I first thought of exponentiation, but it has an identity value of 1 - you just have to realize that since it is a right associative operator, the identity has to be applied from the right. Well the

Re: Parrot as an extension language

2005-05-20 Thread Colin Paul Adams
Autrijus == Autrijus Tang [EMAIL PROTECTED] writes: Autrijus You may wish to use Parrot_call_sub's SS form, where Autrijus you pass in a string and get back a string. Something Autrijus like this: Autrijus my $interp = Parrot_new(undef); Autrijus # ... load a .pir

Re: wanted: hash stress tests

2005-05-20 Thread Uri Guttman
LT == Leopold Toetsch [EMAIL PROTECTED] writes: LT I'm currently rewriting the hash implementation in src/hash.c. The LT new hash structure has just one piece of malloced memory with LT bucket pointers and buckets in one piece. here is an odd thought to add to that. since your hash is a

Re: wanted: hash stress tests

2005-05-20 Thread Leopold Toetsch
Leopold Toetsch wrote: I'm currently rewriting the hash implementation in src/hash.c. The new hash structure has just one piece of malloced memory with bucket pointers and buckets in one piece. But before comitting I'd like to have some stress and benchmarks tests that first show that my

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Fri, May 20, 2005 at 05:42:48PM +0100, Colin Paul Adams wrote: The problem I'm finding with this, is getting back the returned string characters. I assume the void * returned is pointing to a Parrot String. Certainly it's not a const char *. Yes. There is a function declaration

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote: On Fri, May 20, 2005 at 05:42:48PM +0100, Colin Paul Adams wrote: There is a function declaration Parrot_string_cstring in string_funcs.h, but it appears to have no definitoon anywhere, so that's not much use to me.

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote: Yeah, I bumped against that too. You need to look at the strstart field in the ParrotString struct. In Haskell I use: peekCString = #{peek STRING, strstart} s5 Actually, never mind; string_to_cstring is the way to go.

Re: wanted: hash stress tests

2005-05-20 Thread Leopold Toetsch
Uri Guttman wrote: LT == Leopold Toetsch [EMAIL PROTECTED] writes: LT I'm currently rewriting the hash implementation in src/hash.c. The LT new hash structure has just one piece of malloced memory with LT bucket pointers and buckets in one piece. here is an odd thought to add to that. since

Re: Parrot as an extension language

2005-05-20 Thread Dan Sugalski
At 1:15 AM +0800 5/21/05, Autrijus Tang wrote: On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote: Yeah, I bumped against that too. You need to look at the strstart field in the ParrotString struct. In Haskell I use: peekCString = #{peek STRING, strstart} s5 Actually, never

Re: reduce metaoperator on an empty list

2005-05-20 Thread TSa (Thomas Sandlaß)
Mark A. Biggar wrote: Well the identity of % is +inf (also right side only). I read $n % any( $n..Inf ) == $n. The point is there's no unique right identity and thus (Num,%) disqualifies for a Monoid. BTW, the above is a nice example where a junction needn't be preserved :) E.g. if XY is left

lazy context

2005-05-20 Thread Yuval Kogman
Hola, Some of us on #perl6 bitched once more about how lazy will make our IO brain hurt a lot. The concensus is that a lazy context has not been discussed yet. Here is a proposal for lazyness defined with coroutines. we have a lazy modifier: my $a = lazy { get_value(5, 10) };

Re: How do I... invoke a method reference

2005-05-20 Thread TSa (Thomas Sandlaß)
C. Scott Ananian wrote: I think Ingo was trying to explicitly specify the normally-implicit invocant; ie, invoke the method via the reference *without* using a '.'. If this is possible (and I think it is), it's not (yet) clear what the syntax would be. Maybe $ref(Foo.new():) I think for MMD

Graphing tool for PerlGuts Illustrated

2005-05-20 Thread Yuval Kogman
Hola, In PerlGuts Illustrated you have some very pretty diagrams... Could you please hint me on what you generated them with, so that I can use it for the forthcomming PugsGuts Illustrated? Grazie! -- () Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker /\ kung foo master: /me kicks

Re: Parrot as an extension language

2005-05-20 Thread Colin Paul Adams
Leopold == Leopold Toetsch [EMAIL PROTECTED] writes: Leopold Colin Paul Adams [EMAIL PROTECTED] wrote: I have a problem with this - namely that the function is variadic, and the interface generator can't cope with this. Leopold Have a look at src/inter_run.c e.g. Leopold

Re: Complex Arithmetic

2005-05-20 Thread Edward Cherlin
On Thursday 19 May 2005 09:39, Luke Palmer wrote: On 5/19/05, Edward Cherlin [EMAIL PROTECTED] wrote: It turns out that the domain and range and the location of the cut lines have to be worked out separately for different functions. Mathematical practice is not entirely consistent in

Re: hyperoperators and multi-dimensional datastructures

2005-05-20 Thread Edward Cherlin
On Thursday 19 May 2005 12:48, Uri Guttman wrote: LP == Luke Palmer [EMAIL PROTECTED] writes: LP On 5/18/05, Anthony Heading [EMAIL PROTECTED] wrote: Is there a way to target hyperoperators at different axes of a multi-dimensional array? This is an attractive feature of various

Re: Parrot as an extension language

2005-05-20 Thread Leopold Toetsch
Colin Paul Adams wrote: Leopold == Leopold Toetsch [EMAIL PROTECTED] writes: Leopold void * Parrot_runops_fromc_arglist(Parrot_Interp Leopold interpreter, PMC *sub, const char *sig, va_list args) Despite what I said before, this is actually worse than Parrot_call_sub. The interface

Re: Parrot as an extension language

2005-05-20 Thread Dan Sugalski
At 8:10 PM +0100 5/20/05, Colin Paul Adams wrote: Leopold == Leopold Toetsch [EMAIL PROTECTED] writes: Leopold Colin Paul Adams [EMAIL PROTECTED] wrote: I have a problem with this - namely that the function is variadic, and the interface generator can't cope with this. Leopold

Re: [unclassified] Re: reduce metaoperator on an empty list

2005-05-20 Thread Edward Cherlin
On Thursday 19 May 2005 19:51, Sam Vilain wrote: Edward Cherlin wrote: Here is the last answer from Ken Iverson, who invented reduce in the 1950s, and died recently. file:///usr/share/j504/system/extras/help/dictionary/intro28 .htm

Re: Parrot as an extension language

2005-05-20 Thread C. Scott Ananian
On Fri, 20 May 2005, Dan Sugalski wrote: Well, mostly. string-cstring conversion is potentially lossy, if for no other reason than embedded nulls will get in your way. I see we're not exposing anything to do that, though, which we ought to fix. pascal-style strings (ie, char* and length) are the

Re: Graphing tool for PerlGuts Illustrated

2005-05-20 Thread Brian Ingerson
On 20/05/05 22:06 +0300, Yuval Kogman wrote: Hola, In PerlGuts Illustrated you have some very pretty diagrams... Could you please hint me on what you generated them with, so that I can use it for the forthcomming PugsGuts Illustrated? I used to sit next to Gisle at ActiveState.

Re: Parrot as an extension language

2005-05-20 Thread Dan Sugalski
At 4:35 PM -0400 5/20/05, C. Scott Ananian wrote: On Fri, 20 May 2005, Dan Sugalski wrote: Well, mostly. string-cstring conversion is potentially lossy, if for no other reason than embedded nulls will get in your way. I see we're not exposing anything to do that, though, which we ought to fix.

Re: lazy context

2005-05-20 Thread C. Scott Ananian
On Fri, 20 May 2005, Yuval Kogman wrote: then it is not finalized into a real value. Here's how the range operator would be implemented: sub infix:.. ($from, $to where { $to $from }){ reverse $to .. $from } sub infix:.. ($from, $to) { lazy gather { while ($from =

Re: lazy context

2005-05-20 Thread Patrick R. Michaud
On Fri, May 20, 2005 at 05:15:24PM -0400, C. Scott Ananian wrote: On Fri, 20 May 2005, Yuval Kogman wrote: then it is not finalized into a real value. Here's how the range operator would be implemented: sub infix:.. ($from, $to where { $to $from }){ reverse $to .. $from }

Re: Graphing tool for PerlGuts Illustrated

2005-05-20 Thread 'Yuval Kogman'
On Fri, May 20, 2005 at 14:20:04 -0700, Jan Dubois wrote: IIRC(AIDRC), he hand-hacked postscript files for those diagrams :P After drawing them with a pen on graphing paper first to get the coordinates right. The PostScript sources are all on CPAN too: I am impressed and humbled. I will

Re: Parrot as an extension language

2005-05-20 Thread Leopold Toetsch
Dan Sugalski wrote: There are interfaces in the extension system to get a void * and length back from a PMC when fetching string data out, but I see we don't have that for plain strings. I'll probably fix that this weekend if someone doesn't beat me to it. There was a disucssion WRT that on

Re: Parrot as an extension language

2005-05-20 Thread C. Scott Ananian
On Fri, 20 May 2005, Colin Paul Adams wrote: Leopold void * Parrot_runops_fromc_arglist(Parrot_Interp Leopold interpreter, PMC *sub, const char *sig, va_list args) And as for hand-writing interfaces, I'm not sure I know HOW to create a va_list. void *Parrot_runops_fromc_argsN(Parrot_Interp

Re: lazy context

2005-05-20 Thread Yuval Kogman
On Fri, May 20, 2005 at 17:15:24 -0400, C. Scott Ananian wrote: This is very elegant. It might be worthwhile for someone to attempt to define a 'core perl' set of operators, etc, so that the 'rest of perl' can be defined in perl proper... Have a look at synopsis 29... For documentation

Re: Parrot as an extension language

2005-05-20 Thread C. Scott Ananian
On Fri, 20 May 2005, Dan Sugalski wrote: So, I see four real options: 1) Someone fixes the Eiffel interface generator to understand C variadic functions. 2) We provide a function and method call interface that assumes you've already pre-filled in the registers according to parrot's calling

pcre.t failure

2005-05-20 Thread Dino Morelli
r8136, I'm seeing this test failure: $ perl t/harness t/library/pcre.t t/library/pcreCan't use string (Test::Builder) as a HASH ref while strict refs in use at lib/Test/Builder.pm line 304. # Looks like your test died before it could output anything. t/library/pcredubious Test

Re: pcre.t failure

2005-05-20 Thread chromatic
On Fri, 2005-05-20 at 17:49 -0400, Dino Morelli wrote: r8136, I'm seeing this test failure: $ perl t/harness t/library/pcre.t t/library/pcreCan't use string (Test::Builder) as a HASH ref while strict refs in use at lib/Test/Builder.pm line 304. This is a feature of the Test-Simple

RE: Graphing tool for PerlGuts Illustrated

2005-05-20 Thread Jan Dubois
On Fri, 20 May 2005, Brian Ingerson wrote: On 20/05/05 22:06 +0300, Yuval Kogman wrote: Hola, In PerlGuts Illustrated you have some very pretty diagrams... Could you please hint me on what you generated them with, so that I can use it for the forthcomming PugsGuts Illustrated? I

[perl #35900] [PATCH] skip dynclasses, spawnw tests on win32

2005-05-20 Thread via RT
# New Ticket Created by jerry gay # Please include the string: [perl #35900] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35900 dynclasses and spawnw have been busted on win32 for some time now. with this patch,

[perl #35903] [BUG] pcre.t failure

2005-05-20 Thread via RT
# New Ticket Created by jerry gay # Please include the string: [perl #35903] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35903 i'm seeing the same failure, with perl 5.8.6, msvc 7.1, and win32 --

Re: reduce metaoperator on an empty list

2005-05-20 Thread mark . a . biggar
Mark A. Biggar wrote: Well the identity of % is +inf (also right side only). I read $n % any( $n..Inf ) == $n. The point is there's no unique right identity and thus (Num,%) disqualifies for a Monoid. BTW, the above is a nice example where a junction needn't be preserved :) If as usual

Re: pcre.t failure

2005-05-20 Thread Dino Morelli
On Fri, 20 May 2005, chromatic wrote: On Fri, 2005-05-20 at 17:49 -0400, Dino Morelli wrote: r8136, I'm seeing this test failure: $ perl t/harness t/library/pcre.t t/library/pcreCan't use string (Test::Builder) as a HASH ref while strict refs in use at lib/Test/Builder.pm line 304.

Re: reduce metaoperator on an empty list

2005-05-20 Thread Matt Fowles
Mark~ On 5/20/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Mark A. Biggar wrote: Well the identity of % is +inf (also right side only). I read $n % any( $n..Inf ) == $n. The point is there's no unique right identity and thus (Num,%) disqualifies for a Monoid. BTW, the above is a