PS. If intel told me to do such crap in their architecture manuals, I would be the last user of PPC out there. I suggest reading them, or JVM bytecode spec to see what is a good compiler target.
"Guys should just get their stuff together and write a reasonable bytecode format for browsers that is fast to read and verify."
A nice-looking bytecode doesn't seem worth the loss of backwards compatibility. The encoding is ugly, but compatibility with existing browsers seems like such a huge win for something that really just amounts to a different encoding.
"Would also save quite a bit of transfer."
The effect on download size is minimal actually, compared to native code. And compared to gzipped LLVM bitcode, gzipped asm.js is tiny. http://mozakai.blogspot.com/2011/11/code-size-when-compiling...
This is not a green field solution - which would require alignment from all browser vendors, but instead an attempt to explore within the confines of what already runs today.
Yeah, I would love something like NaCL, but that aint' happening, so baby steps.
Even if you don't think asm.js is perfect, it's a huge step in the direction you want to go. Complaining that it doesn't teleport us all the way there seems like missing the point.
In case you've forgotten, your suggestion in the other thread was literally just "a standardized VM in the browser." When I tried to get you to elaborate on what that meant in practical terms, you couldn't explain how it would be any different from what we have with asm.js except that you want a bytecode syntax for the input instead of the syntax asm.js uses.
When you say that I could not explain how would it be different, maybe I just did not notice your response which is why I did not respond (and the last response is where you asked how is having JS as bytecode that different from any other bytecode).
How would it be different? I mean it's not that I insist on the bytecode for the sake of having bytecode (I kind of hint at that several times in the last thread, but I guess I could have been more explicit). It's more that I feel that some sort of fundamental change in the way that web applications are built is necessary. Why? I don't think that JS & DOM scripting can be pushed that much further, like I'm having a hard time imagining that say 5-10 years down the line JS applications will be able to compete with native, somewhat computationally heavy applications (which is what I assumed was the direction in which this whole web thing was going). Today, when I open some site which is written as a SPA (e.g. HootSuite) in Chrome, within a couple of minutes, the CPU goes to 100% (on i7). And that is an application that is not really doing anything that computationally expensive. And it's not just HootSuite.
So yeah, I don't really care that much about bytecode, and I realize that some change would not happen overnight. Do I have concrete steps how to achieve this? Can't say that I do.
You're still not getting it. Native (i.e. compiled from C/C++) computationally-heavy applications is exactly what asm.js allows!
The fact that it's a subset of JS is a clever hack that gets over the backwards-compatibility problems, but don't let that fool you -- asm.js really is a low-level compilation target.
I feel like people are misunderstanding the challenge here. The challenge is absolutely not creating a proposed standard or creating a virtual machine. Those are relatively easy. The challenge is herding browser-makers to whatever solution you propose. The nice thing about asm.js is that it automatically works everywhere and it's easy for browser-makers to transition their existing products to it. Because it takes the path of least resistance, has a better chance of living up to the real challenge — gaining acceptance — than any other plan I've heard.
[Situation: There are 14 competing standards.]
Guy: "14?! Ridiculous! We need to develop one universal standard that covers everyone's use cases!"
[Situation: There are 15 competing standards.]
The problem is of course this:
Which is why there are no very high performance multi language VMs.
High level languages such as C still do not compete with hand rolled assembly for diamond-patterns or any situation where the minimum unit of scheduled work is very fine grain.
Well, when I was thinking about this (very theoretically) in the past, the road that seemed to me to be the easiest to take (but not exactly elegant) to get to some prototype was to have a proxy on the client that all browser communication goes through, which executes all code returned from the server and which does all the heavy lifting and returns already rendered html to the browser.
And yeah, I realize that doing a high performance VM is probably the hardest part.
Alon Zakai is just a dude who made Quake and you're bitching at him because it's not Crysis.
Maybe Alon Zakai just isn't as ambitious as you. Maybe he just wants to make the web a little bit better today and you want to make the web a lot better 10 years from now. Good for you, get to work, let others work on the projects that are of interest to them. If you succeed I think you'll be pretty darn famous, and like I said, I'll upvote your efforts even if you fail, it's worth a shot. Get coding.
Well, I can't help you with intentional obtuseness.
> Alon Zakai is just a dude who made Quake and you're bitching at him because it's not Crysis.
Super cool argument from authority (or I'm not quite sure what argument you were making so maybe not), bro.
> Maybe Alon Zakai just isn't as ambitious as you. Maybe he just wants to make the web a little bit better today and you want to make the web a lot better 10 years from now. Good for you, get to work, let others work on the projects that are of interest to them. If you succeed I think you'll be pretty darn famous, and like I said, I'll upvote your efforts even if you fail, it's worth a shot. Get coding.
No shizzle that if someone builds this they would be famous. Also, I was not convinced if it would be worthile for me to sink any time into this until you said that you'd upvote me, but now that that division of labor is established, there is nothing in the way.