by milliams on 2/25/25, 9:15 AM with 94 comments
by giancarlostoro on 2/25/25, 7:03 PM
I'm totally all-in on WASM over JavaScript, unless your back-end is also JS/TS then no objection.
I could see Django benefitting greatly from being able to run template logic in-browser.
by supportengineer on 2/26/25, 12:16 AM
by svilen_dobrev on 2/25/25, 8:33 PM
i was thinking some weeks ago that it may be time to "fork" python - as language - in a way to preserve the initial simplicity and clarity it did have and is losing faster and faster. But, nevermind. Will have to live with whatever there is.
edit: looking at the code, some things might be optimized but no idea if these are on critical path (like, that switch-by sq_idx, or 6 lines.append.. ), or whether func-calls are as expensive in Spy as they are in Cpy. But anyway, squeezing few percents is not the point.. if one needs magnitudes.
by ripped_britches on 2/25/25, 9:11 PM
by dimatura on 2/25/25, 9:49 PM
Using decorator calls to "compile" chunks of python code seems like an increasingly popular trend in ML (and presumably other numerically intensive code) - e.g., numba, jax.jit and triton.
by laurencerowe on 2/26/25, 8:03 AM
I'd maybe quibble with "running natively on WebAssembly with speed in the same order of magnitude as Rust" given I expect that statement would be just as true if you replaced Rust on WebAssembly with the equivalent JavaScript.
But ultimately while I understand the motivation - at the beginning of my career before I discovered Python I wanted to write command line scripts in PHP because that was what I knew! - I think it is ultimately a dead end since by breaking from the Python ecosystem you end up having to compete against JavaScript which is not really that far from Python and has an existing library ecosystem to plug into.
by nine_k on 2/26/25, 2:33 AM
But the power of Python currently mostly lies in its being a glue language. Python easily and neatly wraps things like numpy, scipy, polars, pytorch, etc, all implemented in native code. Not being able to use these would be a major limitation. But being able to use these would be a colossal change to the browsers' capabilities, security model, and, well, purpose.
by Terretta on 2/26/25, 12:20 AM
by __MatrixMan__ on 2/26/25, 5:48 AM
Independently of its compilation flexibility, it's nice to work with. For example it was the first language that ever gave me compile error because there were cases that my switch statement didn't account for.
by rdedev on 2/26/25, 1:31 AM
So far my issue with pyiodide or other interpreted variants of python in wasm is the huge startup time especially if you need to install dependencies. The above projects i hope eventually reach a point where we can just compile everything
by cxr on 2/26/25, 5:00 AM
by JodieBenitez on 2/26/25, 7:37 AM
That would still be nice to have some of those python libs to the browser though.
by DeathArrow on 2/26/25, 7:22 AM
by khimaros on 2/26/25, 10:16 AM
by gunian on 2/26/25, 3:17 AM
by kace91 on 2/26/25, 12:03 AM
Like, I get the appeal of more languages beyond JavaScript for the frontend, but I'd have guessed this would mostly be attractive to people who like significantly different languages to js, like maybe something compiled and strongly typed.
Python and Javascript seem to be in the same ballpark of "interpreted scripty language grown larger". I don't think moving to python would give me a different enough language to warrant the cost of switching.
by dang on 2/25/25, 8:01 PM