3 ms·
> The web had this before briefly. Back in the 90s and 00s, some people just wanted to use Flash. WebAssembly is different. WebAssembly brings every language t
by zfg 2y ago
> The web had this before briefly. Back in the 90s and 00s, some people just wanted to use Flash.
WebAssembly is different. WebAssembly brings every language to the web. Flash didn't.
WebAssembly can render to canvas and enable applications that compile to desktop, mobile, and the web. UI libraries like Avalonia do this: https://avaloniaui.net/ https://avaloniaui.net/
For example, here's C# implementation of Visual Basic 6 compiled to WebAssembly https://bandysc.github.io/AvaloniaVisualBasic6/ https://bandysc.github.io/AvaloniaVisualBasic6/ and source https://github.com/BAndysc/AvaloniaVisualBasic6 https://github.com/BAndysc/AvaloniaVisualBasic6
And a Solitaire demo https://solitaire.xaml.live/ https://solitaire.xaml.live/ and source https://github.com/AvaloniaUI/Solitaire https://github.com/AvaloniaUI/Solitaire
But WebAssembly applications can also manipulate the DOM like JavaScript. Example frameworks that do this:
- https://www.leptos.dev/ https://www.leptos.dev/
- https://dioxuslabs.com/ https://dioxuslabs.com/
- https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blaz...
DOM access goes via JavaScript glue code for now. Eventually WebAssembly will get direct DOM access.
You can decide if you're making more of an application or more of a webpage. If you're making more of an application then why not just render to canvas with WebAssembly? And if you're making more of a webpage then why not have WebAssembly manipulate the DOM instead of JavaScript?
And for non-web uses, WebAssembly can be used in a plugin framework such as Extism:
https://extism.org/ https://extism.org/
- incrudible 2y ago…and yet we still do not have the streamlined authoring experience we had with Flash. The stuff you show is just a crappier way to write boring GUIs with some other language for which you need to download the runtime. Flash let many more people create far more fun stuff than any Web standard ever did. People forget that Flash also brought C/C++ to the web at some point, but besides some flashy demos, nobody really cared. The problem is that all this choice creates fragmentation, you have dozens of platforms within a platform on top of another platform. Web APIs and Javascript may suck in many ways, but at least the are a common denominator.
- zfg 2y ago> and yet we still do not have the streamlined authoring experience we had with Flash. Uno for example has a visual designer: https://platform.uno/hot-design/ https://platform.uno/hot-design/ > The problem is that all this choice creates fragmentation That's not a problem. Build things the way you want in the language you want.
- noduerme 2y agoThis is a great point... the fragmentation and the steep learning curves for each stack (and constantly needing to be on top of breaking changes deeper in the stack) all amplify each other and make it much more difficult for amateur designers to build and ship something. Back in flash days, I knew lots of cartoonists and graphic artists who could build interactive experiences on their own that they wanted to put out there. That basically does not happen at all now. I'm pretty sure Flash (Stage3D) was also the first way to leverage a GPU on the web... for those of us who wanted to go a bit deeper...
- ReinoudL 2y agoSecond try: Hi noduerme, I'm the guy who wrote the original 'Kaos'. I stumbled upon the discussion about it, and have no idea how to contact you besides commenting here... Any way I can message you?
- JimDabell 2y ago> WebAssembly is different. WebAssembly brings every language to the web. Flash didn't. The problem with Flash was not that it only supported a single language. The problem with Flash is that it opted out of the web architecture because they only wanted your browser window to be a surface for an executable to draw into. > But WebAssembly applications can also manipulate the DOM like JavaScript. Flash could do that too. Virtually nobody bothered.
- zfg 2y ago> The problem with Flash is that it opted out of the web architecture WebAssembly doesn't. WebAssembly is part of the web's architecture. It has been for 8 years. You've doubtless run WebAssembly without even realizing it. Google Sheets for example uses WebAssembly: https://web.dev/case-studies/google-sheets-wasmgc https://web.dev/case-studies/google-sheets-wasmgc Amazon Prime Video uses WebAssembly: https://www.amazon.science/blog/how-prime-video-updates-its-app-for-more-than-8-000-device-types https://www.amazon.science/blog/how-prime-video-updates-its-... > Flash could do that too. Virtually nobody bothered. But virtually somebody is bothering with WebAssembly.
- JimDabell 2y agoI know how WebAssembly works. You don’t need to explain it to me. Take a look at the article. It’s specifically advocating for: > So throw out all the web standards. Make a browser that just runs WASM blobs, and gives them a surface to use And no, WebAssembly isn’t different. I just opened one of the examples you provided and tried to right-click to inspect element. Nothing happened. When I inspected the source a different way, all I found was an SVG for the logo and a JavaScript file to load the binary. When I inspected the DOM, all I found was a `<canvas>` the executable code draws into. This is exactly what I was complaining about: > The problem with Flash is that it opted out of the web architecture because they only wanted your browser window to be a surface for an executable to draw into.
- zfg 2y ago> And no, WebAssembly isn’t different. I just opened one of the examples you provided and tried to right-click to inspect element. Nothing happened. When I inspected the source a different way, all I found was an SVG for the logo and a JavaScript file to load the binary. When I inspected the DOM, all I found was a `<canvas>` the executable code draws into. What does that have to do with running the application? What user is going to inspect the elements of a web page? No end user will. Developers will, but that's got nothing to do with running the application. You can always go ahead and disassemble the .wasm file just like any other executable format. Here are some tools: https://github.com/WebAssembly/wabt https://github.com/WebAssembly/wabt If you're worried about understanding how an application works, remember that most of it is on the server side anyway. You won't have access to that. And if anything, WebAssembly puts more of it on the client side.
- Philpax 2y agoThe issue isn't the scripting language, it's having a common interface for users, especially for those who can't use standard browsers. Rendering the application yourself will break every accessibility tool that relies on being able to interact with a programmatic view of the website.
- pjmlp 2y agoWrong, Flash was in the process of doing exactly that. https://adobe-flash.github.io/crossbridge/ https://adobe-flash.github.io/crossbridge/ Before asm2js was even an idea, Unreal compiled to Flash via CrossBridge. https://www.youtube.com/watch?v=xzyCTt5KLKU https://www.youtube.com/watch?v=xzyCTt5KLKU https://www.youtube.com/watch?v=ZmZS7B1pLWg https://www.youtube.com/watch?v=ZmZS7B1pLWg To this day, with exception of maybe PlayCanvas, there are hardly any tools that can match the same developer experience for WebGL, almost 15 years later.
- zfg 2y ago> Wrong, Flash was in the process of doing exactly that. Except it didn't succeed at it. And Flash is long dead now. WebAssembly is here today and supports more languages than Flash ever did.
- pjmlp 2y agoBecause of Steve Jobs, followed by Chrome NaCL, superseded by PNaCL, that Mozzilla refused to adopt pushing asmjs instead, and having everyone to agree with WebAssembly, still a shadow of Flash developer tooling experience today. And for what, now that Firefox is mostly irrelevant and is Google for all practical purposes calling the shots on the Web and related standards. Don't mistake technical capabilities with political games.
- zfg 2y ago> Because of Steve Jobs If one man, on a whim, could destroy Flash then Flash deserved to die. > And for what For a royalty free platform that everyone is free to implement. No one wanted to be beholden to a proprietary platform they'd have to license from Adobe.
- pjmlp 2y agoThat man closed the Apple ecosystem doors on Flash, naturally he was not alone, he had an horde of followers. It remains to be seen how much royalty free Chrome remains, Web is now ChromeOS, with exception of a little Gaulish village called iOS.