pouët.net

WebAssembly: The new platform the scene needs?

category: code [glöplog]
psenough: you seem to be seriously allergic to me.
added on the 2017-03-15 20:07:55 by tomkh tomkh
iq, tomkh and the rest of people bashing the sobel effect example: the purpose of the example is to demonstrate how can a coder implement webassembly in their projects, and in this scope it succeeds pretty well, and not to showcase how to do the most optimized sobel effect code out there. could it be better optimized? of course it could, but this is not the point of the example.
added on the 2017-03-15 21:39:50 by Defiance Defiance
Defiance: although this topic is getting really old now, the point was this sobel example code is just generally bad, and the fact is not optimized enough is really no biggy ;)
But anyway, it's just one small example in the whole project, which I actually after reading a bit more what they do, I consider to be pretty interesting and maybe actually moving things into a _good_ direction.

I even have some pet project that could greatly benefit from it, let's see how it will work out.
added on the 2017-03-15 22:52:00 by tomkh tomkh
tomkh: yes, roughly 80% of your contributions are trolling the point and deviating the discussion at hand, it's generally counter-productive, i wish you would fuck off or get with the program.
added on the 2017-03-16 02:28:02 by psenough psenough
pseoungh: yeah, whatever you say mr.troll-police. The fact is,however,that you interrupted LJ vs Gargaj heated,but rather civilized argument exchange,which was getting interesting at the point. And when others will keep bringing back really unimportant sobel filter issue,the topic will indeed derail.
added on the 2017-03-16 08:17:06 by tomkh tomkh
Quote:
for the record i agree the date functionality on js is wonky.


I have hard time understanding does this apply to WebAssembly or even JS as a language. You guys are discussing library space, which has nothing to do with core language features, such as memory model, supported primitive types (int32/int64), or even JS garbage collection or dynamic type resolution. Which is directly related to WebAssembly discussion.
So psenough: before you judge, maybe you should at least understand the topic yourself.
added on the 2017-03-16 10:45:50 by tomkh tomkh
This thread gave me luddite ebola :( Can we talk about WebAssembly again?

BB Image

It's experimental, a lot faster than JIT and easy to learn, why be a dick about it?
Quote:
luddite ebola


BB Image
added on the 2017-03-16 13:07:41 by skrebbel skrebbel
Quote:
@absence:
dynamic language ⊃ dynamic typing

You wrote about Javascript, which is dynamically typed. Splitting hairs without benefit only muddles the discussion.
added on the 2017-03-16 14:51:07 by absence absence
There is no hair splitting in stating that dynamic typing is just a (proper) subset of the traits javascript as a dynamic language offers.

Also how does a non-attributed pseudo quote benefit the discussion?
Dynamic typing is not at all about "The belief that you can't explain to a computer why your code works" but just about convenience. As far as I'm concerned I would prefer my typing to be static over dynamic all day long given that I gain the inherent benefits of it.
added on the 2017-03-16 15:27:16 by LJ LJ
Webassembly from the surface looks like a cool little thing but isn't it embarrassing that 22 years after the release of javascript there hasn't been a decent replacement available yet?

Is webassembly really the way to go in 2017? Loading pieces of compiled code with a js wrapper and execute it etc. I am unable to understand why no decent javascript alternative has come to light in the last 22 years. I know there is Dart which seems quite decent. Not sure why it isn't it adopted.
added on the 2017-03-16 15:38:32 by Rob Rob
Ok, LJ suggested it is first C++ only,but it is not intended to be replacement for anything. If all go according to the plan, you would be able to write in Dart or Rust or whatever you find superior to C++ and just use WebAssembly as a compiler target.
added on the 2017-03-16 15:59:15 by tomkh tomkh
Quote:
There is no hair splitting in stating that dynamic typing is just a (proper) subset of the traits javascript as a dynamic language offers.

Either way the fact wasn't relevant in the context.

Quote:
Also how does a non-attributed pseudo quote benefit the discussion?

What is a pseudo quote? I don't remember where the quote is from, but a web search will surely help if you're interested. As for benefit, it's a comment on the merits of Javascript, much like your own. They're both off topic. ;)
added on the 2017-03-16 16:31:22 by absence absence
@LJ: You stated earlier in the thread that dynamic languages offer the possibility to solve problems in more elegant ways than those offered by static languages. I'm not seeking to refute your claim or create an argument, but I would like to know what kinds of problems you have in mind. Can you give any examples that clearly demonstrate your point? Personally I have very little experience with dynamic languages, but a lot of experience with C++.
added on the 2017-03-17 13:02:30 by fizzer fizzer
Glad you asked, I wanted to do a more or less comprehensive write up of that anyway since quite some time now. Just give me a few days so I can provide some solid examples that drive the point home.

Just to be clear though when I said "dynamic languages have their own set of merits that allow very elegant solutions to problems you'd have a hard time solving(in an elegant way) in static languages" I did not mean to imply that it's "impossible" to solve them in static languages(that would be a paradox anyway), just that it would require a lot more effort on the side of the programmer to do so.
added on the 2017-03-18 04:21:02 by LJ LJ
Out of curiosity - how many of you guys are into writing Javascript games? I kind of had the idea that all demosceners were C/C++ people.....
bitnaughty: not games,but some commercial rendering project on my account,which was 4 years ago,when actually JS was the only option. That was the time I believe many C++ developers were forced to "touch" JS (if they liked it or not), but now,luckily we have alternatives. So I was very glad to switch back to C++ at some point. Also,disclaimer: I was never doing frontend stuff,where (I believe) JS is pretty natural/ok.
added on the 2017-03-18 15:28:30 by tomkh tomkh
tomkh: Um... actually I understood very little of what you said, could you please make it clear? (maybe you're not very good in English? but anyway, you seem to know enough to convey the basic point...)
"Commercial rendering" means? Do you mean you were in charge of a render farm? What does that have to do/how would that need, Javascript in any way?? And why was that the only option?
Why were C++ people *forced* to touch it, "whether they liked it or not"?? What is the compulsion towards Javascript?

What is it about it that you disliked? How do you mean "we have alternatives"??? If you want to do stuff for the browser, you HAVE to know it, it's the only language Mister Firefox understands (well, except Java, and if you count Flash, which according to just about everybody is dead/about to die). And if you DON'T do stuff for the browser, well, obviously, there's 10 million languages out there, I'm sure....?? :)
If you coded JS, I'm....er, sure you KNOW that??? :)

..and which are these "alternatives" you were talking about?

And frontend, as above, it's not "natural/OK", it's the Only Option. How is it that you actually *did* JS without knowing that?? How can a browser-maker put in > 1 lang into *1* browser?? WHYever would they do that??
Well, except NOW, with this WebAssembly stuff obviously, but that I guess you know since it's the point of this thread..... :)
* commercial rendering = rendering engine for commercial project in WebGL/JS

* we were forced to "touch" JS = we were focused on objective, which was to create 3d app that works in the browser without plugins at any cost

* alternatives at a time: aforementioned plugins (which includes Java and Flash really), or early translators like GWT

* esoteric alternatives: PNaCl (Chrome only), TypeScript (superset of JS), many hobby projects like LLJS, some C#->JS translators etc...

* alternatives today (besides WebAssembly): Emscripten (from C++ to pure JS or asm.js), Dart (also good for front-end I've heard, e.g. Angular Dart, but I didn't try)

Of course, in any case you need to wrap it up with some short JS code, but it's not really comparable to writing everything in JS.
added on the 2017-03-18 21:07:25 by tomkh tomkh
I think WASM is a step in the right direction for the web. If it can allow people to use a decent language (whatever it is) and decent tooling then that's a clear win imho.

What always amuses me about the JS ecosystem is that they were all railing against the complexity of "enterprise languages" but in the process they've made an ecosystem that is so absurdly convoluted and duct-tapey they seem to all be sitting in some kind of Stockholm Syndrome Echo Chamber enjoying the smell of their own farts.

Mozilla's good though. They're doing cool stuff.
added on the 2017-03-19 13:20:15 by sagacity sagacity
It would be so much nicer to replace JS wholesale with a VM that can be targetted by an LLVM translator. Isn't this kind of technology already existing in the browsers' JIT compilation functionality anyway? Java could have been a candidate but there are multiple reasons why that didn't work out.
added on the 2017-03-19 13:56:03 by fizzer fizzer
Quote:
* commercial rendering = rendering engine for commercial project in WebGL/JS

* we were forced to "touch" JS = we were focused on objective, which was to create 3d app that works in the browser without plugins at any cost

* alternatives at a time: aforementioned plugins (which includes Java and Flash really), or early translators like GWT

* esoteric alternatives: PNaCl (Chrome only), TypeScript (superset of JS), many hobby projects like LLJS, some C#->JS translators etc...

* alternatives today (besides WebAssembly): Emscripten (from C++ to pure JS or asm.js), Dart (also good for front-end I've heard, e.g. Angular Dart, but I didn't try)

Of course, in any case you need to wrap it up with some short JS code, but it's not really comparable to writing everything in JS.





OK, tomkh: - out of curiosity, what was this "3D app"? It wasn't a game? Sounds Interesting!... :)

* esoteric alternatives: OK, I'm not going to do anything "Chrome only", but what's PNaCl? Sounds Chemical! :) (always knew Sundar Pichai studied Metallurgy in college, not Chemistry! :) )
Typescript: heard of it, probably have a magazine article on it somewhere - what is it, exactly? Does it run in the browser? When you say "superset" - ummm..... if Mister Firefox understands only JS, how would a programmer write this Typescript and have their website work??!!!
And how is it better/how does it improve upon JS as a language?

* alternatives today : Lemme get this straight - Dart runs inside the browser???!!! Heard of it, didn't realise THIS...?!!!


Wow!...so.....which of all these did you learn, when you were doing all this 4 years back?? How long did it take you?? (considering you say you ultimately went *back* to C++...!!). And - was your 3d app successful? :) (if you can't talk about it, it's alright....)

Since you 're a experienced C guy n all - I'd like to ask you one question, just.... would you say structs in C are the same thing as object literals in Javascript?
bitnaughty: afaik all those alternatives (typescript and dart) are using transpilers. There was the effort to push "native" dart execution in chrome, this however never made it past a custom chrome build. PNaCl is abbreviation for "portable native client", its a path to compile NaCl applications in a portable manner, however NaCl is only supported in chrome and on its way to die.
added on the 2017-03-19 16:42:43 by LJ LJ
LJ: OK, I'd ask what stuff Dart has in it, but leaving aside that question - I guess Google's ultimate intention is to have (cool) websites that run only in Chrome...? Can they actually DO that??!! Doesn't that.....break the spirit of the internet or something...??!! Or doesn't it even encroach into Antritust territory??

login