Live data from Hacker News

Pyodide: Bringing the scientific Python stack to the browser

hacks.mozilla.org

41–50 of 120 posts

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

#41
post #12

Earlier quoted context omitted.

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.

What now? https://www.tensorflow.org/js/guide/platform_environment#web...

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

#42

I want to believe so bad. Being able to do web development with Python instead of JavaScript has been something I've dreamed about forever.

There's Brython. https://brython.info/

I worked with a researcher a few years ago who used it to do somewhat complex frontend presentations.

But why? Just learn a little javascript. Its fun.

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

#43
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.

isn't it already doing that, converting the C generated by Cython to JS with emscripten? otherwise a huge amount of numerical libs wouldn't work. or did you mean directly without passing by C

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

#44
post #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.

Web assembly?

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

#45
Looks really nice!

I prefer the look of the JSMD format to the Jupyter notebook format and hope that is something that might get integrated into JupyterHub as well.

Question: is there some documentation for deploying your own Iodide server behind a firewall? The original Iodide post mentions this is possible.

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

#46
post #40

Earlier quoted context omitted.

That would be an interesting stack if you could write desktop apps using Python but use the DOM/Browser stuff for the UI layer.

Yeah I often run into the need to develop basic UIs for data analysis for people with limited programming experience. Currently I have to settle for using Jupyter notebooks with embedded ipywidgets, but it's not still not very user-friendly. And the desktop app libraries like PyQt5 are overkill for what I need, and most of the visualization libraries I use are designed for jupyter notebooks/web e.g. Bokeh. If I could…

Maybe check out Dash by Plotly. It's helped me address that exact situation as well.

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

#47
post #42

I want to believe so bad. Being able to do web development with Python instead of JavaScript has been something I've dreamed about forever.

There's Brython. https://brython.info/ I worked with a researcher a few years ago who used it to do somewhat complex frontend presentations. But why? Just learn a little javascript. Its fun.

Python has spoiled every other programming language for me. I look at their syntax and it makes me sad.

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

#48
post #42

I want to believe so bad. Being able to do web development with Python instead of JavaScript has been something I've dreamed about forever.

There's Brython. https://brython.info/ I worked with a researcher a few years ago who used it to do somewhat complex frontend presentations. But why? Just learn a little javascript. Its fun.

It’s never learn a little JavaScript.

It’s learn webpack, learn parcel, learn react, learn vue, learn typescript, learn redux, learn npm, learn yarn etc etc.

If it was python, at least it wouldn’t change every three months.

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

#49
post #33

Can this be used to create a desktop application using Electron?

That would be an interesting stack if you could write desktop apps using Python but use the DOM/Browser stuff for the UI layer.

A couple of years ago I started to learn Python and made something like this. Desktop applications with Flask and PyQtWebkit.

https://github.com/smoqadam/PyFladesk

and this is the sample app:

https://github.com/smoqadam/PyFladesk-rss-reader

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

#50

I want to believe so bad. Being able to do web development with Python instead of JavaScript has been something I've dreamed about forever.

I find it ridiculous that javascript is the only language available for the web. Almost every other platform, from bare metal to Excel, support multiple languages. It's well past due to untie the browser from a mandated language.
Post reply on HN