Re: set operations for roles

2006-10-20 Thread TSa
HaloO, Jonathan Lang wrote: role R3 does A B { ... } R3.does(A) # false: R3 can't neccessarily do everything that A can. A.does(R3) # false: A can't neccessarily do everything that R3 can. That last one should be true. Role R3 contains the things that A and B have in common. Hence

Re: Interrogative statements

2006-10-20 Thread Juerd
Jonathan Lang skribis 2006-10-19 18:27 (-0700): Let's say that I want $expression?; to mean the same thing as the statement $_ = $expression; That is, any statement that ends with a '?;' instead of a ';' evaluates in scalar context instead of void context and stores the result

Re: classnames and HLL namespaces -- help!

2006-10-20 Thread Allison Randal
Matt Diephouse wrote: Patrick R. Michaud [EMAIL PROTECTED] wrote: According to pdd21, each HLL gets its own hll_namespace. PGE is really a form of HLL compiler, so it should have its own hll_namespace, instead of using parrot's hll namespace: .HLL 'pge', '' I don't know that that's

Re: classnames and HLL namespaces -- help!

2006-10-20 Thread Allison Randal
Matt Diephouse wrote: Patrick R. Michaud [EMAIL PROTECTED] wrote: On Thu, Oct 19, 2006 at 10:01:29PM -0400, Matt Diephouse wrote: This is unspecced. ATM, all classes go into the 'parrot' HLL. This is a relic of the past and I think it needs to change. I'm pretty sure that HLL classes will

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: role R3 does A B { ... } R3.does(A) # false: R3 can't neccessarily do everything that A can. A.does(R3) # false: A can't neccessarily do everything that R3 can. That last one should be true. Role R3 contains the things that A and B have in common.

Embedded perl5 modules

2006-10-20 Thread Richard Hainsworth
Upgraded to pugs 6.13 after seeing comprehensive support for interoperability with Perl 5 modules. I want to test gui modules and I am trying the Gtk2 and Wx modules. The following program works under perl5: use strict; use Wx; my $app = Wx::SimpleApp-new; my $frame=Wx::Frame-new(undef, -1,

Re: Embedded perl5 modules

2006-10-20 Thread Steffen Schwigon
Richard Hainsworth [EMAIL PROTECTED] writes: use perl5:Wx; my $app = Wx::SimpleApp.new; my $frame=Wx::Frame.new(undef, -1, 'Hello world!'); $frame.Show; $app.MainLoop; The following is the result: $pugs wxtest.p6 *** No compatible subroutine found: Wx::SimpleApp at wxtest.p6 line 2,

Re: set operations for roles

2006-10-20 Thread TSa
HaloO, Jonathan Lang wrote: In short, R3 isn't neccessarily a subset of A; it's a superset of A B. In a partial ordering graph, there's no reliable ordering between R3 and A. The standard syntax for creating roles can't reliably produce a subset of an existing role, because it always allows

Threads, magic?

2006-10-20 Thread Relipuj
How does one do this: http://www.davidnaylor.co.uk/archives/2006/10/19/threaded-data-collection-with-python-including-examples/ in perl 6? Assumin get_feed_list, get_feed_contents, parse_feed, and store_feed_items are handled by modules like LWP and XML::Parser. Will there be something native

Re: set operations for roles

2006-10-20 Thread TSa
HaloO, I wrote: In fact if we decide to specify a role combination syntax then it should be the same everywhere. That means in a signature A|B would require a more specific type and pure A or B wouldn't be admissible. To get the old meaning of | you have to write AB or perhaps the juxtaposition

Re: requirements gathering on mini transformation language

2006-10-20 Thread Markus Triska
chromatic writes: That's part of it With his permission, I've put the relevant section of Stefan Kral's master's thesis online at: http://stud4.tuwien.ac.at/~e0225855/kral_optimizer.pdf The chapter describes the implementation of a rule-based peep-hole optimizer using Prolog DCGs. The rules

Re: Re: classnames and HLL namespaces -- help!

2006-10-20 Thread Matt Diephouse
Allison Randal [EMAIL PROTECTED] wrote: Matt Diephouse wrote: Patrick R. Michaud [EMAIL PROTECTED] wrote: On Thu, Oct 19, 2006 at 10:01:29PM -0400, Matt Diephouse wrote: This is unspecced. ATM, all classes go into the 'parrot' HLL. This is a relic of the past and I think it needs to

Re: set operations for roles

2006-10-20 Thread TSa
HaloO, I wrote: Yes, but I was conjecturing that the additions to AB are pushed down to A and B such that their intension sets remain strict supersets of AB. Think of the Complex example that might read role Complex does Num !Comparable { method im { return 0; } method re {

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: In short, R3 isn't neccessarily a subset of A; it's a superset of A B. In a partial ordering graph, there's no reliable ordering between R3 and A. The standard syntax for creating roles can't reliably produce a subset of an existing role, because it always

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
TSa wrote: Here is yet another idea to go with the two lattice operations: /\ meet also: infimum, intersection, glb (greatest lower bound) \/ join also: supremum, union,lub (least upper bound) I have to admit: if it turns out that '' and '|' can't be used for 'intersection'

Re: classnames and HLL namespaces -- help!

2006-10-20 Thread Will Coleda
Matt Diephouse writes: Allison Randal [EMAIL PROTECTED] wrote: Matt Diephouse wrote: Patrick R. Michaud [EMAIL PROTECTED] wrote: On Thu, Oct 19, 2006 at 10:01:29PM -0400, Matt Diephouse wrote: This is unspecced. ATM, all classes go into the 'parrot' HLL. This is a relic of the past

Re: set operations for roles

2006-10-20 Thread Larry Wall
On Fri, Oct 20, 2006 at 09:10:12AM -0700, Jonathan Lang wrote: : TSa wrote: : Here is yet another idea to go with the two lattice operations: : :/\ meet also: infimum, intersection, glb (greatest lower bound) :\/ join also: supremum, union,lub (least upper bound) : : I have

Re: set operations for roles

2006-10-20 Thread Jonathan Lang
Larry Wall wrote: Anyway, I think the type constructors need to avoid overloading the logic operators. Perl 6 is an operator-rich language because that contributes to long-term clarity despite the short-term confusion. OK. My main dog in this race is the idea of defining new roles through

Re: class interface of roles

2006-10-20 Thread Larry Wall
On Thu, Oct 19, 2006 at 03:31:18PM -0700, Jonathan Lang wrote: : Larry Wall wrote: : Though actually, now that I think about it, the cascaded notation : in S12 is illegal according to S03, since does is classified as : non-chaining, which implies non-associative. : : Wait a minute. Isn't

Re: class interface of roles

2006-10-20 Thread Larry Wall
On Fri, Oct 20, 2006 at 04:47:04PM -0700, Larry Wall wrote: : For now the conservative thing is probably that we should just leave : does as non-associative and make you write : : $obj.also_does(A,B,C) : : or some such if you want to get fancy. Presumably $obj does (A,B,C) could also

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

2006-10-20 Thread larry
Author: larry Date: Fri Oct 20 17:01:15 2006 New Revision: 13252 Modified: doc/trunk/design/syn/S12.pod Log: does operator is non-associative according to S03. Leave it that way for now. Modified: doc/trunk/design/syn/S12.pod

Re: class interface of roles

2006-10-20 Thread Jonathan Lang
Larry Wall wrote: Presumably $obj does (A,B,C) could also be made to work even with non-associative does. Right. Note that you _do_ want to be able to do something to the effect of ordered composition in a single statement, though: role A { ... method m { ... } }