16 ms·
Introduction to WebAssembly: why should we care?
- pjmlp 9y agoI am betting when WebAssembly gets mature all Web sites will look like Flash, just coded on the framework of choice, thus finally making the browser just yet another VM.
- MaxBarraclough 9y agoIn the process, specialised web browsers such as browsers for the blind, will be rendered useless.
- pjmlp 9y agoProbably, or will make use of whatever features the "native" frameworks might support. Gtk+ and WPF have very good support for people with disabilities.
- MaxBarraclough 9y agoWell sure, non-web platforms won't be affected by the self-destructive trend-chasing of the web. The harm to disabled users remains.
- tzahola 9y agoWebAudio-based client-side speech synthesizers are the solution! Finally the blind can pay their fair share too by listening to advertisements :^)
- Longhanks 9y agoWith all major browser JIT compiling JavaScript, aren't they already?
- pjmlp 9y agoNo, because it still is the pile of HTML, CSS and JavaScript hacks. With WebAssembly you can bypass all of it, and do your UI framework in GL, and everything else with native libraries compiled into WebAssembly.
- endless1234 9y agoWhy couldn't you do that now with canvas?
- pdkl95 9y agoYou can, theoretically, but it isn't practical because of the large amount of Javascript that would need to be downloaded and parsed. The WebAssembly's purpose is to remove that limitation, which is going to trash what's left of the open web. Get ready for lots of websites becoming un-adblockable, accessibility-hostile, "custom ui" trash.
- moron4hire 9y agoNeeding to download a large amount of JavaScript hasn't been a deterrent to anyone for anything yet. These arguments against WebAssembly are just FUD.
- pdkl95 9y ago> hasn't been a deterrent to anyone for anything yet This is patently incorrect. Javascript's impact on page load time is so widespread that Google introduced AMP to "enables the creation of websites and ads that are consistently fast ... and high-performing"[1]. [1] https://www.ampproject.org/ https://www.ampproject.org/
- moron4hire 9y agoGo look at any major site in the wild right now. They all download several MB of JS. Facebook is 1.8MB of JS out of 3.9MB. The BBC is 1.6MB out of 3.8MB. Kotaku is 2.6MB out of 7.5MB. CNN is 2.8MB out of 6.5MB. Hell, here's an article complaining about the size of websites that itself downloads almost 1MB of JS: https://gigaom.com/2014/12/29/the-overweight-web-average-web-page-size-is-up-15-in-2014/ https://gigaom.com/2014/12/29/the-overweight-web-average-web... I've written multiplayer VR experiences that run cross-platform through the browser that only clock in at 500KB of JS. You can put a LOT of code in a MB.
- baybal2 9y agoWASM is a three miles step back for the web, along with native DRM implementations. HTML5 was there to obsolete quirky flash/silverlight/java applets and tell people to not to confuse code and the content, now main "web ecosystem pushers" are doing everything to reincarnate Flash in a new embodiment as WASM
- sidlls 9y agoAnother terribly inefficient, klunky psuedo-VM, if the current trend is any indication. It's like 20 years ago all over again: it's Motif all over again, but dressed in different clothes.
- pecg 9y agoYou forgot about the lack of standarization in the pseudo-VM, each javascript engine supports a specific set of ECMAScript.
- AboutTheWhisles 9y agoWhat does webasm enable that would cause such a massive difference in how people create web pages? Everything it does could be done now with javascript or asm.js, all webasm does is enable the same things to run faster. I can't think of a single site that works like you are saying, yet webasm would only be a 2x-8x speedup over existing techniques.
- pjmlp 9y agoI guess you missed all those sites using Flash, Silverlight, Applets, WebStart, ClickOnce and many other plugins. WebAssembly on the long run will enable to bypass JavaScript and target the browser as if it is yet another OS.
- AboutTheWhisles 9y ago> I guess you missed all those sites using Flash, Silverlight, Applets, WebStart, ClickOnce and many other plugins. I did actually, because most aren't around any more. Even so, I was talking about sites that purely use the html canvas to draw. There is nothing preventing websites from being built like that right now, so I don't see how webasm will make much of a difference.
- ChicagoDave 9y agoYou're missing it... Web Assembly would allow devs to build apps without any html or javascript or css. The UI construct could be WPF/XAML or even WinForms like tech or something new. Scripting and CSS would be entirely unnecessary. A lot of businesses would love nothing better than to dump the Jedi-like skills of the scripting developers and trade that for mundane forms skills.
- krapp 9y agoyou appear to be missing the fact that there is no widespread desire by web developers or businesses to convert their webdev stack to an application development stack. HTML, javascript and CSS are easier than C, C++ or Rust. Writing a website in HTML/CSS/JS and updating a website in HTML/CSS/JS are vastly simpler than writing a graphical application then rewriting and recompiling it. As with Flash, WebAssembly will be implemented as fully integrated apps where it makes business sense, which will probably be a limited number of cases, such as graphics or media delivery. Everywhere else, it will either not be implemented at all, or be used alongside JS in the existing web.
- Endy 9y agoWe shouldn't. All the nonsense we're trying to cram into the Web is making it harder to justify connecting to it. I long for the days when simple images and text were the norm. Nowadays, I need to have and devote constant system resources to a tracking-blocker, cookie-blocker, an ad-blocker, a script-blocker, a separate javascript-blocker, and a who-knows-what-else-blocker, just to do the things I want to do; let alone the things I need to do.
- skohan 9y ago> I long for the days when simple images and text were the norm. The main issue with the web currently is that tools designed for the purpose of displaying simple images and text, plus a little interactivity, are being stretched to realize complex applications. Powerful on-demand applications on the web are a good thing, and it's a good thing that we're finally getting the tools to build them properly.
- pjmlp 9y agoWe already had them, WebAssembly adds little to Flash, Java applets, Oberon Juice, ActiveX, Silverlight, other than a format that makes all browser vendors happy. I can easily imagine that Adobe R&D already has a working WebAssembly prototype for Flash.
- anonyCowardOz 9y agowhat does WebAssembly mean For script-kiddies and malicious sites? I mean : with great power.....
- TomMarius 9y agoNothing. It can't do more than asm.js-compiled Javascript is able to do today.
- osrec 9y agoI know a lot of people long for the days when the web was just text and a few JPGs. I personally am waiting for the web to become a rich, ubiquitous, standardised application delivery platform that works on any device. I think web assembly adds to the richness while being fairly standardised, so I welcome it!
- _red 9y agoThese things are cyclical: * Early computers (1960-1980s): Dumb Terminal - Remote Server * Early PCs (1980s-1995): Local Processing - Remote Storage * WWW (1995-2010s): Dumb Terminal - Remote Server * JS/ASM/Etc (2010s - near future): Local Processing - Remote Storage Its fully possible that we will switch again to dumb terminal model. For instance, once the hassle of local code execution takes it toll, someone will have the bright idea of just putting the web browser itself in the cloud and just having a remote control connection to that browser....and the cycle will begin again.
- hood_syntax 9y agoYeah, if we want latency added to literally every action... I understand that what you're saying is a possibility, but I sure hope it doesn't come to pass.
- TheRealPomax 9y agoNew technology starts with the above-well-off, using tech you currency consider "absurdly unattaible to the masses" (like cars in the 20s, or telephone in the 40s, or computers in the 60s, or 24/7 internet in the 90s): for instance, when you just get a basically free gigabit connection straight into the backbone (like in a new upscale Japanese apartment building) the very idea that latency could even be a problem just... disappears. In that context, just attaching an interactive window to a remote running process (as long as it can stream faster than whatever is your minimum acceptable framerate at your minimum acceptable resolution) is literally indistinguishable from running locally. So I frankly do hope that comes to pass (as long as I also get to keep being able to build a desktop computer for working offline).
- GrumpyNl 9y agoFrom the site: The kind of binary format being considered for WebAssembly can be natively decoded much faster than JavaScript can be parsed (experiments show more than 20× faster). On mobile, large compiled codes can easily take 20–40 seconds just to parse, so native decoding (especially when combined with other techniques like streaming for better-than-gzip compression) is critical to providing a good cold-load user experience. – from the FAQ of WebAssembly If you build a website and have to parse something for 20-40 secs for a user, they should fire you on the spot for bad design. Start working for adult sites, if loads longer then 2 secs, redesign.
- umilegenio 9y agoYou are right only for the average website. If you are building applications delivered through the web, like games and advanced webmail, it can take a few seconds right now. With WebAssembly you could basically create all desktop applications on the web and it would be perfectly reasonable to take a few seconds to load one of them.
- dingo_bat 9y agoGmail takes around 5 seconds to load over a 100mbit connection. Seems to not have posed any problem for them.
- jokoon 9y agoThe toolchain feels pretty clumsy and bloated, there are many intermediary stages that should be done automatically. I hope better alternatives will quickly become available, or at least some package where you don't to install a thing inside the thing you already downloaded and installed.
- umilegenio 9y agoI agree. At the moment you can use WebAssembly, but it is not exactly user friendly. Effectively they have only build tools that can work inside other tools or as a part of an existing toolchain. However, the end game is to be able to load a WebAssembly module just like you load a JS script. So, we are going to get there, but it will take some time.
- emj 9y agoAgreed since the toolchain is aimed at automatic conversion of C/C++ applications to WebAssembly, emulating filesystems, graphics etc, that makes it feel sluggish for me. At this point I haven't seen many people using WebAssembly directly to develop for the web. Mostly it's people who write to a canvas. This game logic in Rust was a good example of at least some communication with javascript in a non bloated way: https://news.ycombinator.com/item?id=15843064 https://news.ycombinator.com/item?id=15843064 https://aochagavia.github.io/js/embedded-rocket.js https://aochagavia.github.io/js/embedded-rocket.js
- sjmulder 9y agoAgreed, back when I got the tooling up and running it generated a whole bunch of things to emulate stdio and such. I couldn't figure out how to make a freestanding wasm library. I wish I could just do `wasmcc -ofoo.wasm foo.c` and get a `foo.wasm` that I can include, without any implicit dependencies and such. Let me supply malloc if I call it. I'm sure there'd be libc-lite libraries in no time (if they aren't there already, I'm out of date).
- azakai 9y agoWhat felt clumsy or bloated to you in the toolchain? We'd love to improve it, specific feedback would be very helpful.
- aaron-lebo 9y agoI can't tell immediately, but is there anything that compiles WASM to something native? As in I'd like to write some WASM and then compile that to a shared library that a C program could load in.
- bschwindHN 9y agoJust write it in Rust and have the compiler emit wasm or a shared library.
- yipopov 9y agoWhy go from WASM to native? If you're using LLVM to get your WASM, just go directly to native, if other, find a native implementation of the language you're using.
- pmlnr 9y ago> In practical terms, WebAssembly is implemented by browsers’ developers on the back of the existing JavaScript engine. Isn't this contrary to the whole idea of wasm? EDIT: this is a completely serious question, I honestly don't understand why this is built into the existing JS engines instead of something separate.
- kiriakasis 9y agoIf I understood correctly the main reason was ease of implementation for a MVP. at this point webassembly run in a sorta VM with a security model added. the fact that wasm and JS share the interpreter should not have (ignoring bugs of the implementation, which is not trivial) a security effect
- Hasknewbie 9y agoWASM uses the current JS/VM environments to leverage its existing infrastructure (i.e. low-level abstraction and security). In practice it is a pre-optimized bytecode that only relies on JS primitives, so it does not need dynamic typing features or GC, i.e. the slowest and least safe parts of JS. Which means that anything compiled to WASM is "near-native" in terms of performance, making the use of a separate VM unnecessary.
- MistahKoala 9y agoFor non-dev idiots like me, what is it and why is it special? I got the impression that it allows compiled scripts to run in the browser and is faster than JavaScript.
- alex_duf 9y agoIt potentially allows any language (C, C++, Rust, .NET, heck in the future maybe Java, Scala or anything you want) to be run inside a webbrowser, at near native speed. Because any language would be compiled to this intermediate form (wasm) it would drastically simplify the distribution of complex applications. Because any language can be compiled to that form, you can potentially reuse your existing company's code to run it inside a webbrowser Because it's already integrated in web browsers, it means the technology deployment promise to be quick. Because it's just an intermediary form, you can use a typesafe language (Javascript isn't) and still use it at native speed rather than going through a step of conversion to javascript. It's still missing a few key things (garbage collection, interaction with the DOM) but I see that as being the new standard for pretty much anything. I can see that being used everywhere, from server side to client side, to mobile devices, why not hardware support (Is that possible?)
- cm2187 9y agoAnd it will pretty much allow to have a full app that bypasses the Apple/google app stores and their pay tolls/random policies.
- MistahKoala 9y agoSo, potentially, an OS could just be the browser and it would suffice for running apps like Android, iOS etc. already do?
- Fifer82 9y agoI am still a bit baffled. I am a TypeScript user and in the article he states: For instance, instead of compiling TypeScript to JavaScript, its developers could now compile to WebAssembly. Alright, so I don't need to be a C/C++ dude to get some WebAssembly goodness (maybe some day). But now with this in my toolbelt. What occurs? What does it mean? If I have a particle simulation in TypeScript on Canvas using Shaders... Now I compile to WebAssembly, but now what? Can I still access Canvas or is Canvas like a 4th dimension? IF I can't use Canvas, how do I render to screen?
- k__ 9y agoAs far as I know it's a bit like marshaling for JavaScript. In theory, you wouldn't have to parse JavaScript, when delivering WASM, which should lead to faster startup times.
- TazeTSchnitzel 9y agoYou're baffled because the author has no idea what they're talking about. TypeScript is a superset of JS, it makes no sense to compile it to a platform designed for AoT-compiled systems programming languages.
- Fifer82 9y agoSince TypeScript is a transpiler, couldn't it output a new "MyLittlePony Lang" for example and then WebAssembly from that?
- TazeTSchnitzel 9y agoIt could output whatever it likes, you can compile anything to anything.
- Shoothe 9y ago> ...the author has no idea what they're talking about. TypeScript is a superset of JS, it makes no sense to compile it to ... I agree with this. Mentioning compilation of TypeScript to WebAssembly shows some misunderstandings of both of these technologies. WebAssembly was designed to run code already written in some low level language like C/C++ because running already written software in a browser is easier than rewriting it. Of course you can compile Rust into WebAssembly but that was not a reason for why WebAssembly (and it's predecessors, asm.js, PNaCL) were conceived. On the other hand TypeScript makes JavaScript programming easier for when the app becomes too big to maintain without tooling.
- roknovosel 9y agoI recently made a small project with WebAssembly: https://github.com/novoselrok/color-palette-wasm https://github.com/novoselrok/color-palette-wasm The toolchain (emscripten) is still pretty bloated and I hope they will streamline the process somewhat.
- rekado 9y agoI'm worried that this will make the JavaScript trap[1] even more of a problem. The default operation of the web is to allow remote sites to push non-free applications to your browser that it then proceeds to execute. As people have been shifting towards running everything in the browser (just like people like me run everything in Emacs), this effectively results in a revival of ubiquitous proprietary software. I don't think this is desirable. Granted, we already have this problem with plain minified JavaScript, but as we shift more towards treating the web as a platform for which to compile software, this problem is going to become worse. I'd love for the web to be a set of stable application interfaces that in-browser applications can talk to. Give me the sources and I'll use my package manager to build the JavaScript applications I want my browser to execute for particular online services. I want more control over the increasingly complex software that we're expected to just execute blindly upon reception. [1]: https://www.gnu.org/philosophy/javascript-trap.html https://www.gnu.org/philosophy/javascript-trap.html
- Vinnl 9y agoThis is hardly inherent to Javascript/WebAssembly. Installed applications are binary code, i.e. closed by default unless you explicitly provide source code. The same holds true for web applications, however, for some reason we don't care about it being open source that much anymore...
- rekado 9y agoAdmittedly, I'm looking at this situation from within my comfortable bubble of a GNU system in which I only use software for which I have a source-to-binary mapping through GNU Guix. JavaScript applications are the exception in my environment and they threaten to burst that shiny bubble. Aside: I really think that the terms "open" and "closed" are imprecise and confusing, which is why I avoid them. With deterministic builds and free software I have a mapping from source to corresponding binary; so while the binary may not be directly editable (or "closed") it still is free software and I could edit the corresponding source to obtain a new binary. In my opinion the problem really is one of practical software freedom, which has never been achieved in a satisfying way for web applications.
- pdkl95 9y agoRemember that WebAssembly means no more ad blockers as soon as someone ports freetype. The behavior of a program written in a Turing complete language cannot be predicted without running the program[1]. Ad-blocking by regexp or DOM element doesn't help when the entire contents of the page - including the ads - is just a bunch of {canvas,WebGL} draw calls generated by a blob of obfuscated code. [1] https://en.wikipedia.org/wiki/Halting_problem https://en.wikipedia.org/wiki/Halting_problem
- hmmmmnm 9y agoHow is this any different to rendering to canvas or WebGL using minified and obfuscated Javascript? WebAssembly is just a more compact representation.
- c-cube 9y agoCurrently you can block many ads based on their url (which is from a third party provider). Using umatrix, ad and tracking is often clearly marked in red, and the corresponding js never even loaded. I don't think that would change with webasm?
- tzahola 9y agoWebsites will be obfuscated blobs downloaded from a single server.
- Normal_gaussian 9y agoThat's possible now. You can serve the ad so its indistinguishable from any other image. Redirect it and clicks through your server. Give it an obfuscated DOM path. Its just a hassle and can't be done with pasting a line of code
- yorwba 9y agoThe more important reason this isn't being done more often is that advertisers want to push their own code and make connections to their own servers in order to protect themselves against ad fraud, and because they want their own tracking data.
- JSONwebtoken 9y agoI haven't been able to find many examples of working WASM projects or experiments for a topic I have been hearing about for years, but here's one that seemed pretty well made: https://d2jta7o2zej4pf.cloudfront.net/ https://d2jta7o2zej4pf.cloudfront.net/ However it appears all the video editting effects render slower through WASM than JS, what's the deal?
- kabes 9y agoJS has been optimized to the extreme for years and years. Compilers that compile to WASM are still new so I'm guessing there's still a lot of room for optimization.
- deleted 9y ago[deleted]
- adriancooney 9y agoI feel like a really big point people gloss over when it comes to WebAssembly is browser support. It’ll be years before we can drop JavaScript (not that I want to) because we’ll be waiting for IE and friends to drop of the face of the planet. WebAssembly could act like a catalyst to propel the web forward or segment it even more. I’m leaning more towards the latter, at least for the next 7-10 years or so.
- dingo_bat 9y agoIE is already dead. Everybody non savvy has been force upgraded to windows 10 with edge and the savvy ones don't use IE.
- dbbk 9y agoMany sites can already afford to drop IE entirely. Frameworks such as Ember have dropped support for every version except 11. It is not going to take 7-10 years for you to be targeting evergreen browsers.
- charlysl 9y ago"Its development is backed by people at Mozilla, Microsoft, Google and Apple." It seems this is for real then? JS has had a surprisingly long life actually given its original use cases, and I understand the objections to wasm, but I guess that something like this was inevitable given how big the browser is as a platform and how web apps have been steadily fattening on the back of a suboptimal language, which, if this goes ahead, can be confined to just UI again. They are planning to add support for gc, threads, bigger mem, tail recursion, etc [1], so will it be running everything efficiently? Even on mobile, given its backers? Wow [1] https://github.com/WebAssembly/design/blob/master/FutureFeatures.md https://github.com/WebAssembly/design/blob/master/FutureFeat...
- steveklabnik 9y agoIt's probable you can already use it on mobile today. I have. https://caniuse.com/#feat=wasm https://caniuse.com/#feat=wasm
- AngeloAnolin 9y agoThe more I read about WebAssembly, the more I think it is the rebirth of Flash, or Silverlight, or JavaFX without being tied to a proprietary entity (Adobe, MS, Oracle). Will it be really good for the web in general? I guess it will depend on the motivation of those who would peruse the technology.
- Skinney 9y agoWhy? For almost everyone, it would be less work and give better results to just have a WebASM app render HTML. Except for "legacy" apps written in C++ and some native UI framework, why would anyone bypass using what is already there and works in a browser? It would be like writing an iOS or Android app by using C++ and bypassing the native UI toolkit.
- brunoc 9y ago> JavaScript has a bad reputation, but in reality is a good language for what is was designed for: quickly write small scripts. That's a little condescending, considering the amount of non-trivial, critical applications written in JavaScript. And it ignores the progress made on the language and tooling of the last oh i don't know, 20 years.
- sidlls 9y agoNon-trivial, sure. Critical? In what sense?
- brunoc 9y agoCritical for the survival of many businesses? Dealing with important data and processes? In that sense. Not in a system-critical kind of sense (kernels, etc). I mean I'm glad that when I call 911 the dispatching system probably isn't written in JavaScript, but it's likely that there's a web ui somewhere in there. Police cars too, run web applications on those touchscreens. I'm definitely aware of JS shortcomings, having had to deal with them for many years. I just found that particular quote to be a little snarky, and outdated.
- pecg 9y agoNode.js uses javascript as its default language interface, and considering it is software intended for server-side, with a userbase ranging from Microsoft, IBM, Netflix, Yahoo and Paypal (to name a few) in production environments, I would assert without doubt that it is in fact critical.
- feelin_googley 9y agoThere is no "war against Javascript" as the author suggests. It just happens to be the chosen language of the now insidious ad-driven corporate-sponsored web browser. It is not Javascript per se, but the so-called "modern" browser that creates problems for so many users. The problem is not even that this program exists. The problem is that users are coerced to use it and it is controlled by a third party that needs to sell something, either to advertisers or to users. Again, there is nothing inherently threatening about Javascript. There are many languages to choose from and anyone can choose not to use it. It is not tied to the web browser anymore. Unfortunately it is from that association that it gains a stigma like the one the author suggests with his "war on Javascript" comment. Today, there are a variety of standlone JS interpreters, of all sizes, and the language is routinely used outside of the browser. Peer-to-peer projects use it. Tiny interpreters for microcontrollers use it. Javascript can live on without the corporate web browser. The problem is the irrational assumption one must use a corporate sponsored web browser to do anything interesting with a computer. This program automatically runs code from "anonymous", commercial third parties, which today happens to be JS, using the user's computer resources. The user today does not get to choose the language, but more importantly, given the level of coercion and absence of alternatives, she does not get to choose whether or not to run the third party code.
- kbenson 9y ago> There is no "war against Javascript" as the author suggests. Well, there's my war on Javascript, that I wage in my head every time I have to use it. > Again, there is nothing inherently threatening about Javascript. Well, it's not inherent, but it exists. Javascript has (had, with WebAssembly) an inherent advantage in that even though you could compile to JavaScript, there was an inherent mismatch the farther your language semantics were from it. CoffeeScript is straightforward. Others are less straightforward. Rust requires a huge amount of runtime to be shipped even for WebAssembly. > It is not tied to the web browser anymore. So, the beachhead is secure, time to advance into the countryside, eh? ;)
- zeveb 9y ago> It is not Javascript per se, but the so-called "modern" browser that creates problems for so many users. I think that it's both-and, not either-or. JavaScript itself is a terrible, horrible, no-good language; the modern browser environment is also a terrible, horrible, no-good invasion of privacy and destruction of security. I do not believe that there is any purpose for which JavaScript is a suitable language (absent considerations of popularity, e.g. as on the web browser), although I could be wrong and am open to counterexamples.
- arnioxux 9y agoPeople should look at existing emscripten projects to see what the future will be like since compiling to asm.js is already pretty mature (just a bit slow and bloated as noted in the article). Any emscripten project can compile to WASM trivially by adding a `-s WASM=1` compilation flag. Example projects: - OCR (tesseract): http://tesseract.projectnaptha.com/ http://tesseract.projectnaptha.com/ - Computer vision (opencv): https://docs.opencv.org/master/d5/d10/tutorial_js_root.html https://docs.opencv.org/master/d5/d10/tutorial_js_root.html - Physics engines, retro games/emulators, entire operating systems, and many many more: https://github.com/kripken/emscripten/wiki/Porting-Examples-and-Demos https://github.com/kripken/emscripten/wiki/Porting-Examples-...
- brian-armstrong 9y agoI'll plug my emscripten project here too :) https://quiet.github.io/quiet-js https://quiet.github.io/quiet-js
- Animats 9y agoNow, more obfuscated than ever! Better DRM! A few more layers of bloat! Buffer overflows are back! Search for WebAssembly demos. There's a crappy tank game.[1] WebGL is doing all the real work; the game part is simple. There's ZenGarden.[2] 200MB download. Again, WebGL is doing all the real work. WebAssembly is going to be a way for sites to bypass ad blockers. That's the real use case. Maybe the only use case. It's all about reducing user power and giving total control to the big sites. [1] http://webassembly.org/demo/Tanks/ http://webassembly.org/demo/Tanks/ [2] https://s3.amazonaws.com/mozilla-games/ZenGarden/EpicZenGarden.html https://s3.amazonaws.com/mozilla-games/ZenGarden/EpicZenGard...
- jcelerier 9y agoIt's not always WebGL-y stuff. For instance Qt is working on a WASM compilation target: > https://msorvig.github.io/qt-webassembly-examples/widgets_wiggly/widgets_wiggly.html https://msorvig.github.io/qt-webassembly-examples/widgets_wi... cf. https://bugreports.qt.io/browse/QTBUG-63917 https://bugreports.qt.io/browse/QTBUG-63917 The WASM binaries are around 10 megabytes for this. That's a lot, for sure, but this includes a whole windowing system, a raster paint engine, and a C++ reflection mechanism.
- Animats 9y agothis includes a whole windowing system, a raster paint engine, and a C++ reflection mechanism All of which the browser already has.
- tardygrad 9y agoI doubt this will take off, because developers seem to prefer Javascript as a language. On the server where there is a choice of several languages both interpreted and compiled, Nodejs is still very popular. If there were a war against Javascript people would be moving away from Node. My guess is that this is going to be another niche, underutilised technology (like WebRTC or even SVG) that is efficient leads to highly optimised products, and but lacks mainstream usage.
- wcr3 9y agoplease see: http://brendaneich.github.io/Strange-Loop-2012/assets/images/yunhbc.png http://brendaneich.github.io/Strange-Loop-2012/assets/images... from: https://brendaneich.com/2015/06/from-asm-js-to-webassembly/ https://brendaneich.com/2015/06/from-asm-js-to-webassembly/ and tell me this isn't the best invention since the pinnacle of human achievement that is javascript.
- mvindahl 9y agoQuoting from the article: "It will make developing for the web easier and more efficient." Um .. no. It will make code execute faster but it will be more work to write and maintain. For most of the daily bread-and-butter code that we produce, speed is not awfully important but clarity is. In this equation, you gain a great advantage from stuff like garbage collection, functional programming, and a well equipped package manager, i.e. Javascript is a pretty good choice (and Typescript an even better choice). On the other hand, if you're writing very specialized algorithmic code which will be executed a very large amount of times, then WASM and fine tuning is in place. As cool a technology as WASM may be, a very small fraction of our code is like that. My prediction is that WASM will find its place, mainly within some of the more popular libraries available on npm. If there is anything to gain from rewriting, say, parts of ReactJS in WASM then it will eventually be done. But it will be totally transparent to the user of said library. Taking a view at the server side landscape is also instructive. There is a plethora of languages which execute faster than JS, yet nodeJS thrives. So it doesn't seem like people are eager to ditch JS. Hater's gonna hate, of course.