Re:New from Anaconda: Python in the Browser
by throw0101a on Sunday May 01, 2022 @04:38PM
(#31228437)
In 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.
Re:New from Anaconda: Python in the Browser
by grej on Sunday May 01, 2022 @05:34PM
(#31228905)
Theres 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.
Re:New from Anaconda: Python in the Browser
by thundergolfer on Monday May 02, 2022 @01:50AM
(#31231821)
Nice. Running `type(M @ A)` shows it is numpy, but also throws a TypeError: `TypeError: descriptor '__repr__' of 'numpy.ndarray' object needs an argument`.
Re:New from Anaconda: Python in the Browser
by kzrdude on Sunday May 01, 2022 @11:43AM
(#31225953)
I 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!
Re:New from Anaconda: Python in the Browser
by spaniard89277 on Sunday May 01, 2022 @01:09PM
(#31226655)
Just 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?
Re:New from Anaconda: Python in the Browser
by analog31 on Sunday May 01, 2022 @07:33PM
(#31229752)
My 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.
Re:New from Anaconda: Python in the Browser
by sva_ on Sunday May 01, 2022 @03:02PM
(#31227691)
Numpy 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.
Re:New from Anaconda: Python in the Browser
by mark_l_watson on Sunday May 01, 2022 @01:14PM
(#31226709)
I 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.
> 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/...
(Though doing a search for "Tcl" also gets a lot of results for the electronics company.)
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-t...
Links:
https://jupyter.org/try-jupyter/lab/
https://github.com/jupyterlite/jupyterlite
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.
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.