Q: Keys can be strings/ints only?

2006-01-20 Thread Amos Robinson
I think I remember reading one of the comments in the IMCC compiler something to the effect of "if someone needs N keys they can just convert to strings." Sorry I can't find the exact wording right now, but it might point you somewhere useful. Amos Robinson On 1/21/06, Klaas-Jan Stol <[EMAIL PROT

Parrot and PGE will save the day (was Re: "as if" [Was: Selective reuse of storage in &bless.] )

2006-01-20 Thread Rob Kinyon
On 1/20/06, Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Fri, Jan 20, 2006 at 04:20:54PM -0500, Rob Kinyon wrote: > > Pros: Larry doesn't have to do anything more on the WMoT. > > Cons: The community, for some reason, really wants this > > auto-translator, even though there wasn't one for

perl6-all@perl.org

2006-01-20 Thread Stevan Little
Larry Wall wrote: > On Fri, Jan 20, 2006 at 09:35:13PM +0800, Audrey Tang wrote: > My original intent was #2, hence the wording in A12. But to speak to > some of Stevan's concernes, there's something going on here which is > not quite "Object does Hash". It's more like "Object can do Hash", > in

perl6-all@perl.org

2006-01-20 Thread Stevan Little
> On Thursday 19 January 2006 21:53, Stevan Little wrote: > > With p5, you /can/ get to the underlying data structure. This is a > > break which will hamper the backwards compatibility effort I think. > > With Perl 5, you can *appear* to get to the underlying data structure. Yet > tie() is basical

perl6-all@perl.org

2006-01-20 Thread Audrey Tang (autrijus)
On 1/21/06, Larry Wall <[EMAIL PROTECTED]> wrote: > But maybe all this is already possible in the current setup, if > > role ObjectFakeHash does Hash {...} > role Object does ObjectFakeHash {...} > class Hash does Hash {...} Yes, I think that's the way to go, as well as :coerce for exp

named arguments - internals

2006-01-20 Thread Leopold Toetsch
As mentioned earlier today, I've rewritten the guts of the argument passing code. It's now one function 'process_args', which is mostly a state machine with currently ~12 cases that handles the various states or should eventually handle. Anyway, previous functionality and named arguments passi

perl6-all@perl.org

2006-01-20 Thread Nicholas Clark
On Fri, Jan 20, 2006 at 04:20:54PM -0500, Rob Kinyon wrote: > Pros: Larry doesn't have to do anything more on the WMoT. > Cons: The community, for some reason, really wants this > auto-translator, even though there wasn't one for P4->P5 and P5->P6 is > a greater leap than P4->P5 was. But (

perl6-all@perl.org

2006-01-20 Thread Jeff Stampes
I have to wonder how many other people just edited /usr/share/games/fortune/perl and added: % Humans are not much into strong compile-time typing, and when they are, we call it stereotyping, or racism, or whatever. -- Larry Wall in <[EMAIL PROTECTED]> And now back to your regularly s

perl6-all@perl.org

2006-01-20 Thread chromatic
On Thursday 19 January 2006 21:53, Stevan Little wrote: > Okay, so when you say alternate storage then you mean that a class > like this: > > class Foo { > has $.bar; > method new ($class, %params) { > $class.bless('p5Hash', %params); > } > method baz { > $.bar +

perl6-all@perl.org

2006-01-20 Thread chromatic
On Friday 20 January 2006 07:14, Rob Kinyon wrote: > I think this entire issue is rising out of the fact that very very few > people in this discussion are familiar with the design of the MOP. > Stevan and a few others are the primary movers and I'm lucky enough to > have been Stevan's sounding bo

perl6-all@perl.org

2006-01-20 Thread Rob Kinyon
On 1/20/06, Larry Wall <[EMAIL PROTECTED]> wrote: [snip really cool blathering] I don't have much to say on the deeper question, but I have a few ideas on the P5 -> P6 translation question, especially as it relates to OO: 1) Don't translate at all. Ponie, delegating to Parrot, is supposed to

Re: [perl #38288] [PATCH] Change Parrot_call to Parrot_call_sub in pdd11

2006-01-20 Thread jerry gay
> pdd11 seems to be out of step with extend.h > > Patch attached. > thanks, applied as r11275. ~jerry

[perl #38288] [PATCH] Change Parrot_call to Parrot_call_sub in pdd11

2006-01-20 Thread via RT
# New Ticket Created by Brad Bowman # Please include the string: [perl #38288] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38288 > pdd11 seems to be out of step with extend.h Patch attached. Brad --- ./docs/pdds/cli

Re: Q: Keys can be strings/ints only?

2006-01-20 Thread Klaas-Jan Stol
Matt Fowles wrote: Klaas-Jan~ On 1/20/06, Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: Hi, I tried to index aggregates using several types of keys (that is, several types of values), and it seems only string and integer values can be used as keys. A quick look at the source in compilers/imcc/

Re: Q: Keys can be strings/ints only?

2006-01-20 Thread Matt Fowles
Klaas-Jan~ On 1/20/06, Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to index aggregates using several types of keys (that is, > several types of values), and it seems only string and integer values > can be used as keys. A quick look at the source in > compilers/imcc/symreg.c confir

perl6-all@perl.org

2006-01-20 Thread Larry Wall
On Fri, Jan 20, 2006 at 09:35:13PM +0800, Audrey Tang wrote: : Note that A12 used to say that all Objects does Hash, and %$obj even : returns private attributes when used inside the class scope. : Fortunately, S12 doesn't mention anything like that, so I think the : treatment above is safe. We sti

Q: Keys can be strings/ints only?

2006-01-20 Thread Klaas-Jan Stol
Hi, I tried to index aggregates using several types of keys (that is, several types of values), and it seems only string and integer values can be used as keys. A quick look at the source in compilers/imcc/symreg.c confirms this, there is no case for 'N' values (and a test makes Parrot say bu

Re: argument count mismatch

2006-01-20 Thread Chip Salzenberg
On Fri, Jan 20, 2006 at 11:41:45AM -0800, jerry gay wrote: > i suppose we need a design decision on this. We need a PIR version of get_params '()'. I'm OK with .no_params. -- Chip Salzenberg <[EMAIL PROTECTED]>

Re: argument count mismatch

2006-01-20 Thread Chip Salzenberg
On Fri, Jan 13, 2006 at 05:51:53PM +0100, Leopold Toetsch wrote: > This could be fixed by special-casing the initial call to ':main', > and then turn on param count checks if wanted. I think you'll need to invert that, given that code can be executed before :main, e.g. :immediate. Default the err

Re: Q: pdd03 details

2006-01-20 Thread Nicholas Clark
On Fri, Jan 20, 2006 at 11:42:15AM -0800, Chip Salzenberg wrote: > Checks are mandatory in supported Parrot. (Unsupported hacks, e.g. > for debugging, can do anything, up to and including spawning nethack.) That will need a configure.pl check though, because Perl 5 isn't yet probing for the path

Re: Q: pdd03 details

2006-01-20 Thread Chip Salzenberg
On Fri, Jan 20, 2006 at 07:56:55PM +0100, Leopold Toetsch wrote: > I'm currently rewriting the guts of argument passing which causes a few > tests to fail. > > 1) Is the :opt_flag optional? >.param string description :optional > # .param inthas_desc :opt_flag# <- is this always

Re: argument count mismatch

2006-01-20 Thread jerry gay
On 1/16/06, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Roger Browne wrote: > > > Wow, it really does work. Thanks! Although it misses the case where the > > called sub has zero .params: > > > >.sub 'main' :main > > errorson 0x0C > > foo(5) > >.end > >.sub foo > > pri

Q: pdd03 details

2006-01-20 Thread Leopold Toetsch
I'm currently rewriting the guts of argument passing which causes a few tests to fail. 1) Is the :opt_flag optional? .param string description :optional # .param inthas_desc :opt_flag# <- is this always needed (this is from Test/More.pir) 2) Param count mismatches lua/t/func

Re: [perl #38262] get external modules out of the parrot repo

2006-01-20 Thread Chip Salzenberg
On Wed, Jan 18, 2006 at 12:10:34PM -0800, jerry gay wrote: > true, but i think DRY (don't repeat yourself) applies here. there's > already a standard repository for these modules, so why clutter the > parrot repo? Yes. Those who do not understand CPAN, etc. There should be a single CPAN bundle w

perl6-all@perl.org

2006-01-20 Thread Rob Kinyon
On 1/19/06, chromatic <[EMAIL PROTECTED]> wrote: > On Thursday 19 January 2006 19:50, Rob Kinyon wrote: > > > Nothing. Just like it's not a problem if Perl6 uses one of the > > Ruby-specific PMCs for storage. In fact, the alternate $repr idea is > > specifically to allow for the use of foreign data

Re: Perl 6's &bless is (seriously) broken

2006-01-20 Thread Rob Kinyon
On 1/20/06, Juerd <[EMAIL PROTECTED]> wrote: > Note, by the way, that JS has "primitive" strings, and Strings, only the > latter being objects. Fortunately for us, though, a string is > automatically promoted to a String when the string is USED AS an object. In other words, according to userland,

perl6-all@perl.org

2006-01-20 Thread Audrey Tang
Stevan Little wrote: >> I realize one of Stevan's objections is "But if you use a Hash, does your >> object automatically support the .keys method and .kv and so on?" to >> which I >> reply "No, of course not. That's silly. It just uses the Hash for >> *storage*." >> Is that your objection to ble

Re: [perl #38284] [PATCH] Segfault caused by Closure:mark

2006-01-20 Thread Leopold Toetsch
Bob Rogers (via RT) wrote: This fixes Closure:mark, which incorrectly assumed that sub->outer_ctx existed if sub->outer_sub did. Good catch - thanks, applied as r11271. leo

[perl #38284] [PATCH] Segfault caused by Closure:mark

2006-01-20 Thread via RT
# New Ticket Created by Bob Rogers # Please include the string: [perl #38284] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38284 > This fixes Closure:mark, which incorrectly assumed that sub->outer_ctx existed if sub-

[perl #38281] [PATCH] Remove cache.* reference from pobj.h comments

2006-01-20 Thread via RT
# New Ticket Created by Brad Bowman # Please include the string: [perl #38281] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=38281 > Hi, Looking through pobj.h, I found what seems to be a dated comment referring to "cac

Re: Class methods vs. Instance methods

2006-01-20 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: : class Dog { : method tail { "brown and short" } : }; : : class Chihuahua is Dog { : has $.color; : method tail { $.color _ " and short" } : }; : : You can say Dog.tail, Dog.new.tail, Chihuahua.new.tail, but not : Chihuahua.tail. That's extremely counter-int