pouët.net

WebAssembly: The new platform the scene needs?

category: code [glöplog]
bitnaughty:
TypeScript is transpiling to JS. You can try TypeScript playground, where you can see how your code is translated directly to JS.

Dart is not just transpiler. It has standalone VM that is interestingly, not even part of Chrome. They support transpiler option for cross-browser compatibility.

In general, every "complete" programming language can be translated to every other automatically. Although, usually, at the cost of some performance reduction. That is why, ultimately, so called language frontend is not really a very interesting topic. The hardest part of every compiler is optimizer. But to be fair, recently a lot of research is going on in the field of static/mandatory analysis during compilation, for example thanks to this, Rust offers greater memory management/pointer safety over C++.

For gentle introduction, try this article by Chris Lattner, one of the originators of LLVM project. It explains the concepts of language frontend or intermediate representation (IR). In this sense WebAssembly is yet another IR.

Nothing of this is really new, it just most Web developers are self-taught and never really had proper introduction to language and automata theory, complexity theory etc... Personally, I learned most of this stuff at the University and some of my own hobby VM/compiler/transpiler projects.

I'm also pretty far from a die-hard C++ fanboy, as there is really no reason to be the one. It's just C++ is so far the most reasonable front-end to the most mature compilers/optimizers in the industry. That situation may drastically change over the years (and hopefully will).

For the 3d app: it was fairly successful, but let just say competition was stronger. I don't want to say much, because I am not in the position to promote this product. The rules of big companies are usually straightforward here: only marketing department should promote stuff, otherwise it can only bring confusion to the users (with some exceptions over more technically oriented products).
added on the 2017-03-19 18:01:18 by tomkh tomkh
Hey wow, thanks! You're so helpful! - with links, and shit! Not like other people here....:)

You sound really,... educated - and this "gentle introduction" sounds like exactly what I need - once saw a demoscene seminar on compiler theory - Damned if I can remember a word of it now... :) THANKS! :)

So for C++ - does that mean you now do Javascript too? What do you do now? :)

3D app: But what WAS it? :) It was a 3D app, in JS/WebGL.. but it wasn't a game..sounds extremely interesting...? :)
Hey, let's move this conversation off of Pouet.... got an email? :)
Quote:

got an email? :)


I don't want to put you down on anything, you seem like a curious individual. However, I'm relatively busy + afraid of getting extra spam to share my e-mail here. Sorry about that.
added on the 2017-03-20 23:19:14 by tomkh tomkh
I would jump in immediately if it were more like the old c inline asm, allowing for optimized webasm code when needed:

Code: . . . var somejsthing = 128; webasm { ... optimized code ... } console.log("faster, cleaner, done by hand."); . . .


Oh well.
added on the 2017-05-06 16:00:04 by imerso imerso
*BUMP*

I've been playing with it for the last weeks, using Rust and this single line of javascript:
Quote:
import('./wasm2').catch(console.error)

I have a few polygons and shaders on the screen and other than the weird javascript APIs that clearly weren't designed for anything else other than javascript the experience has been positive.
My idea with it at the moment is to eventually use the same code to target both windows and wasm, but it's likely to change.
I'm not sure how relevant webassembly will be for the scene in the next years, but if it helps some people that don't want to touch javascript port OpenGL stuff to the web and make people watch more demos in real time instead of watching them in youtube I guess it's a good thing.
added on the 2019-02-05 20:51:46 by xernobyl xernobyl
It still seems immature to me, but I want to see it maturing and taking off.

Webasm might help many nice things to hit the masses (demos being one of them).

Unfortunately, most people will never be able to understand the difference between a real-time demo and a pre-recorded video. =(

(in a muchlinky similar way that some will never be able to understand the art/beauty of tiny home engines in contrast to behemoths as Unreal and Unity)
added on the 2019-02-06 00:27:54 by imerso imerso
Just to be more clear, I've nothing against Unity and Unreal -- I use both professionally to make money -- I just think that it sucks to use them to make demos.

Demos made with Unreal or Unity show me less soul than a 256 bytes random noise. Just me, ok, but I will die with my opinion. Hate me if you wish, I don't care.
added on the 2019-02-06 00:49:13 by imerso imerso

login