trying to use a role within a role

2006-10-02 Thread Richard Hainsworth
Could someone please tell me what is wrong with the following? role win_text { has $.win_mytxt1 is rw; has $.win_mytxt2 is rw; }; role mywindow { has $.border is rw; has $.colour is rw; does win_text; }; my $w = new mywindow; $w.border = 2; $w.colour = 'red'; say $w.border; say

Re: class interface of roles

2006-10-02 Thread Brad Bowman
Sam Vilain wrote: TSa wrote: is this subject not of interest? I just wanted to start a discussion about the class composition process and how a role designer can require the class to provide an equal method and then augment it to achieve the correct behavior. Contrast that with the need to do

Re: trying to use a role within a role

2006-10-02 Thread Audrey Tang
在 Sep 30, 2006 6:26 PM 時,Richard Hainsworth 寫到: role win_text { has $.win_mytxt1 is rw; has $.win_mytxt2 is rw; }; role mywindow { has $.border is rw; has $.colour is rw; does win_text; }; my $w = new mywindow; $w.border = 2; $w.colour = 'red'; say $w.border; say $w.colour;

Re: trying to use a role within a role

2006-10-02 Thread Audrey Tang
在 Oct 2, 2006 5:56 PM 時,Audrey Tang 寫到: At this moment only role mywindow does win_text works; the statement-level does form was not implemented, but I should be able to do so in the next few days. Update: It's now implemented as r13782. Richard: The t/README file should get you started at

Parrot Bug Summary

2006-10-02 Thread Parrot Bug Summary
Parrot Bug Summary http://rt.perl.org/rt3/NoAuth/parrot/Overview.html Generated at Mon Oct 2 13:15:04 2006 GMT --- * Numbers * New Issues * Overview of Open Issues * Ticket Status By Version * Requestors with

[perl #40380] [PATCH] errors on 'make install' - src/pdb.c

2006-10-02 Thread Kevin Tew via RT
=== src/pdb.c == --- src/pdb.c (revision 133) +++ src/pdb.c (local) @@ -136,7 +136,6 @@ PDB_t *pdb; void *yyscanner; -do_yylex_init ( yyscanner ); /*Parrot_set_config_hash(); TODO link with cfg */

Re: [perl #40438] Extending a dynpmc with a PIR method fails

2006-10-02 Thread Kevin Tew
Update pdump patch Kevin Tew wrote: The attached patch is my first step at locating bug #40438. It adds pdump -d functionality for keys. Leopold Toetsch via RT wrote: Thanks, I've applied a modified version of the patch, showing that it's a namespace issue caused by the .HLL line. Using

Re: Re: class interface of roles

2006-10-02 Thread Stevan Little
On 10/2/06, Brad Bowman [EMAIL PROTECTED] wrote: Sam Vilain wrote: TSa wrote: is this subject not of interest? I just wanted to start a discussion about the class composition process and how a role designer can require the class to provide an equal method and then augment it to achieve the

[svn:perl6-synopsis] r12561 - doc/trunk/design/syn

2006-10-02 Thread audreyt
Author: audreyt Date: Mon Oct 2 07:45:13 2006 New Revision: 12561 Modified: doc/trunk/design/syn/S06.pod Log: * S06: Excise the word Multimethod in places where it also referred to multisubs. Modified: doc/trunk/design/syn/S06.pod

Re: class interface of roles

2006-10-02 Thread Jonathan Lang
Brad Bowman wrote: Hi, Did you mean to go off list? No, I didn't. Jonathan Lang wrote: Brad Bowman wrote: Does the class GenSquare does GenEqual does GenPointMixin line imply an ordering of class composition? No. This was a conscious design decision: the order in which you compose

Re: Re: class interface of roles

2006-10-02 Thread Jonathan Lang
Stevan Little wrote: Brad Bowman wrote: How does a Role require that the target class implement a method (or do another Role)? IIRC, it simply needs to provide a method stub, like so: method bar { ... } This will tell the class composer that this method must be created before everything is

Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
Twice now in the last week or so, I've run across suggestions to the effect of including syntax that forbids otherwise valid code from being used. First was during the discussion about coming up with a way to program by contract, where the poster suggested that a means of saying any declaration

Re: Don't tell me what I can't do!

2006-10-02 Thread jerry gay
On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict;

Re: Don't tell me what I can't do!

2006-10-02 Thread Craig DeForest
On Oct 2, 2006, at 10:26 AM, jerry gay wrote: On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict;

Re: Don't tell me what I can't do!

2006-10-02 Thread Andy Armstrong
On 2 Oct 2006, at 17:48, Jonathan Lang wrote: The examples I gave involved specific roles or routines being forbidden from use in certain situations; my gut instinct is that if you don't think that it's appropriate to use a particular role or routine somewhere, you should simply not use it

Re: Don't tell me what I can't do!

2006-10-02 Thread Smylers
jerry gay writes: On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict; That's different:

Re: Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
jerry gay wrote: Jonathan Lang wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict; Hmm... granted. But that does tend to sidestep the main

Re: Don't tell me what I can't do!

2006-10-02 Thread Dave Whipp
Smylers wrote: use strict; That's different: it's _you_ that's forbidding things that are otherwise legal in your code; you can choose whether to do it or not. Which suggests that the people wanting to specify the restrictions are actually asking for a way to specify additional strictures

Re: Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
Dave Whipp wrote: Smylers wrote: use strict; That's different: it's _you_ that's forbidding things that are otherwise legal in your code; you can choose whether to do it or not. Which suggests that the people wanting to specify the restrictions are actually asking for a way to specify

Can I use Parrot's subsystems in an embedded code?

2006-10-02 Thread Nikolay Ananiev
Hi there! I'm starting an experimental C project that will embed parrot. I'd like my program to be as portable as parrot itself, so my question is: Can I take advantage of parrot's portableness? For example, if my program does some IO stuff, can I use Parrot's IO subsystem in my C code to do this

Re: Don't tell me what I can't do!

2006-10-02 Thread Dave Whipp
Jonathan Lang wrote: Before we start talking about how such a thing might be implemented, I'd like to see a solid argument in favor of implementing it at all. What benefit can be derived by letting a module specify additional strictures for its users? Ditto for a role placing restrictions on

Re: [CAGE] perl coding standards...

2006-10-02 Thread Chris Dolan
On Sep 26, 2006, at 10:21 PM, Will Coleda wrote: I took a first pass at a perlcritic test: t/codingstd/ perlcritic.t ; this test isn't run by default. [snip] Cool! Attached is a patch to simplify this test code a little bit by leveraging Test::Perl::Critic. I also reworked

Re: Don't tell me what I can't do!

2006-10-02 Thread Jonathan Lang
Dave Whipp wrote: Or we could view it purely in terms of the design of the core strict and warnings modules: is it better to implement them as centralised rulesets, or as a distributed mechanism by which core modules can register module-specific strictures/warnings/diagnostics. Question: if

Re: Don't tell me what I can't do!

2006-10-02 Thread Dave Whipp
Jonathan Lang wrote: Dave Whipp wrote: Or we could view it purely in terms of the design of the core strict and warnings modules: is it better to implement them as centralised rulesets, or as a distributed mechanism by which core modules can register module-specific

Re: Don't tell me what I can't do!

2006-10-02 Thread Larry Wall
On Mon, Oct 02, 2006 at 02:01:34PM -0700, Jonathan Lang wrote: : Dave Whipp wrote: : Or we could view it purely in terms of the design of the core strict : and warnings modules: is it better to implement them as centralised : rulesets, or as a distributed mechanism by which core modules can :

Re: Don't tell me what I can't do!

2006-10-02 Thread Luke Palmer
On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? This reminds me of the endless student proofs that trisect

Questions about FixedBooleanArray and ResizeBooleanArray

2006-10-02 Thread Karl Forner
Hi, I coud not find detailed specifications for these PMCs, so I was wondering what should happen when they are (re)sized. For example: a = new FixedBooleanArray a = 3 So a has been (re)sized in order to be able to hold 3 elements, but what should be the value of these elements ? Do they

Heads up: Dynamic environment now captured in continuations

2006-10-02 Thread Bob Rogers
This weekend's project (committed as r14830) makes continuations capture the dynamic environment so that they can restore it properly on invocation. This makes it possible for multiple continuations to coexist that return to different environments in the same context. One word of caution,

[svn:parrot-pdd] r14831 - in trunk: . docs/pdds/clip

2006-10-02 Thread chromatic
Author: chromatic Date: Mon Oct 2 18:06:40 2006 New Revision: 14831 Modified: trunk/docs/pdds/clip/pdd13_bytecode.pod Changes in other areas also in this revision: Modified: trunk/ (props changed) Log: Minor POD formatting fixes to make the POD checking test pass again. Modified:

Re: class interface of roles

2006-10-02 Thread chromatic
On Monday 02 October 2006 08:58, Jonathan Lang wrote: I wonder if it would be worthwhile to extend the syntax of roles so that you could prepend a no on any declarative line, resulting in a compilation error any time something composing that role attempts to include the feature in question.  

Re: Don't tell me what I can't do!

2006-10-02 Thread chromatic
On Monday 02 October 2006 12:32, Jonathan Lang wrote: Before we start talking about how such a thing might be implemented, I'd like to see a solid argument in favor of implementing it at all. What benefit can be derived by letting a module specify additional strictures for its users? Ditto

Re: Re: Re: class interface of roles

2006-10-02 Thread Stevan Little
On 10/2/06, Jonathan Lang [EMAIL PROTECTED] wrote: This notion of exclusionary roles is an interesting one, though. I'd like to hear about what kinds of situations would find this notion useful; but for the moment, I'll take your word that such situations exist and go from there. Well to be

Re: Don't tell me what I can't do!

2006-10-02 Thread Aaron Sherman
Jonathan Lang wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict;

Re: Don't tell me what I can't do!

2006-10-02 Thread jerry gay
On 10/2/06, Aaron Sherman [EMAIL PROTECTED] wrote: Jonathan Lang wrote: I'm not used to programming styles where a programmer intentionally and explicitly forbids the use of otherwise perfectly legal code. Is there really a market for this sort of thing? use strict; you're so twelve