Back to discussionComment by mikepurvis[-]mikepurvislast year1 reply#As in my sibling comment, pypy has already done all this work.CPython's struct module is just a shim importing the C implementations: https://github.com/python/cpython/blob/main/Lib/struct.pyPypy's is a Python(-ish) implementation, leveraging primitives from its own rlib and pypy.interpreter spaces: https://github.com/pypy/pypy/blob/main/pypy/module/struct/in...The Python stdlib has enormous surface area, and of course it's also a moving target.ammar2last year#Aah, neat! Yeah, piggy-backing off pypy's work here would probably make the most sense.It'll also be interesting to see how OP deals with things like dictionaries and lists.
mikepurvislast year1 reply#As in my sibling comment, pypy has already done all this work.CPython's struct module is just a shim importing the C implementations: https://github.com/python/cpython/blob/main/Lib/struct.pyPypy's is a Python(-ish) implementation, leveraging primitives from its own rlib and pypy.interpreter spaces: https://github.com/pypy/pypy/blob/main/pypy/module/struct/in...The Python stdlib has enormous surface area, and of course it's also a moving target.
ammar2last year#Aah, neat! Yeah, piggy-backing off pypy's work here would probably make the most sense.It'll also be interesting to see how OP deals with things like dictionaries and lists.
CPython's struct module is just a shim importing the C implementations: https://github.com/python/cpython/blob/main/Lib/struct.py
Pypy's is a Python(-ish) implementation, leveraging primitives from its own rlib and pypy.interpreter spaces: https://github.com/pypy/pypy/blob/main/pypy/module/struct/in...
The Python stdlib has enormous surface area, and of course it's also a moving target.
It'll also be interesting to see how OP deals with things like dictionaries and lists.