Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

201–210 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#201

Earlier quoted context omitted.

Since Java relies on the JVM I think I'd avoid it, and any other languages that'd require running another VM on top of the WASM VM. Seems like useless stacking of technology that serves basically the same purpose. Not saying it wouldn't work and that it won't be done, but just seems kinda gross and missing-the-point. Personally I'd also avoid anything with a fatter runtime than maybe Go or C#. If it doesn't already,…

Thanks! I'm still thinking if I should need to learn a 'learning language' first (Java or Python) and then move on to a low-level language or go directly to C++. I've been on Linux for years and feel quite comfortable with it, BTW. Can C++ be learned/used on Linux?

> Can C++ be learned/used on Linux?

Very much yes. One of the reasons C++ is a very popular language is its portability. It compiles for most any platform.

C is kinda the "native" language of Linux, if there is such a thing, in that it's the language of its kernel and of maybe (guessing) 2/3 of the popular GUI desktop environments on it measured by usage, but C++ is also big and (another reason it's popular) interoperates very well with C.

C++ is a major language in use at Google (written under a highly restrictive style guide there, though), if that matters to you. It can be used to write modules and libraries for work on lots of other, higher-level platforms (iOS and Android, for example). It's huge to the point of nearly excluding all other players in serious video game development. It is likely to remain very relevant all over the software development field for quite a long time.

As far as a "learning language", if we're talking scripting languages I'd put Python and Javascript at the top of the list. Javascript's weird in some very un-useful ways (it is very much possible for a language to be weird in useful ways—Javascript mostly is not) but is the language of the Web, which is why it's so popular. Python's friendlier and saner despite a couple potentially-irritating quirks, and has one of the best library ecosystems around. It's a leading language in natural language processing and machine learning, mostly on the strength of that library ecosystem—much of which, as is the case with most scripting languages, is actually written in C++ or C under the hood, for performance reasons. It's also got a huge Web framework comparable to Ruby's Rails, in Django.

My considered opinion on Java is that unless you have a special need for it (Android development, for example) or intend to go all-in on the broader JVM ecosystem, it's better avoided. The strengths of the JVM diminish rapidly as one's needs and interests go beyond it—though it can do nearly anything you need, provided you accept that you'll be using some JVM-based solution to all your problems. Working in it just some of the time is kind of a pain, and it doesn't play as well with others as either traditional interpreted languages or non-VM compiled languages usually do.

If you're looking at learning a compiled, statically typed language I'd go for C, C++, or maybe—maybe—Rust these days.

My advice would be to learn how basic data structures and running programs are laid out in memory, how the stack works, and how things like method lookup tables are implemented, early on, no matter which language you're looking at, all of which are much simpler and less intimidating than one might think. It'll demystify and make obvious Object Oriented programming and recursion and some other things that can acquire an (absurd and extremely false) air of the magical in approaches that don't incorporate those things.

Re: WebAssembly becomes a W3C Recommendation

#202
post #92

Earlier quoted context omitted.

Ironically, GraalVM might end up being one of the better WASM VM: https://medium.com/graalvm/announcing-graalwasm-a-webassembl...

True, but GraalVM is based on the OpenJDK / OracleJDK JVM: "GraalVM Community Editions are based on OpenJDK version 1.8.0_232 and on OpenJDK version 11.0.5. GraalVM Enterprise Editions are based on Oracle Java version 1.8.0_231 and on Oracle Java version 11.0.5." Source: https://www.graalvm.org/docs/getting-started/ So, it's still the OpenJDK JVM underneath.

Yup, that's why I said ironically, because it might end up that the best non-web VM for WASM turns out to be the JVM

Though V8 is more likely to be what WASM first targets.

Re: WebAssembly becomes a W3C Recommendation

#203

Earlier quoted context omitted.

Since Java relies on the JVM I think I'd avoid it, and any other languages that'd require running another VM on top of the WASM VM. Seems like useless stacking of technology that serves basically the same purpose. Not saying it wouldn't work and that it won't be done, but just seems kinda gross and missing-the-point. Personally I'd also avoid anything with a fatter runtime than maybe Go or C#. If it doesn't already,…

Thanks! I'm still thinking if I should need to learn a 'learning language' first (Java or Python) and then move on to a low-level language or go directly to C++. I've been on Linux for years and feel quite comfortable with it, BTW. Can C++ be learned/used on Linux?

Just start coding. C++/Java/Python - whatever. The only real consideration you should have is picking something where the tool chain stays out of your way and works for you as opposed to you working for it.

Re: WebAssembly becomes a W3C Recommendation

#204
post #121
post #49

Earlier quoted context omitted.

America is not China.

Are you sure? For instance, they are two countries, whose names end with the letter "A"... dare I continue?

Can you please cut out the lower/boring segment of trolling? (like this and https://news.ycombinator.com/item?id=21804133)

Re: WebAssembly becomes a W3C Recommendation

#205
post #46
post #2

Why does the testimonial contains only Chinese company? I think it's really great but it would be better to have company from all around the world

Would I be reading this if it was only American companies?

No, because several different American companies would represent several differing viewpoints.

A bunch of Chinese companies is essentially the viewpoint of the current dictator of China, should he choose to weigh in.

Re: WebAssembly becomes a W3C Recommendation

#206
post #95

Earlier quoted context omitted.

WASM isn’t very practical yet because it isn’t fully formed. There isn’t support for DOM access or parallelism, never mind the ecosystem. It’s a really ambitious project, and writing it off as “locus of JS hate” because it hasn’t completely changed the game in such a short time frame is really short sighted. It would be a fairer test to give it 5 years.

I'm not writing it off. I think it's a good idea to bring more options to the web. I tried it last year, but as you state and I agree, it's not ready yet. In my experience in SF I encounter many never-JSers. Being a JS fan, for certain things, I don't get the hate. So maybe I feel threatened in a way, but I'm not going around wishing for the death of python or Haskell. That's all. I am reading random internet comment…

I think you get that with any language. People are very attached to how they’ve learned to solve problems and the set of tradeoffs they tend to value. I like Go and I can’t tell you how often I see even outlandish criticism (for a long time on r/programming, commenting “it is impossible to build a software product in Go because the type system is too weak” was a great way to get upvotes, especially if you followed it with “but I really like ”). You just have to try to understand which parts of the criticism are valid and improve your own understanding.

Re: WebAssembly becomes a W3C Recommendation

#207

Does anyone have any good success stories with WebAssembly in the actual context of using it on the web? That list of testimonials doesn't seem very inspiring as to whether or not the standard has seen actual production usage to justify being a recommended standard...

Good questions. WASM at this point seems more a locus of JS hate than anything practical. To create something cool, novel, and useful should be the goal, not avoid or use a certain language.

You’ll be happy next time you npm import something time sensitive that requires computation, and that you can just use from js for free.

Think about how you would do ML with just python. That’d be insane. And thankfully the packages you need are implemented in c or cuda with python bindings. 99% of ml people never see the insides of np, sklearn or tf. But you’re glad these aren’t implemented in python.

Similarly, you’re glad for webgl if you need to do lots of parallelizable computations (cfd, ml, 3d). But glsl was never bashing at js. Just that using js for these task isnt feasible.

Similarly, now you can use fast code from js. Essentially, you have a bunch of matrices use webgl, otherwise wasm. And orchestrate everything from js. Like ml peeps do with python, c and cuda.

For the better or the worse...

Re: WebAssembly becomes a W3C Recommendation

#208
post #190

Earlier quoted context omitted.

I don't think anyone is suggesting that WASM is the new way to write for the web, but I think it's certainly an aspiration that WASM will allow more languages to be used for everyday web development in addition to solving other more niche problems.

It has not been my perception that that's an aspiration or a goal of WASM, but there's much I haven't read. Can you point me to where this is stated as one of WASM's goals?

https://webassembly.org/docs/high-level-goals/

> 3. Design to execute within and integrate well with the existing Web platform:

> * execute in the same semantic universe as JavaScript

> * access browser functionality through the same Web APIs that are accessible to JavaScript

Lawyering aside, I would say that this is pretty much the same thing as "enabling the development in web apps in other languages".

Re: WebAssembly becomes a W3C Recommendation

#209

Does anyone have any good success stories with WebAssembly in the actual context of using it on the web? That list of testimonials doesn't seem very inspiring as to whether or not the standard has seen actual production usage to justify being a recommended standard...

www.figma.com is built on WebAssembly (C/C++ language) and written a great deal of content on blog

Re: WebAssembly becomes a W3C Recommendation

#210

Does anyone have any good success stories with WebAssembly in the actual context of using it on the web? That list of testimonials doesn't seem very inspiring as to whether or not the standard has seen actual production usage to justify being a recommended standard...

Not sure if this is what you’re looking for but I’m using it to embed SQLite in an app that’s both desktop (electron) and web-kinda-sorta. I say kinda-sorta because really what we’re doing is embed SQLite (and other dependencies) in an html page so our users can just open it straight up in a browser without having to be online or connected to any other systems, and still able to work (albeit read only for now.) The download time doesn’t matter to our users (and more often than not the file is loaded from a local file: url anyway) and the startup time is not spectacular but sub-second at most currently, so we’re happy so far.

Except for some noob mistakes when implementing the PoC it’s worked remarkably well, much better than I though it would.

Post reply on HN