Live data from Hacker News

Why don't they implement Python and Ruby on the web browsers?

stackoverflow.com

21–30 of 144 posts

Re: Why don't they implement Python and Ruby on the web browsers?

#21
post #9

Earlier quoted context omitted.

Because we all hate javascript. I just wish they decoupled javascript engines and browsers, made a language agnostic api spec for the DOM, and just let html tags require a language ref and the browser would be expected to try to find a runtime on the local machine or ask the user to install it. The monopolistic nature of javascript in client web browsing is bad for innovation.

Really? You're discounting all of the incredible webapps, games, and social networking on the web. If Javascript was bad for innovation, I sure don't see it. You're talking language syntax. Although it matters, it practically doesn't. People build stuff no matter what the language looks like. Look at Obj-C, that thing is horrid (syntax-wise) but look at all the developer adoption. What is bad for innovation is to mov…

> If Javascript was bad for innovation, I sure don't see it.

This is a fallacy: in absence of a peek at some alternative world where something else was available, you can't tell that javascript improved or worsened the innovation rate.

Re: Why don't they implement Python and Ruby on the web browsers?

#22
post #17

Earlier quoted context omitted.

Mozilla is not against a bytecode VM. Mozilla (and the WebKit team minus Google) is against arbitrarily adding new language VMs because they create a major compatibility burden. Remember this: 1) JavaScript is locked in. It's too entrenched, it's never going away. Let's just accept that. 2) That means that adding additional languages creates a burden. You're now supporting, at minimum 2 VMs. If you're going to suppor…

> JavaScript is locked in. It's too entrenched, it's never going away. Let's just accept that. JavaScript doesn't have to go anywhere, it can run on a shared VM like any other language. > That means that adding additional languages creates a burden. You're now supporting, at minimum 2 VMs. If you're going to support a second VM you better get it positively right. That doesn't proclude doing it, it just means it's not…

> JavaScript doesn't have to go anywhere, it can run on a shared VM like any other language.

JS running on a general VM would be slower. That's against the interests of the user.

People should stop caring what language it is. If you really don't have the skill required to use Javascript, use something easier for you and get it to compile to JS.

I've really never understood developers that bitch and whine about programming languages all day.

Adding alternate languages to the browser does absolutely nothing for the user. It would only be there to appease the "I shall only develop in lisp" extremist developers.

Re: Why don't they implement Python and Ruby on the web browsers?

#24
post #17

Earlier quoted context omitted.

> JavaScript is locked in. It's too entrenched, it's never going away. Let's just accept that. JavaScript doesn't have to go anywhere, it can run on a shared VM like any other language. > That means that adding additional languages creates a burden. You're now supporting, at minimum 2 VMs. If you're going to support a second VM you better get it positively right. That doesn't proclude doing it, it just means it's not…

> JavaScript doesn't have to go anywhere, it can run on a shared VM like any other language. JS running on a general VM would be slower. That's against the interests of the user. People should stop caring what language it is. If you really don't have the skill required to use Javascript, use something easier for you and get it to compile to JS. I've really never understood developers that bitch and whine about progra…

> JS running on a general VM would be slower. That's against the interests of the user.

What do you base this on? It's sounds like an unsupported assumption regarding the complex technical constraints involved in implementing a general purpose VM and JIT.

Putting the technical specifics aside, intuitively, why would the general VM be slower, especially since the requirement to support JavaScript would be obvious to everyone involved from day 1?

Re: Why don't they implement Python and Ruby on the web browsers?

#25
post #18

Earlier quoted context omitted.

Mozilla is not against a bytecode VM. Mozilla (and the WebKit team minus Google) is against arbitrarily adding new language VMs because they create a major compatibility burden. Remember this: 1) JavaScript is locked in. It's too entrenched, it's never going away. Let's just accept that. 2) That means that adding additional languages creates a burden. You're now supporting, at minimum 2 VMs. If you're going to suppor…

Why 2 VMs? Can't you compile JavaScript to the imaginary bytecode and have a single unified VM to run them all?

You can, sure. 2 problems:

1) It will undoubtedly be slower than the current JS-quirks optimized VMs.

2) There is a shit-ton of JS on the web that has been tested to work with the current crop of VMs, moving to a new VM almost guarantees breakage. It's the same reason why GNU Screen isn't rewritten despite (supposedly) being a mess.

Re: Why don't they implement Python and Ruby on the web browsers?

#26
If you spend all your energy complaining about JavaScript and demanding the browser vendors provide you with a better replacement the problem here is not JavaScript, it's you.

JavaScript is far from the best language ever created, but it's also far from the worst.

The biggest pain in the ass working with JavaScript on a day to day basis is not JavaScript itself -- most of its follies can be avoided by good programming practices -- it's the DOM.

Re: Why don't they implement Python and Ruby on the web browsers?

#28
post #16
post #8

The top comment states that any other options are impossible: "At this point we must concentrate on improving the language." I can't stand this willfully defeatist attitude. It's also not restricted to stack-overflow participants -- this position is pervasive at Mozilla. Why can't we have a standardized generic bytecode and VMs to run it? Why should the web be locked to a single language forever ? Can you imagine if…

Yes, what if we had locked mobile to a single language... like Android (Java), iOS (ObjC), WP7 (C#/Silverlight), webOS (JavaScript), Symbian (Symbian/C++). Oh, well... at least we have the glaring success of MeeGo which didn't embrace single language completely.

I'll break this down:

- Android: Java, NDK (C++, C), ObjC (via Apportable), MonoTouch (C#/F#), Lua, JS

- iOS: C, C++, ObjC, JS, Lua, MonoTouch

... actually, that's as far as I want to go. Point is, you can pick your implementation language, and people do.

We're also likely to see additional language explorations on these platforms as they stabilize and mature.

Re: Why don't they implement Python and Ruby on the web browsers?

#29
post #14

Earlier quoted context omitted.

I think the reluctance comes from being burned by Microsoft infusing their own technologies into the web browser in the past. I realize that Python and Ruby would be standard and open but people still fear the possible fragmentation.

If the browsers were to implement a general purpose VM, the choice of actual high-level languages would be distinct from the browser maker, and open to experimentation and competition.

I don't think it's as cut and dry as that.

What if we do have a general purpose vm. Doesn't each browser still need to implement language compilers for all languages to that vm?

ie what if Microsoft supports langauge foo but not language baz. Chrome supports language baz but not foo and Mozilla only supports their own proprietary language. All of which compile to the common vm.

How do websites written for IE work on Chrome, and visa versa? Do all sites have to have their code byte compiled before shipping?

Then your stuck with performance differences and byte code incompatibilities at best, which is about where we are now.

Re: Why don't they implement Python and Ruby on the web browsers?

#30
post #17

Earlier quoted context omitted.

> JavaScript is locked in. It's too entrenched, it's never going away. Let's just accept that. JavaScript doesn't have to go anywhere, it can run on a shared VM like any other language. > That means that adding additional languages creates a burden. You're now supporting, at minimum 2 VMs. If you're going to support a second VM you better get it positively right. That doesn't proclude doing it, it just means it's not…

> JavaScript doesn't have to go anywhere, it can run on a shared VM like any other language. JS running on a general VM would be slower. That's against the interests of the user. People should stop caring what language it is. If you really don't have the skill required to use Javascript, use something easier for you and get it to compile to JS. I've really never understood developers that bitch and whine about progra…

It's not the lisp extremists that want this, it's the Python and Ruby ones. Lisp people already have plenty of options: I can think of ParenScript and ClojureScript off the top of my head. (And I'm not even (much of) a Lisp weenie. :)

(parenscript http://common-lisp.net/project/parenscript/)

(clojurescript https://github.com/clojure/clojurescript)

Post reply on HN