Live data from Hacker News

Pyodide: Bringing the scientific Python stack to the browser

hacks.mozilla.org

51–60 of 120 posts

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

#51
post #42

Earlier quoted context omitted.

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.

[deleted]

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

#52
post #39

Earlier quoted context omitted.

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

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.

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

#54
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.)

[deleted]

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

#55

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.

Well, that's largely the problem that WebAssembly is aiming to solve. Progress has been significant.

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

#56

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.

Python no, but there's a lot of languages that have a JS transpiler, like ClojureScript, BuckleScript, Fantom, Nim, Haxe, etc. And of course, C and C++ such as what this project did.

Actually, it seems there are some Python transpilers as well, though they don't seem as supported as what I listed.

Anyways, my point is there's quite a lot of options on top of JavaScript. And for web dev, transpilers are the way to go, because bundle size matters for page loads, so options like this, where you compile the whole interpreter into a bundle aren't valid for that. For example, I use ClojureScript for web dev, and it works great. There are options to escape the shackles of having to write JS.

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

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

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

#59

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…

Fully valid points. And I see no reason why we should accept the urge to use the browser for many tasks which are way better accomplished with existing solutions. After all, aren't we increasing the complexity while limiting functionality and ease of use?

Sure, if your core business is in the Cloud and browser market, this may look different, but I believe the terminal will still continue to serve the scientific computing community well…

Post reply on HN