13 ms·
New from Anaconda: Python in the Browser
- gripfx 4y agoPrior discussion: https://news.ycombinator.com/item?id=31217337 https://news.ycombinator.com/item?id=31217337
- kzrdude 4y agoI think jupyterlite is a compelling application of Python in the browser. But it has to be something like that, an application where the actual Python environment is important. If we're just implementing user-facing features, the downsides of Python (size and speed) should make us prefer other solutions! Links: https://jupyter.org/try-jupyter/lab/ https://jupyter.org/try-jupyter/lab/ https://github.com/jupyterlite/jupyterlite https://github.com/jupyterlite/jupyterlite
- ak391 4y agogreat project and check out https://gradio.app/ https://gradio.app/, creates a web demo that runs in the browser using only python
- spaniard89277 4y agoJust a noob over here, what's the upside of this? It runs on top of JS and Python has nothing in the standard lib for dealing with the DOM, I am wrong?
- sva_ 4y agoNumpy and Scipy in the browser might be pretty useful. If only for making something like an interactive tutorial/course of the language, where one doesn't have to download Python immediately, and one doesn't rely on a remote server to execute stuff.
- analog31 4y agoMy impression is that it fills one of the roles of Javascript, to create apps that run on someone's computer without knowing what their computer is going to consist of. For instance I wrote a little hobby app in Javascript, that did some calculations and displayed a result. I was pleasantly surprised to discover that I could run my app on my phone, or on a Linux box, with no code changes. In contrast, sharing a Python program right now requires someone following the instructions for installing Python on their system, or hosting Python on a server.
- nhumrich 4y agoThe main point of this project is it adds JS interop and CAN modify/use the DOM
- mark_l_watson 4y agoI saw this yesterday on Twitter (I follow Peter Wang, and Anaconda founder - it might have been one of his posts). Python is not a favorite language for me (but I need it for deep learning work), but this still looks super exciting! Even using Typescript, I really don't like JavaScript languages. PyScript, like ClojureScript, looks like a great addition to web development tools.
- throw0101a 4y agoIn 1997, client-side programming was very much up in the air: > Imagine a powerful, platform-independent language that lets you put a full GUI interface on Web page. This language has built-in security features, lots of free development tools and libraries, and is available free from Sun Microsystems. Java, you're thinking? Wrong. I'm talking about the Tool Control Language (Tcl, pronounced "tickle") in the form of a browser plug-in for Navigator 3.0 and Internet Explorer 3.0. Both the language and plug-in are produced by the Sun Microsystems SunScript group. But, you're thinking, what could Tcl possibly do for me that HTML, JavaScript, VBScript, Java, Visual Basic, SQL, C/C++, and Perl don't? Read on. * https://people.apache.org/~jim/NewArchitect/webtech/1997/12/junk/index.html https://people.apache.org/~jim/NewArchitect/webtech/1997/12/... (Though doing a search for "Tcl" also gets a lot of results for the electronics company.)
- grej 4y agoTheres a ton of potential here to expand the horizon by helping solve Python’s deployment challenges. I saw an interesting blog post today already that starts to get at the potential. The author, Eric Ma, interweaves python and numpy code throughout his blog post and provides an interactive REPL for the user to try it themselves, and all the code is visible in the view source for the page. https://ericmjl.github.io/blog/2022/5/1/pyscript-python-in-the-web-browser/ https://ericmjl.github.io/blog/2022/5/1/pyscript-python-in-t...
- thundergolfer 4y agoNice. Running `type(M @ A)` shows it is numpy, but also throws a TypeError: `TypeError: descriptor '__repr__' of 'numpy.ndarray' object needs an argument`.