Live data from Hacker News

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

stackoverflow.com

101–110 of 144 posts

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

#101
post #41

The browsers themselves are already built and powered using JS. Maintaining a comprehensive API at the speed that web tech advances in more than one client-side scripting language would be hellish -- browser vendors already have enough trouble agreeing on CSS and JS standards. The Stack Overflow article already raised a number of good reasons why not. Not sure why this is garnering so much attention from HN.

Why arent browser UI's created using HTML, CSS and JS ?

In large part they are. Mozilla Firefox is 80% JS, and the chrome is XUL, an XML language.

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

#102

"closed as off topic by casperOne♦ 8 mins ago" ... The number of programming topics I have had closed on that site angers me. They are becoming Wikipedia.

It's justified. The site is used for problem solving.

Here the problem isn't the asker's, it can't be meaningfully solved by anyone on the site, and it is a matter of opinion whether any answer comes closer to solving it, or that there is a problem at all.

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

#104

Earlier quoted context omitted.

You're not the first person to posit that adding a new VM "almost guarantees breakage". So what? Keep the old VM, transition to the new one by specifying that's what you're targeting, then deprecate the old VM and eventually lose it altogether. You make it sound like the computing world has never introduced a new version of a language that has implications for the older ones and managed to overcome it. Even the web d…

I'm not aware of anyone disrupting critical code the way you're suggesting. It would be akin to rewriting malloc. I'm not discounting a slow transition akin to what you suggest, but you're talking about a long time frame of supporting 2 VMs side by side. Probably 10+ years. And even then , you still have to support JavaScript being written directly in HTML tags, something no other language could enjoy. So every brows…

> It would be akin to rewriting malloc.

Aside from the fact that memory allocators are written, rewritten, and tweaked all the time, your own organization's actions defang this argument: Firefox 3 included a switch to jemalloc.

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

#105
post #102

"closed as off topic by casperOne♦ 8 mins ago" ... The number of programming topics I have had closed on that site angers me. They are becoming Wikipedia.

It's justified. The site is used for problem solving. Here the problem isn't the asker's, it can't be meaningfully solved by anyone on the site, and it is a matter of opinion whether any answer comes closer to solving it, or that there is a problem at all.

re: "The site is used for problem solving."

So says YOU. What's so inherently wrong with letting the people decide? Obviously, a few hundred people found that post quite relevant to the website's topic, helpful, and interesting.

What gives Casper the right to destroy hundreds of people's discussion on a topic that they all deem relevant.

The "vote" on that action was approximately 300 to 1. That 1 vote of no confidence by Casper counts more than everybody's for some reason. That is what really gets me.

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

#106
post #55

"closed as off topic by casperOne♦ 8 mins ago" ... The number of programming topics I have had closed on that site angers me. They are becoming Wikipedia.

The question is not closed at the moment.

Looks like Casper really is a cowardly ghost.

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

#107
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…

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…

A bit cliche but "never is a long." Of course it will be supplanted someday. All it takes is path in a different direction.

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

#108
post #98

Earlier quoted context omitted.

I think you are misreading that quote. It's not replacing a JS VM with another JS VM that's a problem, it's replacing a JS VM with a non-JS specific VM would cause problems and break the web (something that has been proven to happen). Arguing that you can replace a JS VM with a JS VM doesn't help the case of replacing a JS VM with a non-JS VM.

At the surface level, I could see how your position would appear logical. However, the nature of the replacement VM doesn't really matter in the context of what we're describing here. The problems of compatibility remain the same regardless of whether the target VM is a JS-specific VM, or a general purpose VM; reliance on undefined behavior, accidental changes in semantics, optimization bugs, and so on. If browser ma…

There is no such thing as general purpose VM.

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

#109
post #98

Earlier quoted context omitted.

At the surface level, I could see how your position would appear logical. However, the nature of the replacement VM doesn't really matter in the context of what we're describing here. The problems of compatibility remain the same regardless of whether the target VM is a JS-specific VM, or a general purpose VM; reliance on undefined behavior, accidental changes in semantics, optimization bugs, and so on. If browser ma…

There is no such thing as general purpose VM .

A VM that provides a standardized bytecode and execution model capable of executing most modern dynamic and static turing complete languages with sufficient performance. This requires more general facilities for common functionality required; refer to tail call support, JVM's invokedynamic, etc.

Or, shorthand, a general purpose browser VM.

Unless, of course, you're arguing that the above is not truly possible, in which case I'd argue that's exactly what Google is exploring via PNaCL, and has (if not completely efficiently) been implemented across existing VMs. The PNaCL choice of LLVM bitcode was likely in error, but regardless, "no such thing" is a stretch.

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

#110

Earlier quoted context omitted.

The lack of keyword default arguments drives me nuts, python just does it so well. Not to mention ===, etc, etc. None of these things are a showstoppers, but rather amount to "death by paper cut" that in my mind that make the language unsatisfying to use.

You can just use CoffeScript for those little problems.

I've looked at it, and while nifty, makes me worry about leaky abstractions and future support.

Now that you mention it if I'm going to do that, why not use the python-to-javascript compiler from pyjamas? ... hmm.

Post reply on HN