News for hackers. Stuff that matters.
Re:Will Emscripten/Asm.js kill Web-Development as we know it? by PommeDeTerre on Thursday March 28, 2013 @08:05AM (#5454319)
On the contrary, this very much follows the typical mentality we've seen with the evolution of the web.

It's one more example of throwing in yet another layer when every other layer has proven to be insufficient.

And it's another example of trying to once again twist JavaScript into something it isn't very good at doing.

Once again, like so many web technologies before it, this will cause waste for years to come. There will be a huge waste of time for users who sit there waiting for slow code to execute. There'll be more wasted time and effort for developers stuck dealing with the messes that this will create.

It's clear that a proper VM of some sort would be useful in today's browsers. Trying to build this upon some awful subset of JavaScript is not the right way to do it.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by phpnode on Thursday March 28, 2013 @08:19AM (#5454357)
ugh. I am so sick of this "build a proper VM" wailing. It is such a naive and ignorant position. It completely ignores the reality of the market. JavaScript is dominant, it is fast, it runs on basically every device, browser vendors are deeply invested in it and you want to throw all that away and start afresh? ASM.js is a realistic way to get better performance today, not in the 10 years or so it would take for a new platform to reach acceptable adoption rates. And who's to say that some new "proper" VM wouldn't end up with warts like JS has anyway?
Re:Will Emscripten/Asm.js kill Web-Development as we know it? by nbevans on Thursday March 28, 2013 @09:09AM (#5454534)
ASM.js has nothing to do with performance. It's about abstracting away the utter pile of shit that is JavaScript so that we can start using the languages of real men on the web.

There have been plenty of works done in this area already. See WebSharper, Script#... just two of the many available in the .NET ecosystem.

ASM.js is about formalising a known-good subset of JS that can be guaranteed to be compatible across browsers and therefore prime territory for building compilers on top of.

JS is nothing more than an intermediate language; it is similar to MSIL, JVM Bytecode, ASM. The only difference is that it happens to have a slightly C-style syntax. This is merely a coincidence and does not change the fact that is still an intermediate language designed for the web. It is utterly crazy the world has persisted writing code in it for so long. It is the modern web day equivalent of writing code in Assembly language.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by PommeDeTerre on Thursday March 28, 2013 @08:34AM (#5454393)
What you're saying is contradictory. If JavaScript is already "fast", then why the need for something like this "to get better performance today"? If JavaScript is "dominant", then why is technology like this needed, mainly to enable developers to use non-JavaScript languages?

The market is speaking, and it's saying that JavaScript needs to go.

Besides, there are numerous proven VMs and runtimes that could either be used directly, or at least used as a model if a new system is needed. NaCl and PNaCl have already shown one much better approach that is possible. Your "10 years" estimate is not based on reality.

And frankly, no, I don't think any proper VM or runtime would ever end up as bad as JavaScript is today. No other language, aside from perhaps PHP, exhibits so many inherent, fundamental flaws. It would take significant effort (and ignorance) to duplicate the same degree of mistake and flaw.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by phpnode on Thursday March 28, 2013 @09:16AM (#5454572)
1. speed is relative. it's possible for fast things to go faster. JavaScript as it stands is fast enough for a lot of tasks, ASM.js makes it faster in certain places. This can only be a good thing.

2. The market isn't saying JavaScript needs to go, JavaScript skills are high in demand, more so than ever.

3. This is the crux of your misunderstanding. I agree it would be nice if browsers supported e.g. LLVM out of the box. But they don't. And for political reasons they won't. If a company as large and powerful as Google cannot push NaCl adoption at all in other browsers (and NaCl was announced in 2008, so we're already half way to 10 years), how will you get them to adopt $YourVMofChoice? This is where ASM.js really wins - it is a subset of JavaScript, so it already works in other browsers, albeit without the performance boost and it is much easier for browser vendors to implement support for ASM.js than it is a whole new VM. Being backwards compatible means more web developers are likely to use it which will put pressure on other browser vendors to implement it. No one is arguing that ASM.js is a better technical solution to the problem, but it is a much better practical solution to the problem.

4. So this is another thing. Most of the people who are against ASM.js seem to dislike JavaScript the language. But ASM.js would free you from JavaScript almost entirely. The only time you'd see it is when you're debugging the "bytecode", and surely human readable bytecode is nicer than whatever something like LLVM spits out? Anyway, it seems like slightly curious reasoning.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by niggler on Thursday March 28, 2013 @08:45AM (#5454430)
"I don't think any proper VM or runtime would ever end up as bad as JavaScript"

Flash? Silverlight? ActiveX?

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by criley on Thursday March 28, 2013 @09:06AM (#5454521)
>"If JavaScript is already "fast", then why the need for something like this "to get better performance today"?

This feels obtuse -- obviously JS today is faster than it's ever been, but we want native c performance out of it. Do you have a in-browser VM solution today that can do complex, GPU-powered full 3D on every platform?

Then your VM solution is already inferior to javascript and will need significant time, money and development to even catch up to javascripts current level of "fast".

(Using, of course, "game" performance as a benchmark for the vague term "fast")

>"The market is speaking, and it's saying that JavaScript needs to go.

What? How do you rationalize this? Every major browser supports it to their core and most are working on dramatic imporvements for their implementations. Every mobile device supports it natively. Every computer I've seen in the past decade supports it.

The market is speaking? Where? Where is the market speaking? What devices are without javascript?

What browsers don't support javascript?

I think you are confusing the "market" for "a small subset of a-typical vocal developers".

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by camus on Thursday March 28, 2013 @09:16AM (#5454573)
saying that javascript is fast doesnt make sense.

Is it faster than 5 years ago sure. But the amount of work on needs to do have good performances is just silly. Is it everywhere ? sure. But i've seen a lot of crazy JS demos , i'm running a decent machine ( Macbook pro) and sorry but most of the exemples i see have poor perfomances , and nothing close to native performances. So imagine a soft you need to use 6 hours a day , you'll feel the bad perfs , trust me.

So please let's stop saying javascript is fast, it is a lie. Speed is not something absolute , it is relative. It is slower than native and will always be. Native will always be easier to optimize too.

Doesnt mean we cant do anything in html5/js , just mean we cant do everything. And the more "special" feature one uses the less "compatible" the js app will be.

Now is ASM a good thing sure. But let's not fool people just to promote JS.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by simonlc on Thursday March 28, 2013 @08:16AM (#5454344)
I agree. There's absolutely no reason to have photoshop in the browser. If you want to sync your files with 'the cloud' you don't need a browser for that.
Re:Will Emscripten/Asm.js kill Web-Development as we know it? by kayoone on Thursday March 28, 2013 @08:24AM (#5454367)
well id personally love to use my desktop as i left it off with a click of a button on any pc/tablet that has a browser.

Its not a big pain but it would make my life easier!

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by VikingCoder on Thursday March 28, 2013 @08:49AM (#5454448)
The browser is now an operating system (as Chromium proves). Photoshop is welcome to run on any operating system.

Photoshop on a Chrome Pixel, for instance, makes a lot of sense.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by camus on Thursday March 28, 2013 @09:18AM (#5454578)
the Pixel makes little sense to start with unless you enjoy vendor locking.
Re:Will Emscripten/Asm.js kill Web-Development as we know it? by VikingCoder on Thursday March 28, 2013 @09:55AM (#5454727)
I don't understand your statement at all.

The only thing I'm locked into is Chromium, and even that I can replace.

Re:Will Emscripten/Asm.js kill Web-Development as we know it? by 4ad on Thursday March 28, 2013 @06:34PM (#5458116)
The only thing happens to be every thing, and once you replace it the whole point becomes moot.
Re:Will Emscripten/Asm.js kill Web-Development as we know it? by VikingCoder on Friday March 29, 2013 @01:53PM (#5461984)
So, imagine the list of operating systems that you believe it makes sense to run Photoshop on.

I'd like to add Chromium to your list.

And your answer is... that... "vendor lock-in"?

I'm sorry, but you're making zero sense.