Live data from Hacker News

Pyodide: Bringing the scientific Python stack to the browser

hacks.mozilla.org

21–30 of 120 posts

Re: Pyodide: Bringing the scientific Python stack to the browser

#22
post #17

Would be curious to see if a version of Cython could be made to work with this. Much of my data analysis is me passing numpy arrays into C functions which Cython helps a lot with. So I would be looking for a version of Cython that would convert that to webassembly.

Cython works for ahead-of-time compilation. (Pandas requires it, for example). Making it work in the browser would also mean putting a C compiler there, which people have done. I have no idea how well that would all hold together, though.

Re: Pyodide: Bringing the scientific Python stack to the browser

#24
post #12
post #10

Can it run cuda? Otherwise not that practical. Minor interest. Can this approach run j/k or more important lisp?

You can do GPGPU stuff via WebGL, right?

WebGL doesn't have compute shaders. There are (gross) hacks that "emulate" gpu compute on top of stock shaders but they're limited and can't possibly compete with CUDA.

Re: Pyodide: Bringing the scientific Python stack to the browser

#25

Wow, it seems to work really well. After giving it a small test drive, I'm impressed. Solid work from Mozilla, and a pretty informative article too! That said, between this, iodide and ObservableHQ, I guess I give up. The browser is the new OS. My question now is - how can we make browser environment to be more like Emacs (bear with me)? My main complaints are: - Browser ergonomy absolutely sucks, and there's nothing…

> If I'm to spend 8+ hours a day doing serious work in a web browser, the browser needs to be better.

Agreed! Jupyter notebooks are great, but I miss my Vim keybindings when editing code in cells.

(Plugins like Vimperator always collide with some native keybindings.)

Re: Pyodide: Bringing the scientific Python stack to the browser

#26

Wow, it seems to work really well. After giving it a small test drive, I'm impressed. Solid work from Mozilla, and a pretty informative article too! That said, between this, iodide and ObservableHQ, I guess I give up. The browser is the new OS. My question now is - how can we make browser environment to be more like Emacs (bear with me)? My main complaints are: - Browser ergonomy absolutely sucks, and there's nothing…

These are some good points.

One small way in which Iodide advances this is that by having the editor being a single text editing widget (rather than multiple cells as you see in Jupyter and others), it should be easier to replace that widget with an alternative editor, or (using an extension) link to a native editor on the machine.

But all of these other issues, I agree, are things that would be nice to improve upon. I think in part this comes from so much of the "productivity on the web" stack is dominated by big players (Google Docs, Microsoft Office 365) there hasn't been a big push for interoperability and customizability. I'd love to see a movement around that (but definitely out-of-scope for what the Pyodide team can currently take on!)

Re: Pyodide: Bringing the scientific Python stack to the browser

#27
post #25

Wow, it seems to work really well. After giving it a small test drive, I'm impressed. Solid work from Mozilla, and a pretty informative article too! That said, between this, iodide and ObservableHQ, I guess I give up. The browser is the new OS. My question now is - how can we make browser environment to be more like Emacs (bear with me)? My main complaints are: - Browser ergonomy absolutely sucks, and there's nothing…

> If I'm to spend 8+ hours a day doing serious work in a web browser, the browser needs to be better. Agreed! Jupyter notebooks are great, but I miss my Vim keybindings when editing code in cells. (Plugins like Vimperator always collide with some native keybindings.)

qutebrowser had a keybinding for opening things in vim IIRC

Re: Pyodide: Bringing the scientific Python stack to the browser

#28

I'm looking forward to try out Pyodide in Electron so that I can make use of all the great Python scientific and signal processing libraries for data processing.

lol what a crazy rubegoldberg machine - like the person beneath asks: why not just use "native" python

Re: Pyodide: Bringing the scientific Python stack to the browser

#29
post #11

It's great to see how far WebAssembly and Emscripten has come and this is a really cool app! > If you haven’t already tried Pyodide in action, go try it now! (50MB download) I wonder though how ready is it for production usage. At Repl.it, years ago[1], we moved away from browser-based execution to the cloud because it excluded many users who don't have the client-side firepower to download/parse/execute this much JS…

Browser vs server-side is always going to be a tradeoff, yeah. In some cases you're ok with paying for server time, and then don't need to depend on clients running your code. But in other cases it's much more cost-effective to run code on the client.

Note that the browser has gotten a lot better in the years since repl.it moved away from running code there. In particular wasm parses and executes a lot faster and takes a lot less memory than JS.

Re: Pyodide: Bringing the scientific Python stack to the browser

#30
post #25

Wow, it seems to work really well. After giving it a small test drive, I'm impressed. Solid work from Mozilla, and a pretty informative article too! That said, between this, iodide and ObservableHQ, I guess I give up. The browser is the new OS. My question now is - how can we make browser environment to be more like Emacs (bear with me)? My main complaints are: - Browser ergonomy absolutely sucks, and there's nothing…

> If I'm to spend 8+ hours a day doing serious work in a web browser, the browser needs to be better. Agreed! Jupyter notebooks are great, but I miss my Vim keybindings when editing code in cells. (Plugins like Vimperator always collide with some native keybindings.)

If you run EIN (Emacs Ipython Notebook module) in emacs with vim keybindings (via spacemacs or evil mode, or some other distribution/mode) you can get some pretty great results. Would definitely look into it if you're either already using emacs or willing to try it out.
Post reply on HN