3 ms·
It feels a bit off-topic, but I could not resist giving a shout-out to Pyodide [0] which brings CPython and SciPy stack to WASM world. It works reasonably fast
by oneearedrabbit 6y ago
It feels a bit off-topic, but I could not resist giving a shout-out to Pyodide [0] which brings CPython and SciPy stack to WASM world. It works reasonably fast once the runtime is cached in your browser, and then takes roughly 3-5 seconds to initialize a complete Python environment in the browser (at least this is what it takes on my antique Macbook).
CheerpX is more advanced in a way that you can run arbitrary binaries. I’m interested to learn more about the performance tradeoffs and compare benchmarks. Out of curiosity, what’s your take on libraries that require compilation step, e.g. Pandas/NumPy?
What I particularly like about WASM is you don’t need to install anything on your machine. It’s as simple as clicking a link, and you have a secure environment that works right out of the box.
On a more personal note, I was excited about Pyodide, and about a month ago I began developing a visual notebook. Its initial purpose was to create a Python playground, which can render ad-hoc visualizations into a browser to share them with my friends. Zero setup, just type some Python code in the browser and instantly see results, render charts, etc. [1]
Overall, I love the momentum that erases the setup step for traditional tools, ultimately bringing joy to programming. I believe it would be a great way to introduce programming concepts in an educational setting.
[0] https://github.com/iodide-project/pyodide/ https://github.com/iodide-project/pyodide/
[1] http://diggyhq.com/ http://diggyhq.com/
- apignotti 6y agoLibraries with a binary component will work as expected with our approach. CheerpX runs arbitrary x86 code, there is nothing special about Python in particular. Obviously compiling directly to Wasm will provide the best level of performance, but it also take effort for every single application/library you want to port.
- oneearedrabbit 6y agoThanks! On a technical side, do you run the whole application in the main thread of a web worker. I wonder whether you considered using service workers for the faster boot up?
- apignotti 6y agoI don't think service workers would help in this case. As mentioned elsewhere we are working on a revamp of the I/O subsystem that should significantly improve startup time already.