6 ms·
Python in the browser
- alttab 17y agoSilverlight... with "performance" stuff in C#? What kind of client-side scripting is going on that we need to push it down to C#? Javascript does a great job manipulating the DOM, especially with Prototype and the like. Having a stronger scripting language in the browser like python (even ruby?) would be great if it didn't come at a significant cost and increased performance. If you'd ask anyone who spends a significant amount of time writing js code, they'd want it faster. Not Python that is built on top of a proprietary engine (plugin based!), that uses... JAVASCRIPT to embed it. On top of that, the python code looks semantically identical to DOM manipulation in Prototype. So really the only thing you've gained is "writing client code in python" while dumping proprietary formats and a huge initial download on your users. I'll excuse myself as sensationalist when I say that it seems a little selfish on the developer's part.
- pingswept 17y agoThis was quite interesting, until, "This is because Silverlight is the Python execution engine."
- asmosoinio 17y ago"Python in the browser" ... with Silverlight.
- silversmith 17y ago1.5 MB, even if one-time only (assuming no cache-cleaning on client side), is quite heavy. Too heavy for vast majority of web applications.
- ableal 17y agoWould you believe that some sites routinely dump 2MB on you, just for one page ? E.g., for AlleyInsider, which occasionally shows up here: http://www.webpagetest.org/result/100318_6303/ http://www.webpagetest.org/result/100318_6303/ (Nice tester from AOL - try your own cases)
- adamc 17y agoDepends on your audience. For a lot of in-house applications, that wouldn't be much of a problem. But if you are trying to build a new social media web site, it might well be.
- rcoder 17y agoI mostly agree with you, but, just to play devil's advocate... How exactly would you propose cramming a usable Python runtime into a download that was substantially less than 1.5 MB in size? On the OS X 10.5 box I'm sitting at right now, the 'libpython2.6.a' static library from my source build of Python 2.6 is over 6 MB. The actual 'python' binary is nearly 2 MB, and stripped of all debugging symbols, still comes in at about 1.4 MB. If you had some really good compression, and included only a small part of the standard library, I can see getting a CPython package in around the 2-3 MB mark, but not much more.
- mclin 17y agoI find JavaScript and Python are more similar than they are different. Coming from Python, learned JavaScript, felt right at home. (just have to remember the vars, {}s and ;s)
- njharman 17y agoThis is interesting in a very narrow niche. But even being a Python fanboy I'm more likely to bring JS into the server than Python into the browser. It just makes huge piles of sense.
- jdietrich 17y agoWhat an ugly hack.
- daeken 17y agoAs much as I love .NET, I just can't get excited about Silverlight. When you require your users to install a new plugin, it raises the barrier to entry pretty significantly -- especially when you're talking about technical users. Personally, I took a different route: I created a Python->Javascript compiler with a real macro system. Allows me to quickly hack damn near anything together and keeps me away from JS (which I can't stand, largely for aesthetic reasons), without imposing anything at all on my users.
- Qz 17y agoSo basically Silverlight loses out because Flash was first-to-market? They're essentially the same thing. I mean, I don't do Silverlight either, but your reasoning seems suspect.
- euccastro 17y agoAnd now, Python in the browser without Silverlight (i.e., on pure JS): http://www.skulpt.org/ http://www.skulpt.org/
- VBprogrammer 17y ago"Skulpt surely isn't done yet...I'd call it something like 0.12 alpha if it had a version..."