[Python-ideas] A tuple of various Python suggestions
Cory Benfield
cory at lukasa.co.uk
Sun Apr 10 14:41:44 EDT 2016
> On 10 Apr 2016, at 01:28, Keith Curtis <keithcu at gmail.com> wrote:
>
> It didn't seem like WebAssembly would enable access to Numpy. It seems
> doubtful it will be much adopted if it can't access the rich Python
> runtime that might be installed.
I feel like this demonstrates a confusion about how the web ecosystem works.
Code that executes inside a web browser’s Javascript runtime does not have arbitrary access to the system. That’s not an arbitrary limitation, it’s vital, because code shipped over the web is inherently untrusted: it can be intercepted, manipulated, edited, and attacked. Each time the web application developers of the world want a new interface to system hardware they have to specify up a whole set of APIs for the browser Javascript to obtain that access in a way that is controlled and enabled by the user.
Browser developers will allow code executing in the browser to access binaries on the host system *over their dead bodies*. Allowing that represents a terrifying security vulnerability. At no point will any sane browser developer allow that.
As it turns out, of course, WebAssembly *would* enable access to NumPy because NumPy could simply be compiled to WebAssembly as well, and distributed along with the Python interpreter and all the other code you’d have to ship.
The TL;DR here is: no web browser will ever allow access to a Python runtime (or any other runtime) that is installed. However, WebAssembly does not have the limitation you’ve suggested.
Cory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160410/8ccb30c0/attachment.sig>
More information about the Python-ideas
mailing list