3 ms·
> At the end is answered why python can't be directly included in Firefox or other browsers(the presenter/main developer works for Mozilla) Direct link to answ
by nailer 12y ago
> At the end is answered why python can't be directly included in Firefox or other browsers(the presenter/main developer works for Mozilla)
Direct link to answer: https://youtu.be/PiBfOFqDIAI?t=1611 https://youtu.be/PiBfOFqDIAI?t=1611
- jdnier 12y ago"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.
- callahad 12y agoWell, 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.
- toyg 12y agoThat's a bit of a fig leaf: dart never had the clout and popularity Python has, and it was clearly something no other browser vendor could get behind. Python has significant cross-vendor mindshare and wouldn't be perceived as fostering anybody's agenda. 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.
- spankalee 12y agoPython might have clout, but in many way it's even harder to optimize than JavaScript, whereas Dart was designed by JavaScript VM experts to be easily optimizable and has a very fast, very small VM. Python is also only just starting to explore optional typing which is obviously a prime feature of Dart and JS derivatives like TypeScript.
- toyg 12y agoIt's very clear that this is not a technical problem, but a political one. Dart could be the second coming of Knuth and still nobody but Google would implement it in a major browser.
- ben336 12y agoThe other issue with Python in the browser is that the significant whitespace requirement prevents minification, which would bloat download size.
- dragonwriter 12y agoSignificant whitespace (in all languages, really, its a difference of degree rather than kind) constrains, but does not prevent, minification. (Idiomatic python code can be reduced by three chars per indentation level on each line with no impact on semantics, and of course other transformations that aren't whitespace elimination that are past of minification are unaffected.) Heck, there are existing python minification tools.
- klibertp 12y agoAlso, with SourceMaps you could provide compiled Python code (.pyc), which is already heavily minified.
- abc_lisper 12y agoHere's a possible solution - Let there be pojs landing page - Download pypy.js in the background - Run python code - Dance with Glee!