Re: [perl #36597] [PATCH]Dominance Frontiers

2005-07-28 Thread Curtis Rawls
Thanks for pointing this out. I tracked the bug down, and it looks like the dominator algorithm does not handle unreachable blocks correctly, and the dominance frontier algorithm suffers for it. Why the unreachable blocks are generated in the first place might be an interesting question for someo

Re: Test::Builder::STDOUT ?

2005-07-28 Thread Michael G Schwern
On Fri, Jul 29, 2005 at 02:49:48AM +0100, Adrian Howard wrote: > Obviously won't work if your test scripts aren't written using T::B, > but that's not a problem I hit very often. > > Greasy hack? Obviously - but it seems to do the job. I'm tempted to > throw it at CPAN :-) > > Is there a bett

Re: Test::Builder::STDOUT ?

2005-07-28 Thread chromatic
On Fri, 2005-07-29 at 02:49 +0100, Adrian Howard wrote: > I've been pondering custom test runners recently and have hit the > familiar problem of Test::Harness::Straps not capturing STDERR, so > missing the diagnostics that Test::Builder outputs. > Is there a better way I'm missing? If you c

Test::Builder::STDOUT ?

2005-07-28 Thread Adrian Howard
I've been pondering custom test runners recently and have hit the familiar problem of Test::Harness::Straps not capturing STDERR, so missing the diagnostics that Test::Builder outputs. A moderately evil solution occurred, and I now have a Test::Builder::STDOUT on my box that just does:

Re: lazy list syntax?

2005-07-28 Thread Yuval Kogman
On Thu, Jul 28, 2005 at 19:58:16 -0300, Flavio S. Glock wrote: > 2005/7/28, Yuval Kogman <[EMAIL PROTECTED]>: > > > > I think unary = is what you want: > > > > my @a = $span.lazy; > > > > for [EMAIL PROTECTED] -> $item { > > ... > > } > > > > Ofcourse, my

Re: lazy list syntax?

2005-07-28 Thread Flavio S. Glock
2005/7/28, Yuval Kogman <[EMAIL PROTECTED]>: > > I think unary = is what you want: > > my @a = $span.lazy; > > for [EMAIL PROTECTED] -> $item { > ... > } > > Ofcourse, my @a = $span.lazy will have to be fixed, but what you > tried should be working. Is "f

Re: [ANNOUNCE] Test::Simple/More/Builder 0.60_01

2005-07-28 Thread Michael G Schwern
On Thu, Jul 28, 2005 at 05:48:58PM -0500, Peter wrote: > So, the way I would go about using this would be something like this? > > my $obj=new SomeObj(); > isa($obj, "SomeObj") or BAIL_OUT("It wasn't my object :("); isa_ok() but you get the idea. You call it when you think the code is so busted

[perl #31649] [TODO] Win32 - Automatically Export Symbols

2005-07-28 Thread Jonathan Worthington via RT
This is the Better Way to do part of what my recent dynclasses ci did. But, I think that some input is needed into what should be in the Parrot API for extensions and what should not. Also, it'd be changes that touch a lot of files and I'm not sure that's wise while we've got leo's branch - someone

Re: Garbage Collector API

2005-07-28 Thread David Formosa \(aka ? the Platypus\)
On Thu, 28 Jul 2005 16:22:19 +0300, Yuval Kogman <[EMAIL PROTECTED]> wrote: [...] > On Thu, Jul 28, 2005 at 01:08:13 -, David Formosa (aka ? the Platypus) = > wrote: [...] >> my Bigobjet $big is GC::timely =3D Bigobect; # Request timely >> # destruction of $big. Usefull for filehandels and

Re: Elimination of Item|Pair and Any|Junction

2005-07-28 Thread Autrijus Tang
On Fri, Jul 29, 2005 at 05:59:43AM +0800, Autrijus Tang wrote: > I can see marking things explicitly for named bindings: > > foo(:literal); > foo(*%nameds); > foo(*$pair); > foo([EMAIL PROTECTED]); Er, sorry, the last one should be foo(*%{ hash @list_of_pairs }); Thanks, /

Re: Elimination of Item|Pair and Any|Junction

2005-07-28 Thread Autrijus Tang
On Thu, Jul 28, 2005 at 09:27:00AM -0700, Larry Wall wrote: > Or maybe Any really does mean "Object" and we're just viewing our > hierarchy too strictly if we make every relationship "isa". That's one > thing that neither this formulation nor Thomas's are making very > clear--which type relations

Re: [ANNOUNCE] Test::Simple/More/Builder 0.60_01

2005-07-28 Thread Peter
Michael G Schwern wrote: * Added the long delayed BAIL_OUT to Test::More. So, the way I would go about using this would be something like this? my $obj=new SomeObj(); isa($obj, "SomeObj") or BAIL_OUT("It wasn't my object :("); --Peter

Some thoughts on PIL

2005-07-28 Thread Autrijus Tang
On Thu, Jul 28, 2005 at 06:31:34PM +0200, "TSa (Thomas Sandla�)" wrote: > BTW, where can I read about PIL, other then in Parrot/Pugs svn? (Cc'ing in P6C.) The current type-indexed design of PIL is going away, because it is closely tied to the PIR/Parrot model, to the disadvantage of our Perl5/Jav

[svn ci] (r8717) Win32 Dynclasses

2005-07-28 Thread Jonathan Worthington
Hi, Dynclasses now work on Win32 when building Parrot with the MS Visual Studio compiler. That means that all t\dynclass\*.t passes. :-) I've also (after ci'ing a fix to config/gen/makefiles/tcl.in) managed to build Partcl on Win32 and run the tests. Here's what I'm seeing. Failed Test

$value.confess()

2005-07-28 Thread Brent 'Dax' Royal-Gordon
While trying to track down a type error in a Pugs program today, I thought of what could be a handy debugging feature. I would like Perl 6 values to capture the call stack when they're created and store them into a property called "confess" (Autrijus's name). $value.confess would then return an a

Re: [perl #36597] [PATCH]Dominance Frontiers

2005-07-28 Thread Andy Dougherty
On Thu, 28 Jul 2005, Will Coleda wrote: > Applying your patch to a pristine build yields only the backtrack.t failure: > #2 eats 100% of the CPU until I kill it: it doesn't behave that way in > svn-head. I can confirm the backtrack #2 failure under SPARC/Solaris. I can't say what other tests ma

Re: [perl #36677] Parrot cannot startup if STDERR or STDOUT is closed

2005-07-28 Thread jerry gay
i've added a new test t/run/exit.t that checks parrot exit codes under different scenarios. the 8 subtests all pass on win32. hopefully this will reproduce the behavior you're seeing. ~jerry On 7/27/05, via RT Michael G Schwern <[EMAIL PROTECTED]> wrote: > # New Ticket Created by Michael G Schwe

Re: [perl #36597] [PATCH]Dominance Frontiers

2005-07-28 Thread Will Coleda
The eval tests are failing with a pristine checkout so we can ignore those. Applying your patch to a pristine build yields only the backtrack.t failure: #2 eats 100% of the CPU until I kill it: it doesn't behave that way in svn-head. Looks like PerlString and String were red herrings. Shoul

Re: [perl #36597] [PATCH]Dominance Frontiers

2005-07-28 Thread Will Coleda
FYI, on OS X 10.4.2, I get: Failed Test Stat Wstat Total Fail Failed List of Failed --- t/p6rules/backtrack.t1 256151 6.67% 2 t/pmc/eval.t 3 768143 21.43% 12-14 t/pm

Re: [perl #36597] [PATCH]Dominance Frontiers

2005-07-28 Thread Curtis Rawls
Can someone apply this? I have another patch ready that depends on this one. Thanks! -Curtis On 7/19/05, via RT Curtis Rawls <[EMAIL PROTECTED]> wrote: > # New Ticket Created by Curtis Rawls > # Please include the string: [perl #36597] > # in the subject line of all future correspondence about

Re: Type::Class::Haskell does Role

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO Luke, you wrote: All in all, generic equality and comparison is something that Perl 5 did really poorly. Some people overloaded eq, some overloaded ==, some wrote a ->equal method, and there was no way to shift between the different paradigms smoothly. This is one of the times where we h

Re: Elimination of Item|Pair and Any|Junction

2005-07-28 Thread Larry Wall
On Thu, Jul 28, 2005 at 05:31:46AM +0800, Autrijus Tang wrote: : On Thu, Jul 28, 2005 at 03:55:55AM +0800, Autrijus Tang wrote: : > Hrm. I thought the original motivation of forcing people to write : > : > Any|Junction : > : > was precisely to discourage people from accidentally write : > :

Re: embedding ParTcl

2005-07-28 Thread Will Coleda
On Jul 27, 2005, at 9:46 PM, Thilo Planz wrote: Hi, I have a few beginner's question about ParTcl. I am trying to embed ParTcl into a PIR application, which seems to work quite nicely, except that I have not yet figured out how to do certain things. This is almost certainly no fault

Re: lazy list syntax?

2005-07-28 Thread Yuval Kogman
On Wed, Jul 27, 2005 at 20:17:41 -0300, Flavio S. Glock wrote: > I have an object representing the sequence "1..Inf". > I tried creating a Coroutine, and then assigning the Coroutine to an > Array, but it only yielded "1": > > my @a = $span.lazy; # "1" > > The coroutine worked fine in a "whil

Re: Elimination of Item|Pair and Any|Junction

2005-07-28 Thread Yuval Kogman
On Thu, Jul 28, 2005 at 00:26:27 +0800, Autrijus Tang wrote: > Er, but Junctions take methods, the same way Objects do, so if there is > an Object in the type hierarchy, Junction probably belongs to it. Maybe there is a role called 'Junctive'? I think junctions are orthogonal to other types, excep

Re: The meaning of "returns"

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO Autrijus, you wrote: D) Make the return type observe both #2 and #3 at compile time, using type variables: sub id ( (::T) $x ) returns ::T { return($x) } And this is a natural extension to guide the inferencer so it won't be totally giving up on polymorphic functions such a

Re: execution platform object? gestalt?

2005-07-28 Thread Yuval Kogman
On Wed, Jul 27, 2005 at 08:59:53 -0700, Larry Wall wrote: > So in this particular case it might be better to just say > > if exists &get_javascript_class {...} Eeep... That reminds me of how you check between versions of perl. I think I want something else: $?RUNTIME this is a comm

Re: Garbage Collector API

2005-07-28 Thread Yuval Kogman
On Thu, Jul 28, 2005 at 01:08:13 -, David Formosa (aka ? the Platypus) wrote: > On 26 Jul 2005 05:18:05 -, David Formosa ) > <[EMAIL PROTECTED]> wrote: > > > We are should have an API to talk to the GC and give it hints about when it > > should run, and tweek the verious paramitors for i

Re: An idea for doing pack.

2005-07-28 Thread Yuval Kogman
I have a fundamental disagreement with what pack used to be - it's too stringish... =) the printf and unpack syntaxes always bothered me because they are akin to 'eval'ing, more than they are to quasi quoting. I like your Pack object - that is the parsed template, but I'd also like to be able to

Re: pmc syntax

2005-07-28 Thread Leopold Toetsch
Klaas-Jan Stol wrote: 1a: when are set_pointer and get_pointer actually called? From pmc.c:pmc_new 1b: in set_pointer (I copied it from None.pmc) an assertion is done. Why is this? (this is also part of question 1a: set_pointer is called once, apparently?) Well, it asserts that you really

Re: pmc syntax

2005-07-28 Thread Klaas-Jan Stol
Leopold Toetsch wrote: Klaas-Jan Stol wrote: mmm, I looked at classes/none.pmc, this is a copy/paste: === #include static PMC * Py_None; pmclass None singleton { Ah, yep - None is a singleton too - sorry for my confusion. So it should be rather easy to subclass None, impleme

Re: pmc syntax

2005-07-28 Thread Leopold Toetsch
Klaas-Jan Stol wrote: mmm, I looked at classes/none.pmc, this is a copy/paste: === #include static PMC * Py_None; pmclass None singleton { Ah, yep - None is a singleton too - sorry for my confusion. So it should be rather easy to subclass None, implement get/set_pointer and us

Re: Messing with the type heirarchy

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO Michele, you wrote: On Wed, 27 Jul 2005, [ISO-8859-1] TSa wrote: value to carry on a useless imaginary part. And Complex should consistently return undef when compared to other Nums or Complexes. And the Compare role My 0.02+0.01i: in mathematics it is commonly used to write e.g. z<3

Re: [PATCH] Readme file dynclasses

2005-07-28 Thread Leopold Toetsch
Klaas-Jan Stol wrote: hi, attached a patch that changes the README file in dynclasses directory. The original doesn't mention you have to do "perl Configure.pl" after adding a new PMC file. Thanks, applied - r8710. leo

Re: pmc syntax

2005-07-28 Thread Klaas-Jan Stol
Leopold Toetsch wrote: Klaas-Jan Stol wrote: Suppose I would want to have my own custom representation of "None". What should I do to have my child class be a singleton too? (just extending singleton as well?) None isn't a singleton. But have a look at the Null PMC or better env.pmc.

Re: pmc syntax

2005-07-28 Thread Leopold Toetsch
Klaas-Jan Stol wrote: Suppose I would want to have my own custom representation of "None". What should I do to have my child class be a singleton too? (just extending singleton as well?) None isn't a singleton. But have a look at the Null PMC or better env.pmc. $ grep singletion classes/*.

Re: Messing with the type heirarchy

2005-07-28 Thread Michele Dondi
On Wed, 27 Jul 2005, [ISO-8859-1] "TSa (Thomas Sandla?)" wrote: value to carry on a useless imaginary part. And Complex should consistently return undef when compared to other Nums or Complexes. And the Compare role My 0.02+0.01i: in mathematics it is commonly used to write e.g. z<3 to mean "

Re: Compiling dynamic PMCs

2005-07-28 Thread Klaas-Jan Stol
Leopold Toetsch wrote: Klaas-Jan Stol wrote: 1. write the PMC 2. edit parrot/config/gen/makefiles/dynclasses.in 3. make In my case this didn't work. The .in files are processed by Configure.pl to create the real files. perl Configure.pl ... should do it, possibly after 'make realclean'.

[PATCH] Readme file dynclasses

2005-07-28 Thread Klaas-Jan Stol
hi, attached a patch that changes the README file in dynclasses directory. The original doesn't mention you have to do "perl Configure.pl" after adding a new PMC file. klaas-jan --- README 2005-07-28 13:10:51.0 +0200 +++ README.new 2005-07-28 13:10:32.0 +0200 @@ -58,8 +5

[ANNOUNCE] Test::SerialFork

2005-07-28 Thread Peter Haworth
The uploaded file Test-SerialFork-0.01.tar.gz has entered CPAN as file: $CPAN/authors/id/P/PM/PMH/Test-SerialFork-0.01.tar.gz size: 3891 bytes md5: 087b258311b0265ad96946bfd7feb0e9 This module allows you to run the same test multiple times, with different parameters. The forking isol

Re: pmc syntax

2005-07-28 Thread Klaas-Jan Stol
hi, Will Coleda wrote: On Jul 27, 2005, at 4:00 PM, Klaas-Jan Stol wrote: hi, Is there any documentation about the complete syntax for pmc files when writing PMCs (this time in C)? I think that's technically the only way to write PMCs. (things written in PIR are Objects). And, as you

Re: Garbage Collector API

2005-07-28 Thread David Formosa \(aka ? the Platypus\)
On 26 Jul 2005 05:18:05 -, David Formosa ) <[EMAIL PROTECTED]> wrote: > We are should have an API to talk to the GC and give it hints about when it > should run, and tweek the verious paramitors for its running. > > For example [...] Also my Bigobjet $big is GC::timely = Bigobect; # Requ

[perl #36677] Parrot cannot startup if STDERR or STDOUT is closed

2005-07-28 Thread via RT
# New Ticket Created by Michael G Schwern # Please include the string: [perl #36677] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=36677 > Parrot cannot start up if either STDOUT or STDERR are closed. In both cases it ex

Re: Compiling dynamic PMCs

2005-07-28 Thread Leopold Toetsch
Klaas-Jan Stol wrote: 1. write the PMC 2. edit parrot/config/gen/makefiles/dynclasses.in 3. make In my case this didn't work. The .in files are processed by Configure.pl to create the real files. perl Configure.pl ... should do it, possibly after 'make realclean'. thanks, klaas-jan le

Re: [PATCH] recreatable shuffled tests for "prove"

2005-07-28 Thread David Cantrell
demerphq wrote: Whose command line? Mine doesnt by default come with xargs. I expect it didn't come with perl either, yet you seem to have managed to install that yourself. -- David Cantrell

Compiling dynamic PMCs

2005-07-28 Thread Klaas-Jan Stol
hi, as my attempt to write a lua compiler is continuing (slowly but surely), and quite some stuff is working already (although rather s l o w), I decided it was time to write the PMCs representing the various Lua datatypes. I understood from my previous postings (and replies on those) that PM

Re: Inferring (Foo of Int).does(Foo of Any)

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: [..much better explaination of the co/contra prob then mine skipped..] Hence, my proposal is that Perl 6's generics should infer its variancy, based on the signature of its methods, and derive subtyping relationships accordingly. Yes!! That would be great. But I wou

Re: Elimination of Item|Pair and Any|Junction

2005-07-28 Thread TSa (Thomas Sandlaß)
Larry Wall wrote: On Wed, Jul 27, 2005 at 06:28:22PM +0200, "TSa (Thomas Sandlaß)" wrote: : Since we are in type hierachies these days, here's my from ::Any : towards ::All version. That's pretty, but if you don't move Junction upward, you haven't really addressed the question Autrijus is asking