PyPy.js: A fast, compliant Python implementation for the web
91–100 of 144 posts
Re: PyPy.js: A fast, compliant Python implementation for the web
#92I watched the presentation in Pycon 2015[1], and I really liked how honest/aware they are about the challenges and tradeoffs (so far, the performance it's pretty bad compared to javascript, and the download size is still an issue). At the end is answered why python can't be directly included in Firefox or other browsers(the presenter/main developer works for Mozilla) [1] https://www.youtube.com/watch?v=PiBfOFqDIAI
> python can't be directly included in Firefox or other browsers So Python is a bad candidate, but there are better candidates out there. For example, jsofocaml (using OCaml in the browser) looks quite promising. In the end, we need a lightweight yet properly defined and highlevel language, and the ML languages as well as the LISP languages are great candidates for that.
Re: PyPy.js: A fast, compliant Python implementation for the web
#93Earlier quoted context omitted.
"If we ship Python inside of Firefox, no one is going to use it because it's not available in Chrome, it's not available in Internet Explorer." Oh yeah? Try me.
Well, Google more or less tried the same with Dart and has since abandoned that plan in favor of targeting JS as Dart's primary runtime. Then again, the Dart VM never shipped in mainline Chrome, so who knows how a more committed attempt would have played out.
It's true though that getting even two major browser vendors to agree on supporting another scripting language in addition to JS, is really really hard. I don't see it happening unless Nadella's "Really Good, Honest! (TM)" Microsoft makes some sort of grand gesture towards Google or (more likely) Mozilla.
Re: PyPy.js: A fast, compliant Python implementation for the web
#94Earlier quoted context omitted.
> python can't be directly included in Firefox or other browsers So Python is a bad candidate, but there are better candidates out there. For example, jsofocaml (using OCaml in the browser) looks quite promising. In the end, we need a lightweight yet properly defined and highlevel language, and the ML languages as well as the LISP languages are great candidates for that.
Not sure why this was downvoted. Does anyone care to elaborate?
Re: PyPy.js: A fast, compliant Python implementation for the web
#95Can the client-side python access the DOM?
Re: PyPy.js: A fast, compliant Python implementation for the web
#96Sadly, "import antigravity" doesn't work
I was more disappointed (but not surprised!) that "import pip" didn't work. If it did (and it has big ramifications for how much of "python" (for some definition of "python" that includes most of the standard library) works. Eg sockets, interacting with some sort of "local" "file-system" etc) one could (this is handy if working on windows, and running python via cmd-r python.exe): import pip # pip.main expects a list…
I'd be happy enough with serving .py files with the exact same restrictions and privileges that JS libraries have now.
Re: PyPy.js: A fast, compliant Python implementation for the web
#97Sadly, "import antigravity" doesn't work
I was more disappointed (but not surprised!) that "import pip" didn't work. If it did (and it has big ramifications for how much of "python" (for some definition of "python" that includes most of the standard library) works. Eg sockets, interacting with some sort of "local" "file-system" etc) one could (this is handy if working on windows, and running python via cmd-r python.exe): import pip # pip.main expects a list…
Re: PyPy.js: A fast, compliant Python implementation for the web
#98Earlier quoted context omitted.
Glorious indeed. At least three levels of abstraction, two JITs, and a host of supporting code. Can we add some more layers like an emulator or get recursive by getting something like Pyasm running inside it?
But... Hardware is cheap, right? Hardware gets faster all the time, right? Sure, the end user rarely sees any noticeable improvement because we just use the speed increase as an excuse to write ever more inefficient code, but at least you get to use your favorite language in the browser.
Re: PyPy.js: A fast, compliant Python implementation for the web
#99I watched the presentation in Pycon 2015[1], and I really liked how honest/aware they are about the challenges and tradeoffs (so far, the performance it's pretty bad compared to javascript, and the download size is still an issue). At the end is answered why python can't be directly included in Firefox or other browsers(the presenter/main developer works for Mozilla) [1] https://www.youtube.com/watch?v=PiBfOFqDIAI
I wonder if Python could be embedded as an addon.
Re: PyPy.js: A fast, compliant Python implementation for the web
#100Earlier quoted context omitted.
> However I'm not sure if the drawbacks can be addressed in the current JS model, notably: very slow warmup, huge download size Only for the first time loading it. It would be great if some big organization (looks at Google) hosts the "standard" version of the file, much like jquery, so that it would be cached and ready to be used on the local machine most of the time.
I believe this only addresses the download size and not the crazy warmup (you still reparse it etc.)