New role introspection code

Brian T. Rice water at tunes.org
Wed Sep 15 18:46:29 PDT 2004


Hello all,

I've added a new library and one primitive for map and role 
introspection to the alpha area of the website. There are also more 
bug-fixes and extensions provided, so it is worth downloading anyway: 
http://slate.tunes.org/downloads/alpha/

The new primitive is just to be able to ask an object for its "map", 
which is an object describing the format of the original, including slot 
locations and roles. The definition of Map is bootstrapped in Pidgin (in 
vm/base/map.slate) and was already available; this just exposes it.

Some methods (but not nearly enough) for looking into role objects are 
provided in src/mobius/vm/interp/map.slate, namely rolesNamed:, 
rolesAt:, rolesNamedAt:. I need to work on these more since there are 
methods that will not show up in my initial revision, but these are 
enough for you to inspect with right now. This library is also 
bootstrapped in to the standard image, so you can try this "out of the box".

Don't worry too much if the way this library works isn't too clear, 
since it dives into object layout details that normally should not be a 
concern.

Suggestions and comments about API's are welcome, of course; whatever 
common queries could be built from these or should be provided alongside 
them.

I'll develop a section in the manual to outline how to use the queries; 
the implementation details will stay on the Mobius side.

Enjoy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: water.vcf
Type: text/x-vcard
Size: 208 bytes
Desc: not available
Url : /archives/slate/attachments/20040915/d7ca2b92/water.vcf


More information about the Slate mailing list