Better HN
topnewbestaskshowjobs
Log inSign up

carbon12

37 karma · joined Mar 26, 2013 (13y ago) · 12 submissions

Submissions

comment 10y ago · link · parent

The problem is that the underlying vendor "operating system" forces you to use events and callbacks for everything. Disregarding sockets for the moment, we currently can't even run a basic Python script that loops flashing an LED and pausing for 10 seconds. That's because the vendor OS expects you to return very quickly from any user code.

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 11y ago · link · parent

From that link it seems that Python is used at NASA exclusively in ground-based systems. In contrast, the MicroPython+ESA collaboration is supposedly also looking at using the language in "payloads", ie things that go into space.

comment 12y ago · link · parent

A lot of the internals are significantly different, and would be difficult to back port. Eg, a Micro Python object is a machine word which might be a pointer to a real object, a small integer, or an interned string. By stuffing small integers (and strings) into the unused bit-space of a machine word, Micro Python can do a lot of integer operations without allocating heap RAM. This is in contrast to CPython where all integers are on the heap (although the ones below 257 are cached).

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

Actually, most of that SLOC is in the stmhal/ port, of which ~100k is the ST library.

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

Actually, no, the unix version is dynamically linked (against libc, libm, etc).

comment 12y ago · link · parent

> What parts of Python 3 syntax are missing? Which parts of the library don't compile?

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

Thanks for your pledge! Looks like it'll be successfully funded. Can't wait to send you your board!

comment 13y ago · link · parent

Thanks for the link. We will look into the Pubmed data and see if any of it can be included in the map.

comment 13y ago · link · parent

Yes, stat, cs and math researchers don't use arXiv as exclusively as physicists. And we don't pick up references in those areas as well as we do for physics papers, so they are small and not well placed. We plan to improve the citation extraction for math and cs so they have a proper representation in the map.

comment 13y ago · link · parent

The problem is getting the data: a list of papers and their references/bibliography. The great thing about the arXiv is that the papers are open-access, that it is updated daily, and that the daily-update is immediately available to data-mining. Is there a similar thing for med/biomed?

11.

Show HN: Planck Cosmic Microwave Background visualised using three.js(thecmb.org ↗)

1 points · by carbon12 · 13y ago · discuss