News for hackers. Stuff that matters.
Re:WebAssembly’s post-MVP future by skybrian on Monday October 22, 2018 @02:37PM (#18277091)
I'm reminded a bit of Java's early days when Sun was able to create the illusion that it would take over the world. WebAssembly has had a lot of early success and its limits are hazy, but it seems like they must be out there somewhere? To speculate:

On the server side, it seems like docker format has already won. Maybe cpu architecture portability doesn't matter there and x86 is good enough? Although serverless and edge computing often use JavaScript.

On mobile this seems to depend on Apple and/or Google deciding to support WebAssembly for native apps, which seems unlikely.

Developers need laptops to run their development environment in. I'm wondering if this might just be Linux tools running in a container on your laptop. Chromebooks seem to be moving in that direction.

The revival of something like Sandstorm might be interesting, but that's pretty speculative.

Re:WebAssembly’s post-MVP future by kllrnohj on Monday October 22, 2018 @03:55PM (#18277831)
WebASM really only makes sense in the context of embedding untrusted code, which outside of the browser is a concern that largely doesn't exist.

Otherwise you are severely crippling yourself for no real gain. You're going to lag the hardware features by years if not decades, you're not going to get arch-specific optimizations as readily, and you're going to have huge startup costs. You're also stuck with sandbox restrictions that you've self-imposed, making it harder to do things that would have otherwise been trivial or needs to be re-invented.

You could maybe squint and claim you need a portable IR, but given there's only really 2 ISAs in widespread use (x86 & ARM) does that _really_ matter? Similarly you could claim cross-OS support, but again as there's only _really_ 2 OS's for each target (Windows/Linux for server, Android/iOS for mobile) does that _really_ matter? Critically does it matter to such a degree that you'd rather severely cripple your own app to get it instead of just compiling it 2, 3, or 4 times?

Re:WebAssembly’s post-MVP future by raphlinus on Monday October 22, 2018 @07:50PM (#18279635)
I agree that WASM is only really interested for embedding untrusted code, but am not sure that the browser is the only place where you need that. A good example is Cloudflare's workers, which they talked about at the last SF Rust Meetup.

Once you get a _good_ solution to embedding untrusted code, you might find it turns out to be pretty useful.

Re:WebAssembly’s post-MVP future by kllrnohj on Monday October 22, 2018 @08:02PM (#18279695)
Do you really need embedded code for things like Cloudflare's workers, though? It doesn't seem like it does, seems like each worker can just be its own process using normal process isolation mechanisms. Switching to embedded untrusted code for things like that would actually make a lot of stuff a lot harder - scheduling, resource monitoring, etc... would all need to be re-invented from scratch. Is it really useful to re-invent the kernel in userspace to use a bunch of embedded webasm contexts instead of just a bunch of processes?
Re:WebAssembly’s post-MVP future by kentonv on Monday October 22, 2018 @08:19PM (#18279791)
Hi. Cloudflare Workers tech lead here.

No, process isolation does not work for us, because it does not scale well enough.

The point of Cloudflare Workers is to distribute your code across Cloudflare's entire edge network -- 154 locations and growing -- so that you can respond to requests at the closest location to your end user. We want to put every customer's code in every location, rather than forcing you to choose a handful. Meanwhile, obviously, not every one of our locations is a mega-datacenter.

This means we need a way to support extremely large numbers of tenants per machine, with relatively low traffic per tenant (because each tenant's traffic is spread out over the world). We need this to be efficient.

This means, we need low memory overhead (to support many tenants per machine), very fast cold-start time (since cold starts are a lot more common in a decentralized scenario), and low overhead to switch between workers (because we're mixing traffic from all our customers everywhere).

Using embedded V8 isolates within a single process gives us 10x-1000x better performance on all these metrics than if we gave a whole process to each customer.

Relatedly, here's a talk I gave at Heavybit about the neat things you can do when you have fine-grained server compute: https://www.youtube.com/watch?v=YZSvJNBZsxg

Re:WebAssembly’s post-MVP future by jeremyjh on Monday October 22, 2018 @09:21PM (#18280061)
V8's developer guide doesn't recommend running untrusted code in a shared process with "sensitive" data. How do you know if your different customers data is sensitive?

https://v8.dev/docs/untrusted-code-mitigations#sandbox-untru...

Re:WebAssembly’s post-MVP future by kentonv on Monday October 22, 2018 @09:44PM (#18280156)
This is a relatively new recommendation on V8's part specifically in response to Spectre-type vulnerabilities.

We've spent a lot of time thinking about and building mitigations for speculative side channel attacks. For example, early on in the project -- before anyone even knew about Spectre -- we made the decision that `Date.now()` would not advance during code execution, only when waiting for I/O. So, a tight loop that calls `Date.now()` repeatedly will keep getting the same value returned. We did this to mitigate timing side channels -- again, even though we didn't know about Spectre yet at the time.

Chrome has indeed stated that they believe process isolation is the only mitigation that will work for them. However, this statement is rather specific to the browser environment. The DOM API is gigantic, and it contains many different sources of non-determinism, including several explicit timers as well as concurrent operations (e.g. layout, rendering, etc.). Side channel attacks are necessarily dependent on non-determinism; a fully-deterministic environment essentially by definition has no covert side channels. But, there's no way Chrome can get there.

The Cloudflare Workers environment is very different. The only kinds of I/O available to a worker are HTTP in, HTTP out, `Date.now()`, and `crypto.getRandomValues()`. Everything else is perfectly deterministic.

So, for us, the problem is much narrower. We need to make sure those four inputs cannot effectively be leveraged into a side channel attack. This is still by no means trivial, but unlike in the browser, it's feasible. `getRandomValues()` is not useful to an attacker because it is completely non-deterministic. `Date.now()` we've already locked down as mentioned above. HTTP in/out can potentially be leveraged to provide external timers -- but the network is extremely noisy. A practical attack would require a lot of time in order to average out the noise -- enough time that we can do a bunch of higher-level things to detect and disrupt possible attacks. It helps that Workers are stateless, so we can reset a worker at any time and move it around, which makes attacks harder.

NetSpectre demonstrated that even physical network separation does not necessarily protect you against Spectre attacks. There's simply no such thing as a system that's perfectly secure against Spectre, process isolation or not. All we can do -- aside from going full BSG and giving up on networks altogether -- is make attacks harder to the point of infeasibility. Luckily, we have lots of tools in our toolbox for making Spectre attacks infeasible in the case of Cloudflare Workers.

Re:WebAssembly’s post-MVP future by chrisweekly on Tuesday October 23, 2018 @09:08AM (#18283018)
1. Thanks for your multiple well-informed, articulate comments.

2. "BSG"?

Re:WebAssembly’s post-MVP future by steveklabnik on Tuesday October 23, 2018 @09:45AM (#18283297)
I think your parent is referring to Battlestar Galactica; it had no computer networks, and therefore was not able to be effectively attacked by the Cylons.
Re:WebAssembly’s post-MVP future by kentonv on Tuesday October 23, 2018 @12:02PM (#18284549)
Yep. :)

The Battlestar Galactica was the only ship in the fleet that hadn't networked its computers, because the captain was paranoid. When the Cylons (AI) attacked, they instantly hacked all the other ships, but the Galactica stayed under human control and got away.

It's fiction, but I'm honestly really impressed with this bit of writing. It's both an entirely plausible and almost realistic strategy, and it gives the writers an excuse for the crew members to interact rather than let the computer do everything. Whereas on Star Trek one wonders why they bother with a bridge crew -- the captain might as well be punching everything into a computer directly rather than inefficiently giving orders to humans.

Re:WebAssembly’s post-MVP future by mwcampbell on Tuesday October 23, 2018 @08:57PM (#18288818)
Do you see the complexity of V*'s multi-tiered JIT compiler as a security risk? Maybe a simple JS interpreter plus a simple AOT WebAssembly-to-x64 compiler would be safer.
Re:WebAssembly’s post-MVP future by kentonv on Thursday October 25, 2018 @06:34PM (#18305191)
Complexity is a risk, but we also care deeply about performance and startup time in much the same ways Chrome does. So we need that JIT.

I'm comforted by the fact that if there's a breakout in V8, Chrome is a much juicier target than we are -- and has an incredibly strong security team that will jump on the issue. I think we would be overall less secure using a lesser-known JS implementation.

Re:WebAssembly’s post-MVP future by mwcampbell on Thursday October 25, 2018 @09:04PM (#18305981)
Actually, I think Cloudflare is a juicier target, due to a combination of two things:

1. No process isolation 2. Data from lots of users on any given node

Am I missing something?

Re:WebAssembly’s post-MVP future by kentonv on Saturday October 27, 2018 @02:17PM (#18316941)
While I don't mean to deny the risk, which we take very seriously, I do think there's a number of reasons Chrome remains a much more interesting target:

* While process isolation makes Chrome somewhat less interesting than it used to be, keep in mind that process isolation is being rolled out as a defense to arbitrary-read attacks (like spectre), not arbitrary-code-execution attacks. Executed code can potentially talk to the rest of Chrome and perform actions that a web site is not intended to be allowed to. (At least in the past, this included the ability to read all the user's cookies, though it's possible they've improved on that, I don't know.)

* Cloudflare has potentially multiple tenants in a node, but the attacker has no control over who they are. There's no particularly good way to target a specific end user nor a specific web site.

* V8 vulnerabilities are likely to be memory safety issues, which are difficult to leverage into an attack without an understanding of the process's memory space, which is hard to get without having access to the source code or a compiled binary. The attacker would be flying blind and would almost certainly just segfault or be caught by our layer 2 sandbox (which blocks almost all syscalls), which incidentally would immediately alert us to their activity. (I don't particularly like this as a defense, since I like open source -- but frankly, it is a pretty big barrier.)

* The attacker would be burning their zero-day by uploading it to Cloudflare. We block eval() and the like, such that the only way to run code on our edge is by uploading it through our deployment APIs, which keep a copy.

* Last I checked, Chrome still does not use site isolation on mobile, because the overhead is too high.

Re:WebAssembly’s post-MVP future by pjmlp on Monday October 22, 2018 @06:19PM (#18279065)
That is how IBM i, IBM z, Unisys ClearPath work, how a large majority of Android and Windows apps, some iOS ones (mostly watchOS actually), Garmin devices, SIM cards, Blue Ray, Ricoh copiers, ...

If anything the industry is increasingly adopting bytecode as distribution format, kind of returning to the early 60/70's designs with microcoded CPUs just with another approach to the final execution.

Re:WebAssembly’s post-MVP future by int_19h on Monday October 22, 2018 @10:12PM (#18280250)
For the vast majority of code that runs on either desktop or mobile, the latest and greatest hardware features don't matter, and neither do arch-specific optimizations. Startup costs are trivially solved by an OS-level precompilation and caching mechanism. And we already have sandboxes for apps, even on the desktops (both macOS and Windows store apps). Besides, why can't WebAssembly have a different, less limiting sandbox outside of the web?

The real benefit is having a portable bytecode that 1) can accommodate any language out there without constraining their object and memory model, and 2) is guaranteed to be compiled to native code by an optimizing compiler when deployed. Add some basic APIs, and we could have a situation that has heretofore has been enjoyed pretty much only by x86 - the ability to compile code, and run it 30 years later as is.

Re:WebAssembly’s post-MVP future by cm2187 on Tuesday October 23, 2018 @03:47AM (#18281503)
In what language can you just “compile 4 times” to target android, iOS, windows, linux, macos and any future platform?
Re:WebAssembly’s post-MVP future by kllrnohj on Tuesday October 23, 2018 @01:50PM (#18285658)
Literally all of them? Since you scope creaped to add macos to the list even though it doesn't exist in the server or mobile space you'll need to increase that to 5 compiles instead of 4, though.

But C, C++, Rust, Go, D, etc... all support compilation to those platforms. This is a really common thing to do.

Re:WebAssembly’s post-MVP future by chrisweekly on Tuesday October 23, 2018 @09:11AM (#18283032)
JavaScript.
Re:WebAssembly’s post-MVP future by tannhaeuser on Monday October 22, 2018 @07:48PM (#18279623)
In addition, WASM lacks bindings to the browser environment (or any API for that matter), as its original pitch was improving performance-critical code paths in browser apps; but like you said, it won't be able to reach native ARM ISA speeds nevertheless. At most, in a couple years, it could hope to do what JavaScript has been doing for over a decade. But the browser rendering model and WebGL will just be the same. And then you still have an upstream battle and hope Apple and Google will open their mobile platform APIs to WASM apps, and agree to a common standard which I don't see happening. I can't understand for the life of me what people are projecting into WASM. A new bytecode format for code delivered over the network doesn't solve any problem we're having that isn't solved much better using a native platform API/ABI.
Re:WebAssembly’s post-MVP future by fbender on Tuesday October 23, 2018 @02:24AM (#18281139)
I think nobody is saying WASM is better than a „native platform API/ABI“ at solving all problems. It‘s simply a (potentially) viable alternative for scenarios that are way more common than everyone thought at first. And in some situations, it‘s the only solution (e.g. you won‘t get native APIs on the Web).
Re:WebAssembly’s post-MVP future by auganov on Monday October 22, 2018 @03:07PM (#18277359)
That's actually why I'm pretty bullish on WASM. It could become everything Java/JVM has ever wanted to be.

Almost inevitably JS will have the best interop, with the great trend for javascriptization of everything WASM could find it's way into all sorts of environments (like the native apps you mentioned).

People are already looking into WASM VMs for blockchains https://www.parity.io/wasm-smart-contract-development/

Re:WebAssembly’s post-MVP future by beatgammit on Monday October 22, 2018 @03:17PM (#18277457)
One awesome thing about WebAssembly is that it makes a lot of sense as an extension language. Instead of building around the JVM or .NET to get access to languages on those platforms and instead of standardizing on one embedded language (Lua, Python or JavaScript), I can use anything that supports WebAssembly and double dip with that same ecosystem working in the browser. And that list of supported languages will only continue to grow since we finally have an alternative to compiling to JavaScript.

Now, I don't think it'll "take over" the way C has, but I also wouldn't be surprised to see it edging out other VMs in many contexts, like the Lua or Python VMs, which may end up porting to WebAssembly instead of trying to justify another dependency for your app.

I hope we'll finally get to the point where I can choose what language to use for a specific task based on the merits of the language instead of making the larger argument that it's worth getting it to work in our existing app.

Re:WebAssembly’s post-MVP future by robotblake on Monday October 22, 2018 @03:57PM (#18277856)
I work with some people who are working on Iodide [1] which is a Jupyter style notebook thing that runs entirely in the browser, they've already ported Python to WebAssembly [2][3] so you can use it as a language.

[1] https://iodide.io/ [2] https://github.com/iodide-project/pyodide [3] https://iodide.io/iodide-examples/python.html

Re:WebAssembly’s post-MVP future by beatgammit on Monday October 22, 2018 @07:19PM (#18279428)
Nice.

I've been watching efforts to port Lua to WebAssembly (the official VM looks simple enough, but luajit won't be easy) because I want to have an app that shares code with the browser, and it would be awesome to play with WebAssembly as the plugin system of choice on the backend.

I'm also super excited for nebulet[1], which is a micro-kernel experiment using WebAssembly in Ring 0, which is pretty neat.

I'm really excited to see where WebAssembly can go. I know many of these projects will peter out, but it's exciting nonetheless.

[1] https://github.com/nebulet/nebulet

Re:WebAssembly’s post-MVP future by robotblake on Tuesday October 23, 2018 @12:46AM (#18280793)
> I'm really excited to see where WebAssembly can go. I know many of these projects will peter out, but it's exciting nonetheless.

Absolutely. On the Lua front someone made a PoC to add Lua as a language for Iodide [1] using Fengari [2] which (while I haven't used it yet) definitely looks interesting. Hadn't heard of Nebulet before but will definitely be following it now. Cheers!

[1] https://groups.google.com/d/msg/iodide-dev/ahc4fg8_JLg/llkHS... [2] https://fengari.io/

Re:WebAssembly’s post-MVP future by lambda on Tuesday October 23, 2018 @10:47AM (#18283812)
> On the server side, it seems like docker format has already won. Maybe cpu architecture portability doesn't matter there and x86 is good enough?

Docker has won to a degree, though it still requires complex orchestration technologies like Kubernetes built on top of it, which are rapidly developing and not a particularly stable target.

> Although serverless and edge computing often use JavaScript.

Yes, this is where I see WASM really hold its own. Serverless and edge environments want to be able to have code running in a persistent process that is completely managed by the environment. Right now, they frequently offer just JS, or a couple of language runtime environments like Python as well; for serverless environments, you can generally load native modules if you want to, but its awkward, while edge environments will only run JS, though now they're starting to offer WASM.

It's the places where being able to run multiple tenants within a single process, without paying IPC and process isolation overheads, that make the overhead of WASM more likely to be worth it.

> On mobile this seems to depend on Apple and/or Google deciding to support WebAssembly for native apps, which seems unlikely.

I don't think it would be too unlikely for Google to support WASM for native apps. For one, it would allow them to do architecture independent apps without ART, on Fuchsia, for example. Right now, I think Dart + Flutter compiles to ARM code, but if they want to target a wider range of devices then platform independence could be important.

Re:WebAssembly’s post-MVP future by mr_toad on Monday October 22, 2018 @04:53PM (#18278397)
> Developers need laptops to run their development environment in.

Not strictly true. I spent a bit of time using Cloud 9 and found it to be quite a useable experience. It’s certainly very handy to be able to access a dev environment from web browser wherever you happen to be.

https://aws.amazon.com/cloud9/

Re:WebAssembly’s post-MVP future by FascinatedBox on Tuesday October 23, 2018 @02:23AM (#18281136)
c9 helped when I was back in college. The desktops there were locked down with preinstalled tools. c9 was better than what the college had, and I didn't have to worry about saving my work. Once I was home I could sync the changes.
Re:WebAssembly’s post-MVP future by AnIdiotOnTheNet on Monday October 22, 2018 @04:35PM (#18278246)
> Developers need laptops to run their development environment in.

I hear a lot of developers going on and on about laptops these days but I can't figure out why. Is working out of a coffee shop the norm now or something?

Re:WebAssembly’s post-MVP future by voltagex_ on Monday October 22, 2018 @11:44PM (#18280581)
I can't carry my desktop everywhere and I don't always want to be at home.
Re:WebAssembly’s post-MVP future by AnIdiotOnTheNet on Tuesday October 23, 2018 @07:38AM (#18282484)
Personally, I'd rather not take my work everywhere, but even then there's RDP. If you happen to spend a lot of time developing in locations without decent internet, then I guess a development laptop is a good idea.
Re:WebAssembly’s post-MVP future by pjmlp on Monday October 22, 2018 @06:00PM (#18278933)
We just get to work at the office on a docking station, at other company sites, on customer premises, home office and while traveling to customers.
Re:WebAssembly’s post-MVP future by cm2187 on Tuesday October 23, 2018 @03:43AM (#18281483)
Docker is hard to use. There is still space for a simple solution to implement cross platform.
Re:WebAssembly’s post-MVP future by lewisinc on Tuesday October 23, 2018 @11:40PM (#18289535)
There's a learning curve, sure. I don't know if it qualifies as "hard" though - once you've figured it out it doesn't exactly get _more_ complicated.

Well, unless you add Kubernetes on top of that... then yeah, it gets... complicated.

Re:WebAssembly’s post-MVP future by tachyonbeam on Monday October 22, 2018 @03:32PM (#18277606)
The biggest weakness of WASM IMO is that it doesn't have its own standard library. It relies on the HTML DOM. This is an awkward, overcomplicated API that tends to differ between browsers, and worst of all, changes all the time. Because of this, WASM will likely remain a second-class citizen in the browser. It will also keep suffering of the problem of code constantly breaking when the DOM changes.
Re:WebAssembly’s post-MVP future by goatlover on Monday October 22, 2018 @04:50PM (#18278375)
Wasm apps can just target canvas if they don't want to deal with the DOM. That's what they've been doing, since DOM access has been reliant on using JS.
Re:WebAssembly’s post-MVP future by otabdeveloper1 on Tuesday October 23, 2018 @04:29AM (#18281718)
> On the server side, it seems like docker format has already won.

No.

Re:WebAssembly’s post-MVP future by eksemplar on Monday October 22, 2018 @02:54PM (#18277242)
I’m not impressed by wasm yet. One of the reasons JS is so good is because it can manipulate data without doing a full page reload, and wasm will do that, but another important reason is how productive modern JS is.

I’m not a UXer, never was, and I moved into management long before programs even got pretty so I’ve never even had to pick up.

Yet I can make a pretty web application with vue with minimal efforts. Add stuff like graphql, and wasm looks so ridiculously old aged before it’s even born.

Of course that kind of defeatist attitude is silly, and I’m looking forward to see where wasm goes in the coming years, because if people just gave up, I wouldn’t have been able to make a pretty app in vue either.

Re:WebAssembly’s post-MVP future by goatlover on Monday October 22, 2018 @03:03PM (#18277331)
Wasm isn't really for pretty apps you can quickly make in Vue. It's more for those heavy duty apps, games or libraries that most people run natively because of performance and because they're written in languages like C++, Rust, or even Fortran (scientific computing libraries).

Also, JS isn't the best tool for all programs, and programmers would like more of a choice when it comes to things that are more than just your standard web app.

Re:WebAssembly’s post-MVP future by marcosdumay on Monday October 22, 2018 @03:30PM (#18277589)
> Wasm isn't really for pretty apps you can quickly make in Vue.

Why not? Developing pretty apps in Vue (or anything in JS-land) is an horrible experience, why shouldn't we use WASM to port some better environment into there?

Re:WebAssembly’s post-MVP future by bolb on Monday October 22, 2018 @04:40PM (#18278282)
There are programmers who haven’t worked with anything but the HTML+JS+CSS ecosystem, especially on the front-end. Lots of sunk costs there.

Presenting WASM as a threat will lead to it facing stiff resistance from entrenched interests (amazing that people in their 20s and 30s are entrenched interests, but that’s modern front-end development).

A more gradual, evolutionary, low-hype approach seems prudent, as the platform matures and until/if someone makes the “killer app”.

Re:WebAssembly’s post-MVP future by goatlover on Monday October 22, 2018 @04:48PM (#18278350)
Yeah, look at what happened to Dart in the browser, which is a shame.
Re:WebAssembly’s post-MVP future by eksemplar on Tuesday October 23, 2018 @01:44AM (#18280985)
I don’t think it’s horrible, could you point me to something better?

We used to work with, first WPF then web forms and later MVC with razor, and we very quickly bought Telerik because the standard UI components in .Net are horrible.

Aside from that I’ve worked with JAVA I can’t recall what we used before FX but both were terrible.

In the JS CSS environment I can literally make an interface that doesn’t look like ass by simply using the standard setup in a front end with very few lines of code.

I guess a think like Blazor.net might make wasm competitive, but unlike JS, that requires Microsoft not to drop it in a year because they don’t have the OS movement JS does.

I understand why people dislike the package he’ll of modern JS, but so far, it’s proven itself to be just as trustworthy as any curated library.

On the other hand you’re not tied down in JS. When Microsoft made entity they wanted people to use it, even though it’s fucking awful. In JS you can very easily replace a component if something better comes along. That’s a great strength.

Graphql has been really instrumental for us for instance. We operate apps in low connective environments, so being able to only transfer what is needed is really great.

Graphql isn’t JS only, but it takes very little time and effort to setup an Apollo, graphql and vue app, and it’s got very few issues. The .Net integration of graphql is still a 3rd party library that doesn’t really work that well and isn’t easy to use.

That’s the thing with JS, it’s just really productive in the real world.

Blazor.net looks really productive, but it’s only productive when you don’t need it to do something Microsoft hasn’t thought of, and it’s the only WASM integration that I’ve seen that is even remotely competitive with JS.

Re:WebAssembly’s post-MVP future by marcosdumay on Tuesday October 23, 2018 @12:26PM (#18284790)
I don't really see a need of replacing the DOM. It has some problems, but nearly everything around has at least as many problems, just different ones. Indeed, that's the reason I want to see WASM interact well with it.

The largest problems of the web programming are lack of componentization and Javascript, we may be able to solve that last one soon!

The thing with JS is that it is a no batteries, no novelty, no shortcut, not very productive language, that manages to be both old-school and novel on all the bad ways. You can't just carelessly gather code and use it, because there are no safety boundaries; most code that is not at the frontend (yeah, like Apollo) have no consideration about security, so you can't simply expose it; the entire ecosystem is a house of cards; and the language itself is a pile of WTFs just waiting for you to discover another one.

Besides, the web stack is pretty much controlled by Google nowadays. Yes, they manage development resources better than Microsoft, but I would prefer working on a stable and free environment.

Re:WebAssembly’s post-MVP future by edflsafoiewq on Monday October 22, 2018 @05:23PM (#18278659)
If there's some better environment to be found in non-JS-land, why is Electron and its ilk so popular?
Re:WebAssembly’s post-MVP future by discreteevent on Monday October 22, 2018 @06:08PM (#18278983)
"better environment" - worse is better. Its explained in the comment above you about entrenched interests. Whether js and html are worse in the browser is one thing but I think you could argue strongly that they are worse on the desktop. As a user, the experience for me is pretty bad.
Re:WebAssembly’s post-MVP future by eksemplar on Tuesday October 23, 2018 @01:28AM (#18280923)
Is electron really worse though? I use VS and VSC professionally and VSC is the best ide I’ve ever used.

VS is great too, but it’s performance is really, really, terrible when your documents and settings directory is on one network drive and your codebase is on another. Not exactly VS’s fault, but it’s an ide for enterprise that can’t function with the most basic enterprise drive setup?

VSC, the electron app on the other hand doesn’t give two shits.

People usually tell me VSC is the one off unicorn. But isn’t discord better than team speak and ventrilo? Isn’t slack excellent?

I don’t think sunk cost is a negative when people are building better tools with it.

Re:WebAssembly’s post-MVP future by pseudalopex on Tuesday October 23, 2018 @01:45AM (#18280990)
Electron is popular among developers who mainly know JavaScript. It's popular when someone already has a web app or has to build one anyway. It's popular among people who think it's better for their app to look the same on every platform than to integrate well. It seems to be pretty unpopular among people who have experience writing native apps.
Re:WebAssembly’s post-MVP future by int_19h on Monday October 22, 2018 @10:14PM (#18280257)
Because all the better environments are not sufficiently portable.

That said, even then, I'll take Qt over Electron any day of the week.

Re:WebAssembly’s post-MVP future by edflsafoiewq on Tuesday October 23, 2018 @12:00AM (#18280627)
If they're not even portable between established systems, how are we going to port them to a comparatively exotic wasm+DOM target?
Re:WebAssembly’s post-MVP future by pjmlp on Tuesday October 23, 2018 @02:57AM (#18281288)
Re:WebAssembly’s post-MVP future by edflsafoiewq on Tuesday October 23, 2018 @03:11AM (#18281355)
Wasm+canvas is an easier target but even if it gets us to the same difficulty as normal desktop targets, portability between normal targets is already a problem.

My reaction to using the canvas instead of the DOM is very, very, very negative by the way. Webpages with fake text that is actually pixels rendered to a canvas are currently mostly restricted to dystopian notions of either the end result of the ad-blocker arms race or else extreme anti-copying measures.

Re:WebAssembly’s post-MVP future by pjmlp on Tuesday October 23, 2018 @03:15AM (#18281375)
Basically it is Flash all over again, just now it is built-in in the browser.
Re:WebAssembly’s post-MVP future by mcl7cdm on Wednesday October 24, 2018 @03:29AM (#18290367)
I think the world MUST start to make/tell the difference between (web)apps and web pages. Slack does not need to be written in js/html. Skype does not need to be written in js/html. They do those in electron just to avoid having to maintain X different code bases.
Re:WebAssembly’s post-MVP future by pjmlp on Monday October 22, 2018 @06:21PM (#18279079)
Because many don't know any better.
Re:WebAssembly’s post-MVP future by wild_preference on Monday October 22, 2018 @07:23PM (#18279462)
Meh, the issue with Electron is performance. The actual dev environment is decent, like how trivial it is to bring your own abstractions like React. Being able to inspect element and use Chrome's debugger. Being able to use whatever text editor you want. Using a compile-to-JS language. etc.

I'm certainly not using Xcode + Cocoa + the MVC abstraction for iOS/macOS apps because it's the superior way to build software. It has its own warts, like the effort it takes to swap out MVC with some other pattern, or how it comes with no async abstractions -- you'll just be writing callback code like JS developers had to before the Promise.

It's tempting to unmask "ugh, JS developers" as a bunch of idiots, but I think you'd only be kidding yourself if you think your pet environment is some global optimum.

Re:WebAssembly’s post-MVP future by thrower123 on Monday October 22, 2018 @09:58PM (#18280194)
Every time I start doing anything moderately complicated in JS, I rage at how much more difficult it is compared to slamming together a UI in .NET.
Re:WebAssembly’s post-MVP future by eksemplar on Tuesday October 23, 2018 @01:31AM (#18280935)
Really because WPF, web forms or razor all seem very inferior to me than VUE or react.

Hell when we were still building interfaces in .Net we paid a subscription to use Telerik on the frontend because the standard .net stuff is absolutely terrible.

Re:WebAssembly’s post-MVP future by pjmlp on Tuesday October 23, 2018 @02:58AM (#18281302)
Where is Blend for Vue or React?

I never used Telerik, and we only bought ComponentOne once for a Windows Forms project, started before WPF even existed.

Re:WebAssembly’s post-MVP future by voltagex_ on Monday October 22, 2018 @11:45PM (#18280586)
WinForms or WPF? I can throw together a (terrible) HTML page faster than I can remember how MVVM is meant to work.
Re:WebAssembly’s post-MVP future by thrower123 on Tuesday October 23, 2018 @07:16AM (#18282374)
I'm a lover of WinForms, since I cut my teeth on VB6 and MFC... it's surprising how decent you can make things look with a little polishing.

It's nuts that visual layout editors for the web have, if anything, regressed from the WebForms editor in Visual Studio 2008.

Re:WebAssembly’s post-MVP future by pjmlp on Tuesday October 23, 2018 @03:01AM (#18281315)
MVVM is meant to work the same way as Angular bindings work.

In any case you aren't obliged to use MVVM in WPF, it is just a best practice for easier unit testing and composability. Then again Web Components are only now starting to be a thing.

Re:WebAssembly’s post-MVP future by pjmlp on Tuesday October 23, 2018 @01:33AM (#18280948)
I do native across multiple platforms and Web, being coding since the mid-80's, so the experience is not constrained to a single pet.
Re:WebAssembly’s post-MVP future by marcosdumay on Tuesday October 23, 2018 @11:17AM (#18284067)
Because JS runs on the browser, so anything else is less portable.
Re:WebAssembly’s post-MVP future by ergothus on Monday October 22, 2018 @03:08PM (#18277373)
> another important reason is how productive modern JS is

Some people will argue on this, but I'm actually in agreement.

That said, it is important to realize WHY the JS productivity is so important: We're iterating a LOT. Web is so young, web interfaces are so young, the problems we are trying to solve on web are ever changing, and the devices we use to interface with web are changing almost as fast. We have to iterate again and again to be decent at the problem we're trying to solve only to toss it aside in favor of the new problem.

Some of this is wasteful, some of this is just part of being part of a big technological change. (I'm sure TV, radio, fax, printers, copiers, etc all had similar iterations, albeit at not quite the same speeds). But regardless of the "if we should" aspect, it's important to note that the current JS needs are both (1) currently real - trying to adopt some philosophically "pure" tenet in the defiance of these needs will fail and (2) not necessarily permanent - We can extrapolate into the near future from this, but I'm hard pressed to say much about more than 2 years in the future.

> Add stuff like graphql

Funny, I thought about graphql when the article mentioned HTTP caches, since graphQL _can't_ make use of that (most graphQL implementations use non-GET for everything, so you have to rely on server-side or client-app caching, since you can't rely on the network or browser) and took it as a hit on graphQL, not wasm.

That said, I'm interested to see where wasm goes - short term, we're in agreement that anyone expecting it to be the "Js-killer" is missing the mark, but long term I don't expect it to be dead-on-arrival, just used for not-what-was-expected.

Re:WebAssembly’s post-MVP future by pjmlp on Tuesday October 23, 2018 @03:02AM (#18281321)
I was iterating a lot with Smalltalk, Caml Light, Prolog, Oberon, Delphi and C++ Builder during the 90's.
Re:WebAssembly’s post-MVP future by rifung on Monday October 22, 2018 @03:14PM (#18277429)
I'm not really sure wasm is meant to compete with JS like that though?

To me the main benefits of wasm are that you can * make web pages with languages besides JS * do lower level things not possible with JS (low latency real time games?)

If you already know JS well and want to make a normal website I don't think you need WASM necessarily although it will enable those who don't know JS or want to use JS to make them too.

Re:WebAssembly’s post-MVP future by tyingq on Monday October 22, 2018 @04:07PM (#18277984)
Once they add GC, threads, polymorphic inline cache, and some sort of stdlib, it will be possible to have popular scripting languages run in the browser without the current problems of download size for the runtime and performance.

So, it may not be completely intentional, but WASM does have roadmap items that may end up competing with JS. WASM starts to look more like a general purpose VM over time.

Re:WebAssembly’s post-MVP future by vvanders on Monday October 22, 2018 @02:56PM (#18277272)
On the other side I see huge potential for WASM because all the things I worked with in C/C++/Rust that required a client-side install are now available to me on the browser.

Stuff like UnrealEngine running in browser, low-latency audio processing, etc. Lots of potentially cool solutions where you need strong control over allocations and memory placement.

Re:WebAssembly’s post-MVP future by vardump on Tuesday October 23, 2018 @03:21AM (#18281404)
> I’m not impressed by wasm yet. One of the reasons JS is so good is because it can manipulate data without doing a full page reload, and wasm will do that, but another important reason is how productive modern JS is.

You don't need a jet engine to make paper airplanes. Gluing jet engines to paper airplanes would indeed be counterproductive.

> and wasm looks so ridiculously old aged before it’s even born.

Wasm is about achieving near native level performance. For libraries and such. Stuff that your pretty high level js frameworks might use.