Live data from Hacker News

Pay attention to WebAssembly

harshal.sheth.io

211–220 of 251 posts

Re: Pay attention to WebAssembly

#211
post #30

> “Near-Native Performance”: Wasm is often described as having “near-native performance”. What this actually means is that WebAssembly is almost always faster than JavaScript, especially for compute-intensive workloads, and averages between 1.45 and 1.55 times slower than native code, but results do vary by runtime. Yeah, nah: https://github.com/zandaqo/iswasmfast JS is about 10x faster than wasm in simple linear reg…

I did some tests on my side (Rust WASM, quantum computing numerics) and was surprised that the WASM code is only 1-2x slower than native, depending on the browser. Since this code is at least NumPy-fast (a lot of optimizations purely for quantum operations), I don't believe that JS can do it 10x faster.

Your Benchmarks May Vary.

Re: Pay attention to WebAssembly

#212
just a stupid question: is it / will it be possible to use some language (python for instance) compiled to wasm to replace javascript for webpage scripting.

i'm not a full time web developer, but do sometimes some simple web apps with python flask for backend and html js for front end, sometimes w socketio for communication.

for my little use case it would be amazing to have the same language on both sides. i'm certainly missing something here, but i guess it's allowed to dream.

Re: Pay attention to WebAssembly

#213

Earlier quoted context omitted.

Thoughts on gaming’s role to play with WebAssembly..? My team and I are current working on Unreal Engine WASM support, with WebGPU integration on the way. Personally, I believe native games on the web is going to disrupt Steam and the app stores and enable a whole new distribution channel for developers, especially indies. No 30% cut, works on any device with a browser.

I don’t know. Nothing prevents indies from selling games directly to consumers right now — it’s not like it’s hard to integrate a payment processor to your website and an auto-updater to your software. WebAssembly only replaces the auto-updater part. The actual value that Steam adds is discovery and trust.

"WebAssembly only replaces the auto-updater part. "

No, it replaces the need to install something on your computer.

For trying out an unknown game, I rather have a sandboxed web application, than having to install something.

And most who think more in terms of convenience, will prefer the non install solution, too.

Installing new software is a big hurdle to many non technical people. I witnessed many children tears, because their parents did not wanted some game to potentially mess up their computers.

(and some games actually do that)

Re: Pay attention to WebAssembly

#214

just a stupid question: is it / will it be possible to use some language (python for instance) compiled to wasm to replace javascript for webpage scripting. i'm not a full time web developer, but do sometimes some simple web apps with python flask for backend and html js for front end, sometimes w socketio for communication. for my little use case it would be amazing to have the same language on both sides. i'm certa…

Not a stupid question. This has already been done for numerous languages. Your search terms are "X in the Web browser" and "X compiled to wasm".

Re: Pay attention to WebAssembly

#215
post #210
post #128

Earlier quoted context omitted.

FWIW I think GPU is fine as Webgl is the only api browser can use before Webgpu takes off.

I wonder why we don't get WebVulkan instead. Is it just because Apple Metal is insufficient to implement Vulkan on?

WebGPU is WebVulkan

Re: Pay attention to WebAssembly

#216

Hey, I'm Syrus From Wasmer [1]! I'm really happy to see more people bringing their attention to the Wasm ecosystem. There are tons of opportunities on this space. Regarding WAPM [2] and how its development had become a bit dormant, expect news about it soon. Can't wait to share what we have been working on! [1] https://wasmer.io [2] https://wapm.io

please consider raising the priority of no_std wasmer support. This is the biggest barrier for seeing wasm in some really cool areas, kernel, embedded, etc

Re: Pay attention to WebAssembly

#217
post #187

> Just as Docker could not replace virtual machines entirely I keep seeing this. Docker in no way replaces virtual machines. Can someone explain?

Previously: "We want to deploy apps as isolated units we can have variable amounts of instances of, so we make VM images and deploy them to AWS/our VMWare cluster/...". Now: "..., so we make Docker containers and deploy them to AWS/our Kubernetes cluster/...". Hence, Docker replaced virtual machines in a way .

Prebaked VMs, sure. That never seemed like something that was used that much to deliver software.

Re: Pay attention to WebAssembly

#218
5 years ago they told me I could write multi threaded web applications using C, C++ (or Rust).

Then they realized that web assembly could solve world peace and got to work on that.

Today I am still unable to create a div from a wasm compiled C application.

- yes, yes, I know interface types are cool and yes proposals take a while but please, I just want to write better web apps.

Given wasm will need to be imported as a script src and have a robust threading model before the dream of web applications competing with native applications for performance, I suspect I won't see it usable in my lifetime

Re: Pay attention to WebAssembly

#219
I'm afraid WASM is going to break the internet. There will be the real, now fully closed apps (silos, walled gardens, call them whatever you want) and the remnants of what the internet was, written in HTML, an observable, hackable text.

In the other hand... Java couldn't pull this off. Flash couldn't pull this off either. So we'll see.

Re: Pay attention to WebAssembly

#220
post #41

Earlier quoted context omitted.

WebAssembly itself is independent of the web or the browser. Therefore it is impossible for it to depend on Web Workers or SharedArrayBuffers. Rather it is the browser implementation of WASM (the embedder) that uses these technologies you seem to hate. Just think about it, you even mentioned serverless cloud apps. Are these cloud apps going to run inside a browser and therefore use Web Workers for threading? The answ…

> WebAssembly itself is independent of the web or the browser. Sure it is, but let me, a backend developer, ask a question: Why would I want to use WASM for anything running on my server, when I can just write it in Golang, and get actually native performance (not "near-native"), plus real GC, on top of an already thriving ecosystem of libraries and tools? And lets replace Golang with Rust, C, C++, or Java, or even w…

If you are building multi-tenant backend for i.e. SaaS app and you want to provide better isolation between your tenants (than relying on hardening, security/pen testing of your own code, or want to allow user/3rd party code to execute on your BE)
Post reply on HN