Live data from Hacker News

Making WebAssembly a first-class language on the Web

hacks.mozilla.org

261–270 of 287 posts

Re: Making WebAssembly a first-class language on the Web

#261

Earlier quoted context omitted.

This is a nice conspiracy theory but doesn't match facts like Safari implementing the WebGPU standard at a faster pace than Firefox. Safari might not be great in some areas, but their WASM/WebGPU/WebAudio support is in pretty good shape.

Push Notifications, Web Bluetooth, Web NFC, User Idle Detection, the list goes on and on. Not even counting the hundreds of #wontfix bugs in their css engine. Its not a conspiracy theory if you recognize their incentives and consistent anti-consumer behavior for fucking decades.

> Web Bluetooth, Web NFC

These are things that literally everyone but Google thinks are terrible ideas.

Why don't you flip the conspiracy around and ask yourself why Google, the world's largest advertising agency and data hoover, wants browsers, a category dominated by Google, to have unmediated access to ever more user, system, and local network data?

Re: Making WebAssembly a first-class language on the Web

#262
post #190

Earlier quoted context omitted.

> The entire article boils down to one specific problem: string marshalling overhead No, I don't think so at all. 80% of the article is about other problems (JS bindings are complicated to generate and a leaky abstraction, additional tools beyond the compiler are required, compiler authors don't want to deal with them, they increase the friction for getting started, they're hard to debug, ...)

...all those problems should be fixed in the toolchains, not in the browser. Emscripten exists, DWARF debugging support exists and works (I can step from C/C++ code into JS code and back with the WASM DWARF debugging extension for VSCode), other language ecosystems just need to catch up.

You're implying the only solution to unnecessary friction is reams of unnecessary lubricant.

Someone had to spend time building those unnecessary toolchains. Imagine if this time were spent developing cool libraries or use cases for WASM, instead of building out plumbing.

Re: Making WebAssembly a first-class language on the Web

#263

Nothing can't be first-class as long as it is not *directly* replacing the existing first-class citizens. If Wasm modules can be loaded like this: ...and if Wasm could access the DOM like this: import dom, json, re, html, urllib.parse from datetime import datetime params = urllib.parse.urlencode({"category": "news", "limit": 10}) data = json.loads(await (await fetch(f"https://api.example.com/data?{params}")).string()…

The oldest story in tech standards; a play in three acts:

> "We've developed Foo 2.0. It does not have feature parity with Foo 1.0, but it's more architecturally elegant in ways that are meaningless to the public. It took ten thousand man hours and was done instead of much needed upgrades to Foo 1.0."

*one year later*

> "Why is no one adopting Foo 2.0? Yes, it doesn't have feature parity with Foo 1.0, but it's frankly irresponsible of the public not to understand that 2.0 is a higher number than 1.0."

*ten years later*

> "Remember Foo? What a mess. Thank god Bar came along."

*eleven years later*

> "Announcing Bar 2.0... "

Re: Making WebAssembly a first-class language on the Web

#264

Earlier quoted context omitted.

> but I don’t understand how #2 cross-lang interop could ever have been optional This problem hasn't been solved outside the web either (at least not to the satisfaction of Rust fanboys who expect that they can tunnel their high level stdlib types directly to other languages - while conveniently ignoring that other languages have completely different semantics and very little overlap with the Rust stdlib). At the cor…

The cross-language type-mapping problem is where every interop approach eventually runs aground. The component model's challenge is the same one that hit every bridge technology before it: whose type system is "canonical"? .NET's Common Type System was supposed to be the neutral ground for dozens of languages. In practice, it had strong C# biases — try using unsigned integers from VB or F#'s discriminated unions from…

Except you are missing the part that CLR has a type system designed specifically for cross language interop, and is taken into account on the design of WinRT as well.

Common Language Specification - https://simple.wikipedia.org/wiki/Common_Language_Specificat...

> The CLS was designed to be large enough to include the language constructs that are commonly needed by developers, yet small enough that most languages are able to support it. Any language construct that makes it impossible to quickly confirm the type safety of code was excluded from the CLS so that all languages that can work with CLS can produce verifiable code if they choose to do so.

WinRT Type System - https://learn.microsoft.com/en-us/uwp/winrt-cref/winrt-type-...

Re: Making WebAssembly a first-class language on the Web

#265

Earlier quoted context omitted.

This is a nice conspiracy theory but doesn't match facts like Safari implementing the WebGPU standard at a faster pace than Firefox. Safari might not be great in some areas, but their WASM/WebGPU/WebAudio support is in pretty good shape.

Push Notifications, Web Bluetooth, Web NFC, User Idle Detection, the list goes on and on. Not even counting the hundreds of #wontfix bugs in their css engine. Its not a conspiracy theory if you recognize their incentives and consistent anti-consumer behavior for fucking decades.

That is not Web, that is ChromeOS Platform, incredible how people complain about Google's taking over the Web, while pushing Electron crap and their Chrome APIs.

Re: Making WebAssembly a first-class language on the Web

#266
post #258

This was supposed to happen already in the 2000s. JVM in everywhere, especially in the browser. There was Java rings you could wear, Java Card VM (JCVM), Squawk VM, Java ME. "Java the language is almost irrelevant. It's the design of the Java Virtual Machine. And I've seen compilers for ML, compilers for Scheme, compilers for Ada, and they all work. Not many people use them, but it doesn't matter: they all work." --J…

The early 2000s were too early for that for Java. Before Java 6 in 2006 JVM wasn't a good target for dynamically typed languages. In Java 6 they added some support but it wasn't very efficient. In 2008 they started serious work on fixing this, and that work went into Java 7 in 2011. The .NET CLR on the other hand was designed from the start to be a good target for all types of language and was superior to JVM at this…

Before 2006 there was very little demand for dynamically typed languages. So it was not an issue.

Dynamic typing was even accepted thing for general purpose programming. It was just a curiosity. It's strange how mainstream programmers are always stuck into fads and superstition.

Re: Making WebAssembly a first-class language on the Web

#267
post #265

Earlier quoted context omitted.

Push Notifications, Web Bluetooth, Web NFC, User Idle Detection, the list goes on and on. Not even counting the hundreds of #wontfix bugs in their css engine. Its not a conspiracy theory if you recognize their incentives and consistent anti-consumer behavior for fucking decades.

That is not Web, that is ChromeOS Platform, incredible how people complain about Google's taking over the Web, while pushing Electron crap and their Chrome APIs.

[deleted]

Re: Making WebAssembly a first-class language on the Web

#268
post #261

Earlier quoted context omitted.

Push Notifications, Web Bluetooth, Web NFC, User Idle Detection, the list goes on and on. Not even counting the hundreds of #wontfix bugs in their css engine. Its not a conspiracy theory if you recognize their incentives and consistent anti-consumer behavior for fucking decades.

> Web Bluetooth, Web NFC These are things that literally everyone but Google thinks are terrible ideas. Why don't you flip the conspiracy around and ask yourself why Google, the world's largest advertising agency and data hoover, wants browsers, a category dominated by Google, to have unmediated access to ever more user, system, and local network data?

[deleted]

Re: Making WebAssembly a first-class language on the Web

#269
ActionScript, Emscripten, Dart, WebAssembly... All things that perform better and are often better to use than JavaScript (and TypeScript) and the dumb masses chose the crap we have now.

Let's face it. People benefit from complexity and poorly performing apps. Not just for the web, look at video game engines too.

When hardware gets faster and cheaper, people tend to say "meh" to quality and performance concerns. That part gets easier, but that's the slippery slope that introduces poor quality and complexity - especially when pressured top down by companies to go faster.

Basically the need for, forget about reward in, quality is completely removed.

So congratulations Internet. We have most web apps powered by a language spec dreamt up in a weekend. With patches on top of patches and abstraction on top of abstraction since.

It's been great job security of course... gatekeeping and all...but I don't know. I kinda hope AI does come and just replaces it all or something.

Man I wanted to use WebAssembly more. For Dart I made a Photoshop PSD to JPG converter that was super fast too. Much faster than any JavaScript image convert and resize was. Bummer.

Re: Making WebAssembly a first-class language on the Web

#270
post #261

Earlier quoted context omitted.

Push Notifications, Web Bluetooth, Web NFC, User Idle Detection, the list goes on and on. Not even counting the hundreds of #wontfix bugs in their css engine. Its not a conspiracy theory if you recognize their incentives and consistent anti-consumer behavior for fucking decades.

> Web Bluetooth, Web NFC These are things that literally everyone but Google thinks are terrible ideas. Why don't you flip the conspiracy around and ask yourself why Google, the world's largest advertising agency and data hoover, wants browsers, a category dominated by Google, to have unmediated access to ever more user, system, and local network data?

That's nonsense. There's plenty of people that want those APIs that don't work at Google. And it does not give Google "unmediated access" - you have to explicitly opt-in to allow the browser to use them when a website requests access to these APIs. But of course, don't let the facts get in the way of your fanboyism for Apple.
Post reply on HN