Re: weak roles

2006-08-08 Thread Mark Overmeer
* Yuval Kogman ([EMAIL PROTECTED]) [060808 01:04]: > The CPAN has many reinvented wheels. This happened since we have so > many authors (== opinions) over so many years. > > For example, we have Mail::Message to Email::Simple, to > Mail::Internet to They all do the same thing differently. Som

Re: weak roles

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 09:05:07 +0200, Mark Overmeer wrote: > Sometimes, the external interface of a module looks the same, and > there are cases where the internals behave as such as well. In > general, however, the internals are more different then the user > code shows. That makes your propos

Re: weak roles

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 09:05:07 +0200, Mark Overmeer wrote: > Of course, we could use the Email::Abstract interface as a base- > class to all email related modules, but you know that this wouldn't > work for the Perl community... Actually I'd like to expand on this. There are two problem with y

Type annotation on expressions

2006-08-08 Thread Yuval Kogman
Is there any way to type annotate a single expression, without using a temporary variable? my Moose $x = $y; # definitely a Moose now, may have been coerced foo( $x );# foo() doesn't necessarily say it wants Moose Is it possible to say this one expression? Haskell's syntax is shi

Re: Type annotation on expressions

2006-08-08 Thread Daniel Hulme
> Is it possible to say this one expression? Haskell's syntax is shiny > but everybody wants the colon: > > foo( ( $x :: Moose ) ); I may be in a little world of my own here, but isn't this what 'as' is supposed to do? foo($x as Moose); -- "Of all things, good sense is the most fairly

Failing parrot test (t/op/stringu.t)

2006-08-08 Thread Paul Cochrane
Hi all, I have a test in parrot that is consistently failing between svn updates (test output below). I'm not 100% sure if this is the right place to post this; I'm too much of a lurker to subscribe to RT and submit a bug, but I thought people would like to know (I've also had a look on RT, but

Re: Type annotation on expressions

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 11:12:11 +0100, Daniel Hulme wrote: > I may be in a little world of my own here, but isn't this what 'as' is > supposed to do? > > foo($x as Moose); as is a method invocation not a type annotation... It's related, but not the same (last I heard) -- Yuval Kogman <[EMAI

Re: weak roles

2006-08-08 Thread Luke Palmer
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote: The way it could work is a bit like this: class Mail::TheOneTrueWay { does Mail::SomeAPI is weak { method header; # this method has different semantics for # each role. It w

Re: weak roles

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 11:14:40 +, Luke Palmer wrote: >Mail::TheOneTrueWay.new.header; # which one? Either neither, or the "default" one (which is declared default by the class). > A related question: if Mail::SomeAPI and Mail::SomeOtherAPI both > exported a method, say "send", and you

Re: Type annotation on expressions

2006-08-08 Thread Luke Palmer
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote: On Tue, Aug 08, 2006 at 11:12:11 +0100, Daniel Hulme wrote: > I may be in a little world of my own here, but isn't this what 'as' is > supposed to do? > > foo($x as Moose); as is a method invocation not a type annotation... It's related, but no

Re: weak roles

2006-08-08 Thread Luke Palmer
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote: I personally prefer delegates for almost any design dillema, but most CPAN modules aren't that way. Well, what way are they? How else has this problem been solved? Yes, this is necessary for anything heavyweight and probably better design,

Re: Type annotation on expressions

2006-08-08 Thread Yuval Kogman
Actually this particular example is just like coercion, and it's a bad one sorry. It's much more relevant for: fun( $x.foo :: Bar ); in order to annotate the return type for a call's context even if the 'fun' function's signature accepts Any. -- Yuval Kogman <[EMAIL PROTECTED]> h

Re: Type annotation on expressions

2006-08-08 Thread Luke Palmer
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote: It's much more relevant for: fun( $x.foo :: Bar ); in order to annotate the return type for a call's context even if the 'fun' function's signature accepts Any. Touche, this is independent of type inference. I'm not up-to-date on coe

Re: weak roles

2006-08-08 Thread Luke Palmer
On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote: My original idea was that this is again an ambiguity error - without the helper function stating which role it's using it cannot dispatch the "header" method at all, since it's in a role-conflicted state. The difference, though, is that this am

Re: weak roles

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 11:35:30 +, Luke Palmer wrote: > On 8/8/06, Yuval Kogman <[EMAIL PROTECTED]> wrote: > >I personally prefer delegates for almost any design dillema, but > >most CPAN modules aren't that way. > > Well, what way are they? Usually not polymorphic at all. We have the capab

Re: weak roles

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 12:00:03 +, Luke Palmer wrote: > The difference, though, is that this ambiguity error happens at > call-time, whereas most ambiguity errors happen at composition time. As I saw it it's not really a role, it's more of a no-op coercion. Instead of actually writing an ad

[perl #40106] [PATCH] 15 more tests work for PGE::P5Regex

2006-08-08 Thread via RT
# New Ticket Created by Kay-Uwe Huell # Please include the string: [perl #40106] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40106 > Hi parrot-team, fixed a few things in PGE::P5Regex and t/compilers/pge/p5regex/p5rx.t

Re: Type annotation on expressions

2006-08-08 Thread Yuval Kogman
On Tue, Aug 08, 2006 at 11:42:15 +, Luke Palmer wrote: > I'm not up-to-date on coersion; last I checked it was hand-wavily > defined. Currently it's a unary multimethod: my $hamburger = $cow.as(Food); However, the MMD rules are counterintuitive for dispatch rules. The reason annota

parrot compile error

2006-08-08 Thread hugues
Hi exotical birds, I'm getting the following error when compiling (trying to) parrot svn: Just droping it as is, in case any of you would know an obvious fix (laziness ...) I must add that it's been a long time since i last compiled parrot so the error might be due to something ``old''... Tha

Re: parrot compile error

2006-08-08 Thread Ben. B.
I have been getting the same error on my laptop for several weeks also. Slackware 10.1, 2.4.26, Intel Celeron 1066. On 8/8/06, hugues <[EMAIL PROTECTED]> wrote: Hi exotical birds, I'm getting the following error when compiling (trying to) parrot svn: Just droping it as is, in case any of you

Re: parrot compile error

2006-08-08 Thread Mr. Shawn H. Corey
Ben. B. wrote: > I have been getting the same error on my laptop for several weeks also. > Have you tried? make realclean perl Configure.pl make I got a compiler error earlier that went away when I did this. -- __END__ Just my 0.0002 million dollars worth, --- Shawn "For the t

Re: parrot compile error

2006-08-08 Thread Ben. B.
Yes. I also completely redownloaded the entire trunk and got the same thing. I'm supposed to set up vsoni an account on my laptop so he can have a looksee but I haven't gotten around tuit yet. On 8/8/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: Ben. B. wrote: > I have been getting the sam

Re: parrot compile error

2006-08-08 Thread kay-uwe.hull
Hi Hugues, I've had the same error on my notebook. It was because I had installed ('make install') a former parrot version and the linker tried to link to /usr/local/lib/libparrot.so because this is in search-path before 'local' blib/lib/libparrot.so. Removing /usr/local/lib/libparrot.* worked for

Re: parrot compile error

2006-08-08 Thread hugues
> "Ben" == Ben B <[EMAIL PROTECTED]> writes: Ben> Yes. Ben> I also completely redownloaded the entire trunk and got the same thing. Same here. Ben> I'm supposed to set up vsoni an account on my laptop so he can have a Ben> looksee but I haven't gotten around tuit yet. Be

Re: parrot compile error

2006-08-08 Thread Ben. B.
I am going to try fixing it by deleting the installed version of parrot per Kiwi's advice. That sounds like a reasonable solution. I'll know for sure when I get home and post the results to the list. Ben On 8/8/06, hugues <[EMAIL PROTECTED]> wrote: > "Ben" == Ben B <[EMAIL PROTECTED]> write

Re: parrot compile error

2006-08-08 Thread Leopold Toetsch
Am Dienstag, 8. August 2006 16:34 schrieb hugues: > I'm getting the following error when compiling (trying to) parrot > svn: > > Just droping it as is, in case any of you would know an obvious fix > (laziness ...) Please don't. it doesn't help at all. Please (all with this error) post the result

[perl #40120] [TODO] parrothist.pod

2006-08-08 Thread via RT
# New Ticket Created by Chip Salzenberg # Please include the string: [perl #40120] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40120 > Parrot needs a historical document, a la perlhist.pod. -- Chip Salzenberg <[EMAIL PR

Re: Continuations and inferior runloops: Analysis and POC

2006-08-08 Thread Leopold Toetsch
Am Sonntag, 6. August 2006 17:20 schrieb Bob Rogers: [ a much more detailed answer will follow ] >    The problem is that inferior runloops cannot be re-entered via > continuation.   C is an excellent example for the POC. I've a first question though: assuming that we might want to eliminate in

[perl #40121] [TODO] Tcl - implement [lreplace]

2006-08-08 Thread via RT
# New Ticket Created by Will Coleda # Please include the string: [perl #40121] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40121 > -- Will "Coke" Coleda [EMAIL PROTECTED]

#parrotsketch meeting august 08, 2006

2006-08-08 Thread Will Coleda
transcript up at: http://www.parrotcode.org/misc/parrotsketch-logs/ irclog.parrotsketch-200608/irclog.parrotsketch.20060808 -- Will "Coke" Coleda [EMAIL PROTECTED]

[perl #40122] [TODO] list_splice should work on any pmc that 'does array'

2006-08-08 Thread via RT
# New Ticket Created by Will Coleda # Please include the string: [perl #40122] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40122 > There is a lot of defensive code around the splice vtable list_splice () function that p

[perl #40123] [TODO] push_eh + .param for argument mismatch errors

2006-08-08 Thread via RT
# New Ticket Created by Matt Diephouse # Please include the string: [perl #40123] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40123 > Currently, if you want to use an exception handler to catch argument mismatch errors

Re: [perl #40122] [TODO] list_splice should work on any pmc that 'does array'

2006-08-08 Thread Leopold Toetsch
Am Dienstag, 8. August 2006 20:53 schrieb Will Coleda: > There is a lot of defensive code around the splice vtable list_splice > () function that prevents using it across multiple types of PMCs. > > This should be removed, and we should be able to splice any two array > types together. If necessar

[perl #40124] [TODO] Document HLL mappings

2006-08-08 Thread via RT
# New Ticket Created by Will Coleda # Please include the string: [perl #40124] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40124 > The purpose of each of the various HLL mappings should be documented; that is, when you

Re: [perl #40122] [TODO] list_splice should work on any pmc that 'does array'

2006-08-08 Thread Will Coleda
On Aug 8, 2006, at 3:40 PM, Leopold Toetsch via RT wrote: Am Dienstag, 8. August 2006 20:53 schrieb Will Coleda: There is a lot of defensive code around the splice vtable list_splice () function that prevents using it across multiple types of PMCs. This should be removed, and we should be ab

[perl #40125] [TODO] implement splice for ResizablePMCArray

2006-08-08 Thread via RT
# New Ticket Created by Will Coleda # Please include the string: [perl #40125] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40125 > Implement a generic splice vtable method for RPA. NB: can't use the same mechanism for t

Re: Continuations and inferior runloops: Analysis and POC

2006-08-08 Thread Bob Rogers
From: Leopold Toetsch <[EMAIL PROTECTED]> Date: Tue, 8 Aug 2006 19:43:31 +0200 Am Sonntag, 6. August 2006 17:20 schrieb Bob Rogers: [ a much more detailed answer will follow ] > ? ?The problem is that inferior runloops cannot be re-entered via > continuation. ? C is an exce

Re: parrot compile error

2006-08-08 Thread Ben. B.
That certainly fixed the problem. $ perl -v This is perl, v5.8.4 built for i486-linux $ grep link lib/Parrot/Config/Generated.pm 'has_dynamic_linking' => 1, 'has_static_linking' => 1, 'link' => 'cc', 'link_debug' => '', 'link_dynamic' =>

naming of the Str type

2006-08-08 Thread Darren Duncan
This may be a non-problem in practice, but ... Regarding the Str data type, which Perl 6 defines as holding a compact sequence of characters, I'm thinking that this type's current name is ambiguous considering the traditional uses of the word. Traditionally, a "string" isn't necessarily a seq

Re: Continuations and inferior runloops: Analysis and POC

2006-08-08 Thread Allison Randal
Bob Rogers wrote: There are two broad solutions: 1. Restrict continuations to move only "outward", which makes it unnecessary to restart inferior runloops. This may not be as bad as it seems, as most of the languages I can think of can be implemented using only outward (returning) conti

Re: [perl #39856] TODO: Produce Single PBC from Multiple PIR Files with -o

2006-08-08 Thread Allison Randal
Leopold Toetsch wrote: Am Montag, 17. Juli 2006 21:11 schrieb chromatic: After discussing the idea with Allison, we both believe that Parrot should be able to produce a single PBC file from a command like: parrot -o all_files.pbc file1.pir file2.pir ... filen.pir Well, that exists al

Continuations and inferior runloops: POC v2

2006-08-08 Thread Bob Rogers
From: Bob Rogers <[EMAIL PROTECTED]> Date: Sun, 6 Aug 2006 11:20:08 -0400 Notes on the POC: . . . It doesn't quite work, apparently because set_retval gives up too soon, and so set_s_p always sets the result to a null string. I figured this out in the process of implementing print

Re: [perl #39856] TODO: Produce Single PBC from Multiple PIR Files with -o

2006-08-08 Thread Chip Salzenberg
On Tue, Aug 08, 2006 at 06:19:18PM -0700, Allison Randal wrote: > Leopold Toetsch wrote: > >Am Montag, 17. Juli 2006 21:11 schrieb chromatic: > > > >>After discussing the idea with Allison, we both believe that Parrot should > >>be able to produce a single PBC file from a command like: > >> > >>

Re: Re: Re: resizablepmcarray, assign.

2006-08-08 Thread Matt Diephouse
Bob Rogers <[EMAIL PROTECTED]> wrote: FWIW, the Common Lisp system I'm writing takes a third tack. It defines a ParrotObject container associated with the name that refers indirectly to the current value. Of course, Common Lisp "symbol" objects are part of the language spec (and aliasing is not

Re: naming of the Str type

2006-08-08 Thread Darren Duncan
At 5:25 PM -0700 8/8/06, Darren Duncan wrote: I'm wondering if it would not be inappropriate to change the name Str to something more descriptive of its content within the historical or current wider context. For example, would the name Text be any worse? In my mind, that is less ambiguous

request addition of immutable Blob type

2006-08-08 Thread Darren Duncan
That #perl6 discussion on character strings over the last hour then evolved into a discussion on binary strings, where the pseudo-conclusion started here: http://colabti.de/irclogger/irclogger_log/perl6?date=2006-08-09,Wed&sel=294#l520 And so, I formally propose the addition of an immutable an

[perl #40132] [TODO] Remove set_pmc vtable method

2006-08-08 Thread via RT
# New Ticket Created by Matt Diephouse # Please include the string: [perl #40132] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40132 > So sayeth array.pmc: void set_pmc(PMC *other) Currently, an alias to C. Expec

Parrot 0.4.6 Released! {p2-only announcement}

2006-08-08 Thread Chip Salzenberg
{{ This announcement is going to p2 only. Once CPAN has propagated the tarball far and wide, the announcement will go out for everyone else. }} On behalf of the Parrot team, I'm proud to announce Parrot 0.4.6, the most recent close-to-monthly release of Parrot. I'm particularly pleased to rep