Re:The Python scientific stack, compiled to WebAssembly
by nerdponx on Friday August 24, 2018 @08:44AM
(#17834556)
What happens to all of the C code in Numpy, and the calls to external libraries like BLAS?
[ Parent
| on HN ]
Re:The Python scientific stack, compiled to WebAssembly
by azakai on Friday August 24, 2018 @11:09AM
(#17835392)
Python C extensions like NumPy are compiled into shared libraries, and loaded using dlopen() etc. normally by the main compiled Python runtime. (The only special thing here is that all those components are compiled to WebAssembly so it can run on the Web.)
Re:The Python scientific stack, compiled to WebAssembly
by Scarblac on Friday August 24, 2018 @08:57AM
(#17834622)
In particular, does this mean Javascript has access to Numpy? Sounds unbelievable, but would be extremely cool.
Re:The Python scientific stack, compiled to WebAssembly
by mdboom on Friday August 24, 2018 @02:43PM
(#17836936)
Yep. You can "import" python objects over to the Javascript side and start using them from there. It's not as pleasant as working with Numpy in Python, of course, due to lack of operator overloading, of course.
Re:The Python scientific stack, compiled to WebAssembly
by mjs2600 on Friday August 24, 2018 @09:50AM
(#17834911)
C can compile to WASM, but I have no clue about external tools like BLAS. I'd assume that things like Numpy are able to work without tools like BLAS, but you might also be able to compile the essential ones to WASM as well.