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

2005-08-11 Thread Leopold Toetsch
Curtis Rawls wrote: This patch adds a bb_remove_edge() function, and decouples unreachable blocks from the CFG by removing their successor edges. Thanks, applied - r8913 leo

Re: parrot -I?

2005-08-11 Thread Leopold Toetsch
Amir Karger wrote: If I say perl Zcode/t/harness I want it to run parrot Zcode/z3.imc testfile.z3. My current problem is that z3.imc includes a file z3main.imc. So the above command breaks because z3.imc can't find the include file. If this were Perl, I would just say Perl-IZcode Zcode/z3.imc

Re: [perl #36852] [PATCH] imcc/main.c - to fix segmentation fault on -E (--pre-process-only) option

2005-08-11 Thread Leopold Toetsch
[EMAIL PROTECTED] (via RT) wrote: Objective: Parrot stops for segmentation fault when -E (--pre-process-only) option is specified. This patch fixes this bug. Thanks, applied -r8914 (Please not that the preprocessor is currently not uptodate and doesn't process all tokens correctly)

Classes as special undefs

2005-08-11 Thread Stuart Cook
On 11/08/05, Larry Wall [EMAIL PROTECTED] wrote: I'll have to think about the rest of your proposal, but I was suddenly struck with the thought that our platonic Class objects are really forms of undef: say defined IO; # prints 0 That is, we already have an object of type IO that

Re: Typed type variables (my Foo ::x)

2005-08-11 Thread Autrijus Tang
On Thu, Aug 11, 2005 at 08:02:00PM +1000, Stuart Cook wrote: What's the current meaning of type annotations on type-variables? For example, if I say... my Foo ::x; ...which of these does it mean? a) ::x (=) ::Foo (i.e. any type assigned to x must be covariant wrt. Foo) b) ::x is

Re: Classes as special undefs

2005-08-11 Thread Brent 'Dax' Royal-Gordon
Stuart Cook [EMAIL PROTECTED] wrote: On 11/08/05, Larry Wall [EMAIL PROTECTED] wrote: I'll have to think about the rest of your proposal, but I was suddenly struck with the thought that our platonic Class objects are really forms of undef: say defined IO; # prints 0 That is, we

Perl 6 Summary for 2005-08-02 through 2005-08-10

2005-08-11 Thread Matt Fowles
Perl 6 Summary for 2005-08-02 through 2005-08-10 All~ Welcome to another summary, brought to you by chinese food. The attentive among you will notice that this summary is a day late, because I did not feel like doing it yesterday. If only I could do that at work... Perl 6

Re: Classes as special undefs

2005-08-11 Thread Stuart Cook
On 11/08/05, Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] wrote: One that you missed was that this syntax: my Dog $spot .=new(); Falls out of it quite naturally. Actually I tried to mention that indirectly, but I'm glad you explicitly mentioned it. On the other hand, there are other

Re: Proposal: is defined trait, is typed trait, traits pragma.

2005-08-11 Thread TSa
HaloO, Autrijus Tang wrote: The purpose is that we don't have to be strong typists to enjoy Strong Typing. To make Perl6 easier to type, and easier to Type. Great! You, if not solve, but at least aim at relieving the pain caused by the 'proliferation of type parameters' problem. Consider me

Re: Translating (or at least parsing) Java interface definitions

2005-08-11 Thread Gaal Yahas
On Mon, Aug 08, 2005 at 10:25:26AM +0100, Tim Bunce wrote: Anyone done any work on parsing Java interface definitions? And, ideally, translating them into roughly equivalent Perl 6? I wrote something that did this with Parse::RecDescent. Unfortunately, I don't own the code. For my purposes I

Typed type variables (my Foo ::x)

2005-08-11 Thread Stuart Cook
Hi, What's the current meaning of type annotations on type-variables? For example, if I say... my Foo ::x; ...which of these does it mean? a) ::x (=) ::Foo (i.e. any type assigned to x must be covariant wrt. Foo) b) ::x is an object of type Foo, where Foo.does(Class) c) Something else? I

Re: Typed type variables (my Foo ::x)

2005-08-11 Thread TSa
HaloO, Autrijus Tang wrote: On Thu, Aug 11, 2005 at 08:02:00PM +1000, Stuart Cook wrote: my Foo ::x; a) ::x (=) ::Foo (i.e. any type assigned to x must be covariant wrt. Foo) b) ::x is an object of type Foo, where Foo.does(Class) c) Something else? My current reading is a) -- but only if

[perl #36862] [PATCH] m4 tests compatible with Win32

2005-08-11 Thread François
# New Ticket Created by François PERRAD # Please include the string: [perl #36862] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36862 *nix utilities are not available on Win32. But Perl allows to write portable

Re: Classes as special undefs

2005-08-11 Thread Autrijus Tang
On Thu, Aug 11, 2005 at 08:53:47PM +1000, Stuart Cook wrote: On 11/08/05, Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] wrote: One that you missed was that this syntax: my Dog $spot .=new(); Falls out of it quite naturally. Actually I tried to mention that indirectly, but I'm glad

Re: Classes as special undefs

2005-08-11 Thread TSa
HaloO, Autrijus Tang wrote: What about this? OK, let's play some manual type inferencing ;) my $spot = Dog; $spot.does(Item of Dog), that means what ever the name Dog represents was stored or bound to $spot. defined($spot); # false!? true! Even for my $spot = ::Dog

RE: Pugs makefile minor inconvenience: pugs.exe.bat

2005-08-11 Thread Konovalov, Vadim
On 5/28/05, Autrijus Tang [EMAIL PROTECTED] wrote: On Sat, May 28, 2005 at 09:24:13PM +0200, Gregoire Pean wrote: make install with Pugs creates a pugs.exe.bat file in Perl bin directrory, which is useless and don't work since pugs.exe is not a Perl script. It should be removed.

Re: Classes as special undefs

2005-08-11 Thread Autrijus Tang
On Thu, Aug 11, 2005 at 04:47:49PM +0200, TSa wrote: OK, let's play some manual type inferencing ;) Note that $spot here is intended to be dynamic typed, i.e. not subject to inference. :-) my $spot = Dog; $spot.does(Item of Dog), that means what ever the name Dog represents was stored

Re: Classes as special undefs

2005-08-11 Thread TSa
HaloO, Stuart Cook wrote: On the other hand, there are other things that don't work quite so well: my Dog $spot; $spot.can('bark');# Not until he's instantiated... Are you objecting to the fact that it can't possibly return a valid method, or that it will inappropriately true/false

Re: Proposal: is defined trait, is typed trait, traits pragma.

2005-08-11 Thread Larry Wall
On Thu, Aug 11, 2005 at 10:47:35AM +0800, Autrijus Tang wrote: : Really this is about path of least resistance. Without inference, : we are asking the user to choose between: : : 1) Verbose annotation and type safety : 2) Convenience (no annotation) and unsafe behaviour : : Adding

Re: Classes as special undefs

2005-08-11 Thread Larry Wall
On Thu, Aug 11, 2005 at 04:47:49PM +0200, TSa wrote: : defined($spot); # false!? : : true! Even for my $spot = ::Dog because when my is evaluated the : name ::Dog has be be bound, AUTOLOADED or by whatever means become : available. What does binding have to do with definedness? In Perl 6

Re: Proposal: is defined trait, is typed trait, traits pragma.

2005-08-11 Thread Autrijus Tang
On Thu, Aug 11, 2005 at 09:22:27AM -0700, Larry Wall wrote: On Thu, Aug 11, 2005 at 10:47:35AM +0800, Autrijus Tang wrote: : Adding inference (is typed) to the mix massively sweetens the first : option, which would be a good thing. Only if the programmer can be taught to understand the

[perl #36862] [PATCH] m4 tests compatible with Win32

2005-08-11 Thread Bernhard Schmalhofer via RT
[EMAIL PROTECTED] - Do 11. Aug 2005, 05:28:37]: *nix utilities are not available on Win32. But Perl allows to write portable test. Merci, applied. I'm wondering why we don't use ExtUtils::Commands by default for all of the Parrot Makefiles and config tests. -- /* [EMAIL PROTECTED] */

Re: my $pi is constant = 3;

2005-08-11 Thread Autrijus Tang
On Wed, Aug 10, 2005 at 12:41:17PM -0700, Larry Wall wrote: : If yes, what does it desugar to? : : my $pi is constant := 3; : my $pi is constant ::= 3; In this case it desugars to my $pi is constant = 3; :-) However, I wonder if the intention was to replace the Perl 5

Re: my $pi is constant = 3;

2005-08-11 Thread Larry Wall
On Fri, Aug 12, 2005 at 01:43:43AM +0800, Autrijus Tang wrote: : On Wed, Aug 10, 2005 at 12:41:17PM -0700, Larry Wall wrote: : : If yes, what does it desugar to? : : : : my $pi is constant := 3; : : my $pi is constant ::= 3; : : In this case it desugars to : : my $pi is

Test::Code

2005-08-11 Thread Ovid
X-Posted to Perlmonks (http://perlmonks.org/index.pl?node_id=483100) I frequently write code that generates anonymous functions on the fly. However, I often want to verify that these functions are correct without executing them. To this end, I've started writing Test::Code. Here's the start of

Re: Typed type variables (my Foo ::x)

2005-08-11 Thread Luke Palmer
On 8/11/05, TSa [EMAIL PROTECTED] wrote: HaloO, Autrijus Tang wrote: On Thu, Aug 11, 2005 at 08:02:00PM +1000, Stuart Cook wrote: my Foo ::x; a) ::x (=) ::Foo (i.e. any type assigned to x must be covariant wrt. Foo) b) ::x is an object of type Foo, where Foo.does(Class) c) Something

Re: $object.meta.isa(?) redux

2005-08-11 Thread Luke Palmer
On 8/10/05, Sam Vilain [EMAIL PROTECTED] wrote: On Wed, 2005-08-10 at 21:00 -0400, Joe Gottman wrote: Will there be an operator for symmetric difference? I nominate (^). That makes sense, although bear in mind that the existing Set module for Perl 6, and the Set::Scalar and Set::Object

Re: set questions -- Re: $object.meta.isa(?) redux

2005-08-11 Thread Luke Palmer
On 8/10/05, Flavio S. Glock [EMAIL PROTECTED] wrote: I wonder if infinite sets (recurrences) will be supported - then I'll move all(ext/Recurrence, ext/Span, ext/Set-Infinite) to Perl6::Container::Set::Ordered - cool. Note there is now a Set role. Emphasis on role. There will be a finite

Re: Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-11 Thread Luke Palmer
On 8/10/05, Dave Rolsky [EMAIL PROTECTED] wrote: [changing the subject line for the benefit of the summarizer ...] On Wed, 10 Aug 2005, Larry Wall wrote: And now some people will begin to wonder how ugly set values will look. We should also tell them that lists (and possibly

Re: Test::Code

2005-08-11 Thread Michael G Schwern
On Thu, Aug 11, 2005 at 02:49:57PM -0700, Ovid wrote: BEGIN { use_ok 'Test::Code' or die } ok defined *::is_code{CODE}, 'is_code should be exported to our namespace'; I usually do this with can_ok() can_ok( __PACKAGE__, qw(is_code isnt_code) ); is_code sub { 1 }, sub {

Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread leif . eriksen
[EMAIL PROTECTED] wrote: I usually do this with can_ok() can_ok( __PACKAGE__, qw(is_code isnt_code) ); Initially i thought Would that work ? Isnt __PACKAGE__ equal to main:: in a t file ? then I realised we're testing that the use_ok is exporting these to our namespace, which

Re: Test::Code

2005-08-11 Thread Ovid
--- Michael G Schwern [EMAIL PROTECTED] wrote: ok defined *::is_code{CODE}, 'is_code should be exported to our namespace'; I usually do this with can_ok() can_ok( __PACKAGE__, qw(is_code isnt_code) ); I specifically avoid that with methods because can_ok provides a default

Re: Test::Code

2005-08-11 Thread Ivan Tubert-Brohman
Michael G Schwern wrote: On Thu, Aug 11, 2005 at 02:49:57PM -0700, Ovid wrote: BEGIN { use_ok 'Test::Code' or die } ok defined *::is_code{CODE}, 'is_code should be exported to our namespace'; I usually do this with can_ok() can_ok( __PACKAGE__, qw(is_code isnt_code) );

Re: Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread Michael G Schwern
On Fri, Aug 12, 2005 at 10:28:36AM +1000, [EMAIL PROTECTED] wrote: I'm thinking that the code, tests, data and pod are all there in the pm file - that seems on the surface a good thing. Does this seem like a reasonable idea ? Against it is the significant inertia the current .t regime

Re: Test::Code

2005-08-11 Thread Ovid
--- Ivan Tubert-Brohman [EMAIL PROTECTED] wrote: Isn't ok defined *::is_code{CODE}; just a convoluted way of saying ok defined is_code; Er, yes. It is. That's just a really bad habit on my part. I do a fair amount of typeglob diddling, so that tends to stick in my mind.

Re: Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread leif . eriksen
[EMAIL PROTECTED] wrote: You may wish to look at Test::Inline and Test::Class which are different approaches to putting your tests near your code. Test::Inline looks like what I'm thinking - thanx Also __TEST__ is not legal Perl which gets into source filters and then the burning and

MetaModel notes

2005-08-11 Thread Nathan Gray
My notes to myself as I read the 2005-08-04 IRC discussion of the MetaModel: http://colabti.de/irclogger/irclogger_log/perl6?date=2005-08-04,Thusel=356#l564 Clarification, corrections, and questions welcome. Master document at

Re: Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-11 Thread Mark A. Biggar
Luke Palmer wrote: On 8/10/05, Dave Rolsky [EMAIL PROTECTED] wrote: [changing the subject line for the benefit of the summarizer ...] On Wed, 10 Aug 2005, Larry Wall wrote: And now some people will begin to wonder how ugly set values will look. We should also tell them that lists (and

Re: Test::Code

2005-08-11 Thread James E Keenan
Ovid wrote: X-Posted to Perlmonks (http://perlmonks.org/index.pl?node_id=483100) I frequently write code that generates anonymous functions on the fly. However, I often want to verify that these functions are correct without executing them. To this end, I've started writing Test::Code.

Re: Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-11 Thread Mark A. Biggar
Mark A. Biggar wrote: Luke Palmer wrote: On 8/10/05, Dave Rolsky [EMAIL PROTECTED] wrote: [changing the subject line for the benefit of the summarizer ...] On Wed, 10 Aug 2005, Larry Wall wrote: And now some people will begin to wonder how ugly set values will look. We should also tell

Re: my $pi is constant = 3;

2005-08-11 Thread Ashley Winters
On 8/11/05, Larry Wall [EMAIL PROTECTED] wrote: So either we have to bifurcate the concept into temporarily constant and permanently constant, or we force people to distinguish with ::= (or is constant('foo')), or we make some representations about the requirement for the compiler to optimize

Re: Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-11 Thread Larry Wall
On Thu, Aug 11, 2005 at 08:25:23PM -0700, Mark A. Biggar wrote: : Mark A. Biggar wrote: : Small issue, what comparison operator do you use to determine : duplicates? For example (possibly pathological case): : : (undef but true) (+) (undef but false) : : Actually, I'm going to make a stab at