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

Creating Keys in PIR

4 views
Skip to first unread message

Chromatic

unread,
Dec 24, 2006, 1:56:42 PM12/24/06
to parrot-...@perl.org
I'm writing tests for namespaces now (and fixing code), and testing the keyed
variants is a real pain, mostly because creating nested Key PMCs in PIR is so
face-stabbingly awful, if it's even possible.

Without hard-coding the names, I'd love to see working PIR for creating a key
which can refer to the namespace [ 'A'; 'Nested'; 'Namespace' ].

Yes, that implies an interface like:

.local pmc some_key
some_key = create_nested_key( 'A', 'Nested', 'Namespace' )

Anyone?

-- c

Bob Rogers

unread,
Dec 24, 2006, 3:24:25 PM12/24/06
to chromatic, parrot-...@perl.org
From: chromatic <chro...@wgz.org>
Date: Sun, 24 Dec 2006 10:56:42 -0800

I'm writing tests for namespaces now (and fixing code), and testing the keyed
variants is a real pain, mostly because creating nested Key PMCs in PIR is so
face-stabbingly awful, if it's even possible.

It's possible, all right, but there do seem to be lots of pitfalls.
Ever try to print an uninitialized key? It results in an unbounded
recursion on VTABLE_get_string . . .

Without hard-coding the names, I'd love to see working PIR for creating a key
which can refer to the namespace [ 'A'; 'Nested'; 'Namespace' ].

Yes, that implies an interface like:

.local pmc some_key
some_key = create_nested_key( 'A', 'Nested', 'Namespace' )

Anyone?

-- c

Is this what you had in mind?

-- Bob Rogers
http://rgrjr.dyndns.org/

create_nested_key.pir
0 new messages