Earlier quoted context omitted.
In the current proposal there is no way for WebAssembly to directly access the DOM (or any other "Web API" objects). Basically you will need to drop back down into javascript and handle that there (basically how asm.js does it now). But there is a proposal to eventually integrate direct DOM access into Web Assembly, but that's for after they get it up and running.
If they wanted to do it right, then an HTTP requests itself should serve a compiled HTML binary based on an AST. The binary version of HTML.
Compiling to WebAssembly: It’s Happening
101–110 of 225 posts
Re: Compiling to WebAssembly: It’s Happening
#102Earlier quoted context omitted.
The important use case is to allow people to write web applications with their language of choice, instead of horrible javascript. And get near full performance.
Sorry to say, but the web isn't about writing apps in the language of your choice. If it's beyond plain, passive HTML, it's about running applications on foreign hosts/resources without a well specified license to do so. Scripting languages provide both audible code and a small load as compared to binary object code (which is, why we had them on servers and clients in the first place). If we turn the web into an anyt…
It's not like a bunch of minified JS is going to be "quick" to go through.
Re: Compiling to WebAssembly: It’s Happening
#103Re: Compiling to WebAssembly: It’s Happening
#104Web assembly always makes me a little sad. It feels like we are going back to flash only it won't be bad this time, I promise, no really. I always feel like the most obvious use for it is to start writing truly hateful and abusive code. I'm sure this is because I'm getting old.
We will eventually come to terms with the fact that Flash was 15 years ahead of everything else on multiple fronts and we ought to have been just chastised the terrible developers doing awful and horrendous things with pretty technically sound software.
Re: Compiling to WebAssembly: It’s Happening
#105Earlier quoted context omitted.
The important use case is to allow people to write web applications with their language of choice, instead of horrible javascript. And get near full performance.
I can't believe people still bash JavaScript. I've used a lot of different languages including Java, C#, C++, AVR Assembly, Python and others but JavaScript is my favourite and I would not want to go back. I think its a shame that some people just didn't seriously try JavaScript. It's a very powerful, expressive language. Also, testing with JS is amazing - Especially unit testing on Node.js. It lets you do stuff like…
But I'll never understand who thought this asynchronous API was a good idea.
I just wanted to draw pictures in a canvas _in order_, because they should overlap. A common task you could mean. I ended up building a monadic builder for callback chains, that creates a javascript string that is evaled. I felt like this language and the api was incredibly cumbersome, minimalistic and limited. It lacks a blocking api, monad support, dsl support, macros and lazy evalution.
But mayme there is a simple solution to that, that I'm not aware of.
Re: Compiling to WebAssembly: It’s Happening
#106Earlier quoted context omitted.
The important use case is to allow people to write web applications with their language of choice, instead of horrible javascript. And get near full performance.
I can't believe people still bash JavaScript. I've used a lot of different languages including Java, C#, C++, AVR Assembly, Python and others but JavaScript is my favourite and I would not want to go back. I think its a shame that some people just didn't seriously try JavaScript. It's a very powerful, expressive language. Also, testing with JS is amazing - Especially unit testing on Node.js. It lets you do stuff like…
Re: Compiling to WebAssembly: It’s Happening
#107Earlier quoted context omitted.
If type safety is what you miss, why not to use some transpiler like TypeScript? http://www.typescriptlang.org/Tutorial
Then you're not writing JavaScript, which was OP's concern. TypeScript is fine (although Elm, Swift, and Haskell are more interesting, IMO).
Re: Compiling to WebAssembly: It’s Happening
#108Earlier quoted context omitted.
If type safety is what you miss, why not to use some transpiler like TypeScript? http://www.typescriptlang.org/Tutorial
Then you're not writing JavaScript, which was OP's concern. TypeScript is fine (although Elm, Swift, and Haskell are more interesting, IMO).
Re: Compiling to WebAssembly: It’s Happening
#109Earlier quoted context omitted.
What makes WebAssembly like Flash? Please elaborate. You already can't just read someone's JavaScript code if they're using a transpiler or uglify or something like that, it looks like line noise and you basically have to go through a lot of work to reverse engineer it. WebAssembly is no worse. The JavaScript environment on the web reminds me of the "walled gardens" that were Lisp machines back in the day, that force…
> What makes WebAssembly like Flash? Please elaborate. It's pretty straightforward. Both tend towards the Big Binary Blackbox Blob. It's true that WebAssembly has advantages Flash, Java, and Silverlight didn't really have in terms of being freely reimplimentable and (potentially) native to the browser. And it's probably a good thing that a browser can be a VM via a target-intended subset of JS. BBBB may be the right…
The benefits are not that great these days. At least not for people who don't support a web ad monetization model or have no interest in being on the VC boat to float model.
Re: Compiling to WebAssembly: It’s Happening
#110In the recent press tour about Swift, Apple seems to be really gung-ho about people using Swift everywhere. Since Swift is built on LLVM and there's direct LLVM support for WebAssembly, I wonder if Apple will get behind WebAssembly so they can get Swift in the browser.