Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hoodchatham
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
hoodchatham
3d ago
In practice it is easier to support rust packages on web assembly than C or C++ packages since Rust cross compilation is in better shape. Of course packages that do IO can be a challenge but problematic IO is also more common in C libraries
2.
▲
by
hoodchatham
3d ago
It wasn't all that easy to make it work: https://blog.pyodide.org/posts/rust-pyo3-support-in-pyodide/
3.
▲
by
hoodchatham
2mo ago
See also "Camus and Sartre: The Story of a Friendship and the Quarrel that Ended It" https://press.uchicago.edu/Misc/Chicago/027961.html
4.
▲
by
hoodchatham
3mo ago
crates.io is for distributing source code, pypi is primarily for distributing wheels which contain a mixture of Python code and compiled shared libraries.
5.
▲
by
hoodchatham
3mo ago
That video was a major inspiration for me and probably indirectly led to me becoming a Pyodide maintainer.
6.
▲
by
hoodchatham
1y ago
It says the same thing in the pyodide repl for what it's worth.
7.
▲
by
hoodchatham
1y ago
Reference types makes wasm/js interoperability way cleaner and easier. wasm-gc added a way to test a function pointer for whether it will trap or not. And JSPI is a standard since April and available in Chrome >= 137. I think JSPI i
8.
▲
by
hoodchatham
2y ago
Yes, it has all the normal CORS restrictions. If you're curious, the PR that added support for this is here: https://github.com/urllib3/urllib3/pull/3195
9.
▲
by
hoodchatham
2y ago
The actual code example he made runs about 100 times faster in Spy/emscripten than in Pyodide.
10.
▲
by
hoodchatham
2y ago
Pyodide uses its own event loop which just subscribes to the JavaScript event loop. My suspicion is that this will be more efficient than using uvloop since v8's event loop is quite well optimized. It also allows us to await JavaScript
11.
▲
by
hoodchatham
2y ago
Are people maintaining wasi ports of Python 2.7 and 3.8?
12.
▲
by
hoodchatham
2y ago
I certainly think there's an 80/20 rule here. Most packages are not very hard to port, and generally the ones that are hard to build use features like threads and multiprocessing, graphics cards, raw sockets, green threads, or oth
13.
▲
by
hoodchatham
3y ago
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
14.
▲
by
hoodchatham
3y ago
aiohttp is still work in progress but it works with a monkey patch. https://github.com/aio-libs/aiohttp/pull/7803
15.
▲
by
hoodchatham
4y ago
To be clear these are all use cases of Pyodide. PyScript only was released two days ago so it's harder to point to real world uses.
16.
▲
by
hoodchatham
4y ago
> Why? This isn't good for most web use cases but there are some major new use cases that it enables. Pyodide is in Python documentation all over the place, for instance on https://numpy.org/ Python has many librari
17.
▲
by
hoodchatham
4y ago
Adding -Os to the Pyodide compilation flags has proven surprisingly hard: https://github.com/pyodide/pyodide/pull/1882 But some other low hanging fruit include unvendoring the special encodings for Asian lang
18.
▲
by
hoodchatham
4y ago
Agreed, wasm loading is supposed to be cached but in practice it doesn't seem to happen.
19.
▲
by
hoodchatham
5y ago
I'm confused how this would work. What about METH_VARARGS | METH_KEYWORDS functions? These are declared with type PyObject* f(PyObject*, PyObject*, PyObject*), are cast to PyObject *f(PyObject*, PyObject*) for the PyMethodDef, and then