ctypes impressions (was: [pypy-dev] bootstrapping issues)
Christian Tismer
tismer at tismer.com
Thu Jan 16 11:48:56 CET 2003
Thomas Heller wrote:
...
>>What I liked really much (and I would probably like
>>to steal this trick) is the most elegant implementation
>>of alignment. Interested readers should read and understand
>>lines 3309 ff of _ctypes.c .
>
>
> Ahem, this code is nearly copied from Python's structmodule.c.
> So, this idea was someone else's.
*blush* I've never completely read the structmodule
source. Sorry.
[talking about size]
> Yes, only counting the lines it is even larger than Jim Fulton's
> ExtensionClass.c - but the code is much less dense and easier to read,
> IMO.
> But don't take this wrong: I'm not going to argue with you
> that something else is needed for Minimal Python.
Great! I was afraid you might take me wrong.
>>For Minimal Python, we need only a small percentage of this.
>>We should pick some essential ideas and re-write that part
>>in Python. We also only need some basic types to boot up
>>the Python engine. Access to real memory can be provided
>>by some functions in C, which should be mapped to opcodes
>>of the virtual micro-machine.
I dislike the above paragraph now. I'm overloading
the young project with demands and restrictions.
> Thanks for this great review, chris.
After some sleep, I found this being not such a
great review. I too much pointed on things which
are only relevant through the nature of this
project, and I argued with the final result in
mind.
Instead, I should have mentioned that it is
pretty fine to use ctypes right now as it is,
in order to get things flying.
All considerations about re-coding things in
Python don't apply to the early bootstrap phase.
I-shouldn't-write-at-4-o'clock-in-the-night - chris
--
Christian Tismer :^) <mailto:tismer at tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Pypy-dev
mailing list