Live data from Hacker News

Pyodide: Bringing the scientific Python stack to the browser

hacks.mozilla.org

81–90 of 120 posts

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

#81
post #78

Earlier quoted context omitted.

I'm getting tired of fighting an uphill battle here. Web technologies have overwhelming dev mindshare; all the cool things happen either as web pages or Electron apps now (which are even worse than web pages, because raw browsers we can upfix a bit with userscripts and plugins). > terminal will still continue to serve the scientific computing community well I hope so, but note how data is on the web, the output is ex…

> all the cool things happen either as web pages or Electron apps now There are also plenty of cool things on mobile OSes.

Most of which are webpages in a webview these days; mobile software is also much more skewed towards casual use due to device form factor. Here I'm focusing on more professional or even prosumer use cases.

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

#82
post #70

There is one area where "computing in the browser" misses the mark a little - browser interfaces (like Jupyter) are often used not just for the convenience they offer, but also because they serve as thin clients, which provision vastly better computing resources than you have locally. So while I do some of my coding in the browser, the code executed is an EC2 far far away, close to my data, with excellent networking…

Not just that, but a lot of organization use the setup to give good starting interface to data scientist who might know nothing about how to set up all the python packages...

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

#83
post #14

Earlier quoted context omitted.

That is no doubt great tool. But imagine even one guy like me has manny gpu card for trying some large memory ai model (not even production). It just can’t work on the cloud during development. What the appeal of this is Standardise on certain way to do things and we can share with others. So far all python and r notebook. Is browser an option?

Browsers don't expose access to GPU compute APIs or multiple GPUs. Any web GPU usage you see right now is limited to shader programs on a single GPU.

Tensorflow.js can actually use WebGL to accelerate machine learning. Have not tried it though.

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

#84
post #72

Earlier quoted context omitted.

As someone not familiar with any of this: is that not exactly what Jupyter Lab does? I understood that the main difference between Pyodide and that is that Pyodide allows you to also use e.g. D3 for rendering?

A big difference is where Python runs. With Pyodide, everything runs entirely in your browser, and the server side can be completely static. With Jupyter, you need a separate copy of Python running on a server somewhere to actually perform any computation.

Ah, thanks for the clarification, I did not know that.

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

#85
post #72

Earlier quoted context omitted.

As someone not familiar with any of this: is that not exactly what Jupyter Lab does? I understood that the main difference between Pyodide and that is that Pyodide allows you to also use e.g. D3 for rendering?

A big difference is where Python runs. With Pyodide, everything runs entirely in your browser, and the server side can be completely static. With Jupyter, you need a separate copy of Python running on a server somewhere to actually perform any computation.

Wouldn't it be more straightforward then to compile Python to WASM, and combine the resulting binary with Jupyter so everything can run in the browser?

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

#86
post #70

There is one area where "computing in the browser" misses the mark a little - browser interfaces (like Jupyter) are often used not just for the convenience they offer, but also because they serve as thin clients, which provision vastly better computing resources than you have locally. So while I do some of my coding in the browser, the code executed is an EC2 far far away, close to my data, with excellent networking…

Not just that, but a lot of organization use the setup to give good starting interface to data scientist who might know nothing about how to set up all the python packages...

A data scientist wo knows nothing about how to setup the tools he or she uses daily?

Tell me more.

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

#87
post #57
post #10

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

Give browsers access to CUDA and the bitcoin mining malware will drain your battery faster than you can hit the back button.

Would disabling the bitwise operations be an effective way to deal with this?

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

#88
post #86

Earlier quoted context omitted.

Not just that, but a lot of organization use the setup to give good starting interface to data scientist who might know nothing about how to set up all the python packages...

A data scientist wo knows nothing about how to setup the tools he or she uses daily? Tell me more.

Yes, it does happen. More often than I think is healthy.

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

#89
post #39

Earlier quoted context omitted.

PWAs, running in a sandboxed/secured environment where installing native python isn't an option, bolting existing python code bases onto existing electron code bases. There are plenty of use cases. Just because you haven't encountered one doesn't mean there aren't legitimate applications. It's hard/impossible to judge someone's tech stack without understand the constraints they are operating under.

Exactly. Otherwise you'd need some other way to communicate between Electron and Python. This is possible, you could use ZeroMQ. But it would be a huge pain. This would easily make sense where you want to execute your app's logic in Python, but want to keep the UI in HTML and JS.

Definitely. And a lot of the motivation for that type of approach is driven by team skill portfolios rather than raw technical merit. If you have a data science team specialized in python and a front end team specialized in JS (which I think we can agree describes the overwhelming majority of DS and FE teams), there's a really strong organizational motivation to bolt python and JS together in flexible ways that match the available deployment infrastructure, which, like it or not, includes electron.

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

#90
post #78

Earlier quoted context omitted.

> all the cool things happen either as web pages or Electron apps now There are also plenty of cool things on mobile OSes.

Most of which are webpages in a webview these days; mobile software is also much more skewed towards casual use due to device form factor. Here I'm focusing on more professional or even prosumer use cases.

Not really, plenty of native code as well.

Also both iOS and Android have very interesting architecture features, still not widespread on desktop OSes.

Post reply on HN