4 ms·
As I understand, C extensions are used for CPU heavy work e.g., numpy is likely ported to WebAssembly.
by d0mine 4y ago
As I understand, C extensions are used for CPU heavy work e.g., numpy is likely ported to WebAssembly.
- tempay 4y agoIndeed, taken to the extreme a Pyodide-based jupyter is available[1] which uses the same underpinnings as pyscript. It might not be perfectly efficient but it's totally usable, especially considering it moves the compute from a server to the client. At this point the main issue I've seen is the slow load time (not a problem for jupyterlite but is for pyscript). Hopefully this can improve with time and regardless I think there are a lot of cases for pyscript to remove the need for server-side code and the associated maintaince. [1] https://jupyterlite.readthedocs.io/en/latest/ https://jupyterlite.readthedocs.io/en/latest/
- codedokode 4y agoNo. People won't write C extensions. They will write something heavy like Redux (which recreates full object graph on every event) in Python.
- ivoflipse 4y agoYou'll like what we've done during my Hackathon https://github.com/fork-tongue/collagraph/pull/66 https://github.com/fork-tongue/collagraph/pull/66 We added support for PyScript using Collagraph, which allows you to define single file components with a Vue-like syntax. Excerpt from the project README: Write your Python interfaces in a declarative manner with plain render functions, component classes or even single-file components using Vue-like syntax, but with Python! - Reactivity (made possible by leveraging observ) - Function components - Class components with local state and life-cycle methods/hooks -Single-file components with Vue-like syntax (.cgx files) - Custom renderers (PySide, pygfx and now PyScript)