Last blog entry being from "Dec 1, 2021" doesn't make it sound like there's much action.
Our team tends to drilling on code more than writing. I know it is not a strategic good way though. Any idea what do you expect to see on the blog?
RustPython
181–190 of 244 posts
Re: RustPython
#182> "it can be compiled to WebAssembly in order to run Python in the browser." I have seen this approach with C-python and NodeJS already and I think it simply not viable, what they are suggesting is compiling the runtime (the same one you use in non-wasm projects) to wasm and then run your python code on top of it. This is a double-whammy of performance degradation, you basically have two JIT-compilation steps happeni…
You already counted that, that's the Python interpreter (in this case RustPython) overhead.
---
The steps are (1) RustPython interpreter (2) Rust compiled to WASM (3) WASM runtime.
"Normally" you'd have (1) CPython interpreter (2) C compiled to machine code.
I'm not sure how much overhead WASM runtime really is...I'm curious, but I doubt this is awful compared to CPython.
---
FYI, for CPython as WASM, https://pyodide.org/.
Re: RustPython
#183Earlier quoted context omitted.
It's particular acute with Python. The language itself is poor - the value is in the massive ecosystem (particularly around ML). Compare this to say, Rust, where the safety guarantees are useful in their own right. There would be value in Rust even with zero packages, but I couldn't say the same for Python.
> The language itself is poor The language is a joy and one of the main reasons it became popular. How do you think it got its ecosystem?
Personally, I find the lack of static types makes maintenance a nightmare, and think the build and deployment situation is miserable.
Re: RustPython
#184RustPython – A Python-3 (CPython >= 3.11.0) Interpreter written in Rust - https://news.ycombinator.com/item?id=35056586 - March 2023 (136 comments)
A full Python interpreter written in Rust - https://news.ycombinator.com/item?id=31086317 - April 2022 (7 comments)
Python interpreter written in rust reaches 10000 commits - https://news.ycombinator.com/item?id=29094323 - Nov 2021 (93 comments)
RustPython: A Python interpreter written in Rust - https://news.ycombinator.com/item?id=28280790 - Aug 2021 (49 comments)
RustPython – Python Written in Rust - https://news.ycombinator.com/item?id=27060802 - May 2021 (2 comments)
A Python interpreter rewritten in Rust, that can run pip - https://news.ycombinator.com/item?id=26030269 - Feb 2021 (48 comments)
A Python Interpreter Written in Rust - https://news.ycombinator.com/item?id=19064069 - Feb 2019 (194 comments)
Re: RustPython
#185I thought RustPython is what Ironpython become after being abandoned for a while.
For those interested, Iron* is .NET.
IronPython
IronRuby
IronJS
Re: RustPython
#186Re: RustPython
#187I'm not convinced that projects like this can really have broad application. The value of Python is interfacing to native libraries, but as soon as you use something like PyPy, you lose access to all of that. It's the same story with the performance orientated forks of cPython.
As some popular libraries begin being authored in Rust (e.g. Polars), I'm wondering whether that could actually be exploited in this approach, by e.g. shipping the "native" libraries as WASM components that can then be called instead of the actual native libraries.
Perhaps this kind of thing needs to be baked into a language offering from the start?
Re: RustPython
#188Earlier quoted context omitted.
It's particular acute with Python. The language itself is poor - the value is in the massive ecosystem (particularly around ML). Compare this to say, Rust, where the safety guarantees are useful in their own right. There would be value in Rust even with zero packages, but I couldn't say the same for Python.
> The language itself is poor The language is a joy and one of the main reasons it became popular. How do you think it got its ecosystem?
Re: RustPython
#189Just putting my hand up to say that MicroPython is awesome (and runs on the RP2040). https://micropython.org
Re: RustPython
#190Earlier quoted context omitted.
> I don't think you grasp quite the implications of what I was saying, this kind of approach could take _seconds_ to even start running your python application. Indeed, the web demo takes about 5 seconds to cold-start on my beefy PC, between downloading the 22MB WASM blob and compiling it. It also grows the WASM heap to 160MB after running the simple Fibonacci example, and WASM heaps can't (yet) be shrunk, so the onl…
As far as I'm aware, even discarding the instance isn't good enough, since v8 doesn't seem to reclaim the Wasm Linear Memory ever. I think the only thing you can do is start it in a worker and then terminate the entire worker.