Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PASM] PerlHash and keys

5 views
Skip to first unread message

Jerome Quelin

unread,
Jan 2, 2003, 11:57:35 AM1/2/03
to perl6-i...@perl.org
Hi there,

How can one retrieve the keys of a PerlHash in Parrot assembly? Is there
a way to traverse a hash?

Jerome
--
jqu...@mongueurs.net

Leopold Toetsch

unread,
Jan 2, 2003, 2:20:38 PM1/2/03
to Jerome Quelin, perl6-i...@perl.org, Dan Sugalski
Jerome Quelin wrote:

> Hi there,
>
> How can one retrieve the keys of a PerlHash in Parrot assembly? Is there
> a way to traverse a hash?


Not yet.
There is a nextkey_keyed mentioned in pdd02_vtables.pod, which would
almost be all to implement aggregate iterators. Missing is IMHO how to
reset (start) an iteration.

Also not too long ago, there was some proposal WRT an iterator class.

This proposal needed more vtable functions.


Also not specified: how to attach an iterator to an aggregate.


> Jerome

leo, who cc'ed Dan for clarification ;-)

Aldo Calpini

unread,
Jan 3, 2003, 5:22:17 AM1/3/03
to Leopold Toetsch, Jerome Quelin, perl6-i...@perl.org, Dan Sugalski
Leopold Toetsch wrote:
> There is a nextkey_keyed mentioned in pdd02_vtables.pod, which would
> almost be all to implement aggregate iterators. Missing is IMHO how to
> reset (start) an iteration.

> Also not too long ago, there was some proposal WRT an iterator class.

I was the proposer. I have written an Iterator PMC back in the ol'
0.0.8 days, but then I was distracted and never finished my work.
I will try to reimplement my addition to 0.0.9 and submit a patch
ASAP (probably after 07 jan ;-).

> This proposal needed more vtable functions.

yes, it does.

> Also not specified: how to attach an iterator to an aggregate.

this was solved with the implementation of the 'assign' op.


cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;

Leopold Toetsch

unread,
Jan 3, 2003, 10:46:34 AM1/3/03
to Aldo Calpini, Jerome Quelin, perl6-i...@perl.org, Dan Sugalski
Aldo Calpini wrote:


> I was the proposer. I have written an Iterator PMC back in the ol'
> 0.0.8 days, but then I was distracted and never finished my work.
> I will try to reimplement my addition to 0.0.9 and submit a patch
> ASAP (probably after 07 jan ;-).


Thanks, great.


> cheers,
> Aldo


leo


0 new messages