37 karma · joined Mar 26, 2013 (13y ago) · 12 submissions
comment 10y ago · link · parent
So, the first thing we need to do is make the entire system compatible with the Python execution model, ie no callbacks. As part of this it just so happens that sockets become synchronous as well.
Once this is done we have a solid (and conventional, not forced upon us by the vendor) foundation to work from. Then we can build the Python way of doing async IO if needed using the asyncio framework (and perhaps the new async/await keywords).
comment 12y ago · link · parent
Another example: calling a function in CPython requires a heap allocation of the call frame. In Micro Python this is generally not needed (unless the function call is significantly complicated).
comment 12y ago · link · parent
The true count comes from the py/ directory, for which cloc gives only 25k. And there are a lot of extra bits there, eg the inline assembler, the Thumb and X64 assembler helpers, etc.
EDIT: without the additional assemblers, cloc gives 22k. Remember that Python has ints, floats, complex and bignum, and these are all included in Micro Python. So that 22k SLOC includes complex arithmetic and a 1k bignum implementation.
comment 12y ago · link · parent
The only things that don't compile properly are certain uses of "super()". super() without arguments is a very strange beast that captures the first argument of the function (interpreting it as the self object), and needs to infer its class.
Other than that, all the Python scripts in the Python 3 standard library will compile.
comment 13y ago · link · parent
comment 13y ago · link · parent
11.
Show HN: Planck Cosmic Microwave Background visualised using three.js(thecmb.org ↗)
1 points · by carbon12 · 13y ago · discuss