Live data from Hacker News

Sneak Peek at WebAssembly Studio

hacks.mozilla.org

51–60 of 103 posts

Re: Sneak Peek at WebAssembly Studio

#52

Earlier quoted context omitted.

> Or, easliy write different packages in different languages and combine them into one app. Just because the binary format can be shared doesn't mean code easily can. There's a tradeoff between requiring lots of glue or sharing a common lib across the langs. Either way, in WASM's current state, only the raw memory is shared and the only types are numeric primitives that can be used to address that memory. How each la…

In practice, most WASM languages are going to want good interop with JavaScript, so if nothing else is done, I expect that would become the standard for foreign functions, much like C FFI is on the desktop. For example, look at what Rust is doing [1]. For a new language targeting WASM, it might be nice to use JavaScript strings directly, without needing to convert them at the border? JavaScript strings aren't perfect…

> it might be nice to use JavaScript strings directly, without needing to convert them at the border?

JavaScript strings are UTF-16, which is incompatible with most languages. How the strings are stored internally as bytes is different for different browsers (e.g. optimisations for const strings, short strings, ascii only strings, string buffers).

The best you could get would be an API for a "string object".

Re: Sneak Peek at WebAssembly Studio

#53
post #42
post #34

Earlier quoted context omitted.

> You've clearly never tried to support more than one browser. Sure I do, all the way back to when CGIs were still a thing, that is what Web development is all about. It is no different than using any other programming language, graphical APIs, network API, or OS stacks backed up by standards. Anything else is just being lazy at user's expenses. Just imagine game developers shipping a GPU with their game just to be s…

> Just imagine game developers shipping a GPU with their game just to be sure it is the same OpenGL version. Electron apps aren't shipping you hardware. I think the more apt analogy would be installing a specific version of DirectX with your game... which a lot do. Ultimately, I'd rather a company/developer spend more time actually building a better interface/product rather than perpetually fixing browser compatibili…

The problem with Electron apps is that they can be done well, or they can be done poorly. And if they're done poorly, wow, may as well add cryptominer code for the drain on battery you're going to cause.

That isn't to say Electron is bad, quite the contrary, but it isn't a silver bullet either.

To your "do you think..." question, I think it is an aspect in their success. Gone are the days where someone could say "this site requires IE 6/IE 7/Firefox/Chrome/etc." and be successful. Going onto Facebook, I don't think the site looks great, but it functionally works in any browser I've come across in an expected manner. But if they'd require a native electron or otherwise app? Wouldn't use it (don't have Facebook or Messenger installed on my phone or tablet, I only check messages where allowed which is desktop and tablet web sites, everything else I use it for works fine in mobile/tablet/desktop).

Re: Sneak Peek at WebAssembly Studio

#60

WebAssembly Studio is a neat project, and I'm very impressed at the quality of tooling. It's just a shame that WebAssembly itself is a concept so deeply flawed in conception that it is unsalvagable, and that it'll hurt developers and users alike. Does opening the door to frontend development in C, Rust, Java, and the whole menagerie really seem like such a good idea? Consider the mess we've made with Javascript--the…

Would you care to add some information about why you feel this way?
Post reply on HN