News for hackers. Stuff that matters.
Re:Brendan Eich: WebAssembly is a game-changer by CaptSpify on Thursday March 10, 2016 @07:29PM (#11263701)
But they always end up abused. Everyone hates all of those, and that's good, because it causes people to steer away from them. Instead of throwing our hands up, and giving up, we should continue to try to keep those out.
Re:Brendan Eich: WebAssembly is a game-changer by Animats on Thursday March 10, 2016 @07:41PM (#11263774)
How long before the first WebAssembly exploit?

(And what advantage does WebAssembly have over Java applets? We've been down this road.)

Re:Brendan Eich: WebAssembly is a game-changer by icedchai on Thursday March 10, 2016 @07:56PM (#11263849)
The advantage? Instead of having access to a large, stable ecosystem with 20+ years of engineering behind it (Java/JVM), you'll get to use fun, new half-baked tools that barely work to build your webassembly apps.

In another 20 years time, we might be at the level of productivity we had 20 years ago with VisualBasic.

Re:Brendan Eich: WebAssembly is a game-changer by jjm on Thursday March 10, 2016 @10:15PM (#11264431)
You really think closed source Oracle is going to make applets better? People don't like applets cause the experience sucks, the tooling generally lacks, and the libraries are old.

You say that webdev is Applet 2.0? ok sure, at least it's open and moving instead of EOL'd [1] and the experience is better else wouldn't we all still be using Applets...

[1] http://www.v3.co.uk/v3-uk/news/2443810/oracle-signals-the-en...

Re:Brendan Eich: WebAssembly is a game-changer by pjmlp on Friday March 11, 2016 @01:55AM (#11265089)
No it is Applet 5.0.

Applet 2.0 was Flash, followed by Applet 3.0 aka Silverlight, followed by Applet 4.0 aka ecmspriten/asm.js.

Re:Brendan Eich: WebAssembly is a game-changer by icedchai on Thursday March 10, 2016 @11:18PM (#11264617)
Oracle isn't. Sun dropped the ball.

My point is we could've embedded JVM in the browser "correctly" instead of reinventing the wheel with another byte code format.

Re:Brendan Eich: WebAssembly is a game-changer by CyberDildonics on Friday March 11, 2016 @12:05AM (#11264757)
webasm is not a bytecode format
Re:Brendan Eich: WebAssembly is a game-changer by Sanddancer on Friday March 11, 2016 @12:41AM (#11264851)
Yes, it's an IR. It still has all of the issues a bytecode format has, and none of the size advantages.
Re:Brendan Eich: WebAssembly is a game-changer by thesz on Friday March 11, 2016 @11:39AM (#11267636)
Cannot find PDF for Slim Binaries paper by Franz, so I cite it from memory.

They used syntax trees of program as a distribution format, compressed these trees with LZW variant and executed using simple JIT compiler (basically, tree automata over program trees). The size of Slim Binaries was smaller than JAR files for comparable Java programs. I don't remember exact percentage reduction, it was about 20-40, I believe.

Re:Brendan Eich: WebAssembly is a game-changer by CyberDildonics on Friday March 11, 2016 @10:27PM (#11271253)
It is a binary AST and is explicitly made to be both compact and fast to parse.

Not all intermediate representations are bytecode.

Re:Brendan Eich: WebAssembly is a game-changer by renlo on Friday March 11, 2016 @05:09AM (#11265722)
Do you have a source that Webasm's IR won't be as compact as Java bytecode?
Re:Brendan Eich: WebAssembly is a game-changer by mbebenita on Thursday March 10, 2016 @09:15PM (#11264212)
The toolchain is C/C++/LLVM, which is pretty well baked.
Re:Brendan Eich: WebAssembly is a game-changer by drdaeman on Thursday March 10, 2016 @09:24PM (#11264233)
The toolchain, yes. I'm not sure about the libraries - especially the ones that provide the glue to the JS world (or DOM, directly). I heard there is something, say, SDL support for asm.js or emscripten, but I don't think there's a large and stable ecosystem. More like "some stuff patched to some extent".

Oh, and I think in webdev, there is a lot of... err... modern creative and innovative guys and gals out there who are always happy to rewrite the world again, because the last week's tech isn't cool anymore.

Re:Brendan Eich: WebAssembly is a game-changer by sangnoir on Friday March 11, 2016 @05:55AM (#11265858)
> I'm not sure about the libraries - especially the ones that provide the glue to the JS world (or DOM, directly)

Has the Java world come up with anything better than Swing or SWT? Because those are the libraries that are in the "stable ecosystem with 20+ years of engineering behind it", and they are terrible. Give me the 'innovative' webdev guys and gals any day.

Re:Brendan Eich: WebAssembly is a game-changer by Crespyl on Friday March 11, 2016 @10:49AM (#11267262)
We do actually have JavaFX now, which has some has some weird historical baggage from back when it was supposed to be its own platform, but is actually pretty nice to work with from a UI standpoint.

It has a XML/CSS based way to describe the UI/layout and then lets you link that to your code with annotations. It's not perfect, but it's a lot more pleasant to work with than the likes of SWT.

Re:Brendan Eich: WebAssembly is a game-changer by OpenDrapery on Friday March 11, 2016 @09:25AM (#11266759)
"Oh, and I think in webdev, there is a lot of... err... modern creative and innovative guys and gals out there who are always happy to rewrite the world again, because the last week's tech isn't cool anymore."

well said

Re:Brendan Eich: WebAssembly is a game-changer by oblio on Thursday March 10, 2016 @07:58PM (#11263865)
The advantage is that in time people agree about web standards.

Good luck getting Visual Basic adopted as an standard ;)

Re:Brendan Eich: WebAssembly is a game-changer by trentmb on Thursday March 10, 2016 @09:37PM (#11264276)
We've gotten worse.
Re:Brendan Eich: WebAssembly is a game-changer by im3w1l on Friday March 11, 2016 @01:32AM (#11264999)
Fun fact: Netscape promised to include vbscript in Navigator but it never happened.
Re:Brendan Eich: WebAssembly is a game-changer by pjmlp on Friday March 11, 2016 @01:52AM (#11265081)
Worse than that, in 2016 it still hasn't matched what VB and Delphi were capable of in the 90's.

I am really happy that our current customer projects that I am involved with, are all native mobile and desktop applications.

Re:Brendan Eich: WebAssembly is a game-changer by iheartmemcache on Friday March 11, 2016 @05:30PM (#11270016)
It's amazing, really. A few years ago I was brought in to feature-enhance (80%) / bug-fix (20%) some mil-spec hardware that interfaced with some custom Delphi front-end which was acting as a controller. I was amazed at the functionality:LOC ratio along with the correctness[0] with purely pre&post Asserts[1]. The hotel industry still largely runs on one popular Delphi app that's still chugging away. Other than MS Lightswitch which is dead[2], nothing even came close re: great RAD.

(Hey, MS employees reading this - now VS Community is free-for-commercial-use, if you want to capture the 5<=revenue<=50 MM market, replicate the Delphi + VCL ecosystem for RAD apps with Azure as the backing technology. Lightswitch already let me target WPF and HTML5, with Xamarin you now have native mobile. You pushed for an "integrated" desktop + surface/tablet + cell-phone a few years too early, but Xamarin as the presentation layer and Azure as your data-store and you've got the feature set that most businesses need. You'd put me out of business, but absolutely take over that mid-market share.)

[0] Pedants, I'm one of you. No Coq was not used in this project ;) [1] http://blog.matthewskelton.net/2012/01/29/assert-based-error... Similar to this [2] http://janvanderhaegen.com/2015/01/14/its-2015-and-lightswit...

Re:Brendan Eich: WebAssembly is a game-changer by tarsinge on Friday March 11, 2016 @04:05AM (#11265542)
Never used Delphi but after reading about it I would love an equivalent for web dev. I wrote small abstractions over Rails and or React but it's still too low level for my work.
Re:Brendan Eich: WebAssembly is a game-changer by vmorgulis on Thursday March 10, 2016 @08:02PM (#11263887)
Imagine you can run (efficiently) Eclipse or Lucene in any browser.

Someone try to do that with WebKit:

http://trevorlinton.github.io/

Re:Brendan Eich: WebAssembly is a game-changer by jestar_jokin on Thursday March 10, 2016 @09:55PM (#11264351)
Eclipse (Che) is already coming to the browser!

https://eclipse.org/che/

Re:Brendan Eich: WebAssembly is a game-changer by Sanddancer on Friday March 11, 2016 @12:45AM (#11264862)
Eww. One of the most beautiful parts of eclipse is the extensive level of plugins. A browser-based IDE means more painful maintenance, more painful extensibility, and a generally worse user experience. How am I going to tie into native binaries for C/C++ compilation like I can do with eclipse as is? Or the many plugins that give static checking, etc? A web-based IDE is a step backwards.
Re:Brendan Eich: WebAssembly is a game-changer by jm547ster on Friday March 11, 2016 @12:42AM (#11264855)
Joke?
Re:Brendan Eich: WebAssembly is a game-changer by ssalazar on Thursday March 10, 2016 @09:33PM (#11264262)
> (And what advantage does WebAssembly have over Java applets? We've been down this road.)

The same advantage as Javascript, I'd assume: easy access to the DOM and the concomitant natural integration into a webpage. Java applets were like a portal into a weird world that started with a security warning and all of the widgets looked wrong.

Re:Brendan Eich: WebAssembly is a game-changer by akst on Thursday March 10, 2016 @08:19PM (#11263977)
Well unlike third party plugins (such as java, flash, ect) wasm will be executed by the browser (like JS) and likely won't have the same privileges that java/flash have while running.
Re:Brendan Eich: WebAssembly is a game-changer by colordrops on Thursday March 10, 2016 @09:12PM (#11264198)
Why would WebAssembly be any more prone to exploits than JavaScript?
Re:Brendan Eich: WebAssembly is a game-changer by Animats on Thursday March 10, 2016 @09:42PM (#11264293)
Because there will probably be bugs that make it possible to break out of the sandbox and run arbitrary code on the target machine. Just like Java applets.
Re:Brendan Eich: WebAssembly is a game-changer by kibwen on Friday March 11, 2016 @01:33AM (#11265007)
There's no reason to suspect that browser implementors would sandbox wasm any less strictly than JS. Heck, there's no reason to suspect that they wouldn't just re-use the existing JS sandbox.
Re:Brendan Eich: WebAssembly is a game-changer by BrendanEich on Friday March 11, 2016 @02:27AM (#11265202)
Thanks, kibwen. I'll make a stronger statement. By definition, wasm and JS are two syntaxes (initially co-expressive, wasm and asm.js) for one VM.

Do people actually read docs any longer? https://github.com/WebAssembly/ has some, my blog covered the 1VM requirement. There won't be a new "sandbox". JS and wasm interoperate over shared objects.

Re:Brendan Eich: WebAssembly is a game-changer by girvo on Friday March 11, 2016 @12:55PM (#11268241)
> Do people actually read docs any longer

No, not really. People read headlines and make pithy middlebrow comments. Though I also don't think that's a new phenomenon...

Re:Brendan Eich: WebAssembly is a game-changer by _alexander_ on Saturday March 12, 2016 @08:57AM (#11272869)
> Do people actually read docs any longer? No. People only read headlines that WebAssembly is replacement for JS ;)
Re:Brendan Eich: WebAssembly is a game-changer by vmorgulis on Thursday March 10, 2016 @07:57PM (#11263854)
> How long before the first WebAssembly exploit?

It will happen...

> And what advantage does WebAssembly have over Java applets ?

Microsoft supports asm.js.

Re:Brendan Eich: WebAssembly is a game-changer by stray on Friday March 11, 2016 @08:09AM (#11266368)
What advantage does WebAssembly have over Java applets?

Not java.

Re:Brendan Eich: WebAssembly is a game-changer by bobajeff on Thursday March 10, 2016 @07:37PM (#11263743)
The main thing I didn't like about those was that they were proprietary single vendor blobs that stagnated and ran poorly.
Re:Brendan Eich: WebAssembly is a game-changer by drdaeman on Thursday March 10, 2016 @08:01PM (#11263882)
Well, it's no different. Say, ActiveX were just x86 binary blobs. Java applets were JVM binary blobs. (Flash applets were somewhat worser kind of binary blobs with proprietary and undocumented bytecode.) WebAssembly is... again, binary blobs.
Re:Brendan Eich: WebAssembly is a game-changer by bobajeff on Thursday March 10, 2016 @08:42PM (#11264092)
The runtime (which I was taking about) isn't a blob.

Plus minified and obsfucated JavaScript is already quite common. See closure and asm.js.

Re:Brendan Eich: WebAssembly is a game-changer by drdaeman on Thursday March 10, 2016 @09:12PM (#11264204)
Well, my point is OpenJDK/IcedTea-Web isn't a blob either, but it doesn't make Java applets any better. Neither is Wine (which can host ActiveX controls), but I'm not going to try it at home.

And I agree that modern minified, packed and obfuscated JavaScript is also more like a binary blob than source code. WebAssembly is just a logical conclusion of this.

Re:Brendan Eich: WebAssembly is a game-changer by CaptSpify on Thursday March 10, 2016 @07:57PM (#11263863)
I guess I fail to see how the end result of this will end up any different
Re:Brendan Eich: WebAssembly is a game-changer by bobajeff on Thursday March 10, 2016 @08:58PM (#11264147)
Considering WebAssembly is a feature that going to be standardised and supported in all JavaScript engines while those other things were either proprietary runtimes or browser specific API's I'd say you have no reason to think this will end up like them.
Re:Brendan Eich: WebAssembly is a game-changer by CaptSpify on Friday March 11, 2016 @10:09AM (#11267000)
so, IMO, I don't think any of them failed because they were > standardised and supported in all JavaScript engines while those other things were either proprietary runtimes or browser specific API's

I think they failed because they were closed off, and nobody could read the shitty code, so people wrote shitty code. If we have things open, it gives people an incentive to make it look/work nice. Sure, not everyone will, but it makes it easier to shame those that dont.

Re:Brendan Eich: WebAssembly is a game-changer by bobajeff on Friday March 11, 2016 @10:47AM (#11267246)
You can't read the code of most C++ programs yet if operating systems dropped support for C++ there would be a reckoning.
Re:Brendan Eich: WebAssembly is a game-changer by rtpg on Friday March 11, 2016 @02:48AM (#11265280)
Do people outside of "The Web is for documents only!" camp really hate Flash? I've had many good web experiences thanks to Flash (granted, mostly movies and games, but still...)

People on HN seem to discount how absolutely amazing it is to have a VM that can almost seamlessly connect to a network and pull down awesome programs!

Re:Brendan Eich: WebAssembly is a game-changer by dietrichepp on Friday March 11, 2016 @03:04AM (#11265342)
I'm a big fan of Web Assembly but I've hated Flash for a long time. Flash apps tended to peg the CPU and shorten battery life on my laptop, even though most were inconsequential to the web pages that used them (ads). Constant security holes left me paranoid. Crashes left me frustrated. I can't count how many times that Flash crashed on me. The UI of most Flash apps left many things to be desired. From a technical perspective, it was also a deeply flawed design with a mediocre implementation from one vendor. Most video sites which use Flash seem to be far inferior to their HTML+JavaScript counterparts, only the biggest sites ever had decent flash players (Vimeo, YouTube), and I've noticed that some Flash video players can't really handle full screen video with the performance that they should. Ugh. I was glad so many years ago when Flash stopped being bundled with the OS, so I didn't need to take any extra steps to avoid it.
Re:Brendan Eich: WebAssembly is a game-changer by stray on Friday March 11, 2016 @08:22AM (#11266412)
Flash is great -- I love being forced to update flash every 20 minutes.
Re:Brendan Eich: WebAssembly is a game-changer by CaptSpify on Friday March 11, 2016 @10:11AM (#11267017)
Flash does provide a lot of nice/cool things. The problem is it was abused because it was "cool". If we could get people to use it only when necessary, then I probably would have been OK with it. Too many people end up using this in inappropriate places.
Re:Brendan Eich: WebAssembly is a game-changer by reitanqild on Friday March 11, 2016 @05:28AM (#11265771)
I find myself kind of pragmatic but I hated Flash because once it was available people used it for everything, even stuff that never needed it in the first place.
Re:Brendan Eich: WebAssembly is a game-changer by lmm on Friday March 11, 2016 @05:25AM (#11265759)
No, we hated them because their performance and UX was bad. Running programs off the Internet, safely, has long been the goal.
Re:Brendan Eich: WebAssembly is a game-changer by CaptSpify on Friday March 11, 2016 @10:41AM (#11267208)
I guess I fail to see how this will be any safer?