[pypy-dev] Builtin types

Bengt Richter bokr at oz.net
Fri Jan 24 11:59:44 CET 2003

At 22:36 2003-01-23 -0800, Darius Bacon wrote:
>Bengt Richter <bokr at oz.net> writes:
>> I have some thoughts for decribing C structures (and anything else
>> digital) in a canonical abstract way. I'll call such a decription
>> a meta-representation, and a function that produces it from a Python
>> object is meta_repr(python_object) => meta_rep_obj. The reverse
>> operation is meta_eval ;-)
>> The basis for meta_repr is that it capture and meta-represent
>> (type, id, value) for an object in a pure abstract form.
>> The abstract basis for storing the information is a bitvector
>> object with attribute names that specify slices of the bitvector.
>> I.e., there is an effective dict like {'slicename':(lo,hi)} and
>> __getattr__ uses it so that bvec.slicename refers to bvec[lo:hi] etc.
>> This is pure and abstract data, but you can see that interpreted
>> little-endianly you can very straightforwardly lay out a C struct
>> with whatever field widths and alignments you want.
>Sounds vaguely like this paper:
>First-Class Data-type Representation in SchemeXerox

Thank you for the reference! I can see why you were reminded.


More information about the Pypy-dev mailing list