Hacker News new | past | comments | ask | show | jobs | submit login

If you don't care about transparency your web app will not be transparent today. It takes effort. Same can be said for Wasm-based projects.



Yes, but with WASM it will be non-transparent by default.


I don't understand why people always feel this is bad.

The times when people "hacked" the JS of the websites they visited are long gone, and for nearly all web applications (which is what WASM is useful for, as opposed to simple websites) the code is already completely unreadable (even if it were not minified, I mean, you would probably need to spend weeks understanding what it's doing for non-trivial stuff)... it's even illegal today to alter websites you visit to use "hidden" features, depending on your jurisdiction.

Besides, WASM is not going to displace JS, it will just give people an option to achieve things they couldn't with JS alone.


> The times when people "hacked" the JS of the websites they visited are long gone, and for nearly all web applications (which is what WASM is useful for, as opposed to simple websites) the code is already completely unreadable

This is an overly narrow and ungenerous interpretation of the criticism here. Frequently JS can be close to unreadable after minification (and even then, that's still only "frequently", "can", and "close"), but the anatomy of the page is as manipulable as it's ever been through standardized interfaces (DOM). Browser extensions and other features baked into browsers that depend on this ability to fiddle with or read e.g. form controls are ubiquitous. Flutter (or Flash) rendering a blob of pixels to a canvas destroys this. We'd never have gotten tabbed browsing or popout picture-in-picture videos with native playback controls or password managers or AdBlock Plus and uBlock Origin if executing opaque SWFs and Silverlight bundles were gating users' access to Web apps.

(Worth pointing out that there's nothing really "Web" about them at that point, either—only through a dubious transitive argument involving the fact that the thing they're executing in has traditionally been called a Web browser).


> This is an overly narrow and ungenerous interpretation of the criticism here.

What? No it's not. It seems to me you completely misunderstand WASM by saying "the anatomy of the page is as manipulable as it's ever been through standardized interfaces (DOM)" as that's clearly unchanged with WASM! WASM doesn't even have access to the DOM yet, so literally WASM uses the same JS code browser extensions do.


I think they're talking about replacing the DOM entirely with a canvas based renderer through WASM, as Flutter and other WASM based UI frameworks like Slint do.


In fact, there's a company thriving today on obfuscating JS. Recently, I've stumbled upon Jscrambler.

Though truly no software is obscure enough, given enough resources (time and money). All software is open source if you care to look hard!


> All software is open source if you care to look hard!

Not really, because open source has a definition and that definition refers to the form that the software was authored in.

In addition, there are homomorphic encryption methods which make it possible to completely obfuscate the SW function, practically speaking. You don't even have to go that far, just look at a typical LLM network.

(As an aside, I think it would be funny if someone implemented a game where Minecraft-like crafting functionality would be implemented through a one-way hash function. So no one could look up the recipes in the source code. Or an adventure game which would hash the input command and the world state to decode the resulting progress.)


> Not really, because open source has a definition and that definition refers to the form that the software was authored in.

Well, yeah I was referring to reverse engineering it.

> ...which make it possible to completely obfuscate the SW function, practically speaking.

"Practically speaking" is the keyword here. Given enough resources (time and money), anyone with enough skills can find out how any software works and re-implement it, even if the original source code is lost.

The main premise here is that the CPU has to be able to see the instructions to execute them. If the CPU can see them, I, as a reverse engineer, certainly can.

> (As an aside, I think it would be funny if someone implemented a game where Minecraft-like crafting functionality would be implemented through a one-way hash function. So no one could look up the recipes in the source code.)

I like the idea!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: