7 ms·
You can use wasm as a lingua franca between languages if you have some good libraries or programs that you want to share.
by 8lall0 7y ago
You can use wasm as a lingua franca between languages if you have some good libraries or programs that you want to share.
- jedisct1 7y agoLike... a shared library? I have a single libmysql.so file installed on my system, and it's used by Python, Ruby, C and PHP. Why should I replace libmysql.so with libmysql.wasm?
- chownie 7y agoBecause libmysql.wasm runs on any platform whereas libmysql.so has to be replaced with libmysql.dll on windows.
- pjmlp 7y agoJust like libmysql.dll, that libmysql.wasm will only run on Windows, if there is a Windows application that knows what to do with it.
- asdkhadsj 7y agoYea, that's generally how code works - no? This is simply an abstraction "everyone" has agreed on. Conceptually no different than if everyone had agreed on Java, or Python, or Brainfuck.
- pjmlp 7y agoExactly, and neither the first not the last at it.
- asdkhadsj 7y agoBut that's not a bad thing. To me it appears better than previous attempts, I heavily look forward to it. The HN drama around WASM and cries of the days of Java always leave me perplexed. Makes me wish Java didn't suck so bad so these convos could end haha.
- pjmlp 7y agoAll previous attempts, starting all way the back to UNCOL in 1958? WASM only exists due to political reasons of Mozilla not embracing PNaCL. If Chrome already had the current market share back then, we wouldn't be seeing such adoration, as if no one ever done it before.
- asdkhadsj 7y agoAnd if Java managed to get a hold we'd be asking why this is better than Java (which doesn't exist with these features in this manner). That's the point. It's seemingly good, and available. Why the pushback? I don't get your (or anyones) objections. > If Chrome already had the current market share back then, we wouldn't be seeing such adoration, as if no one ever done it before. I think you misunderstand the adoration. It's not as if this has never been done before. It's that this isn't done now. What else can I use? Nothing. I remember 10 years ago dying for a way to run Python in the browser and having no reasonable options for general web. Even now, what other option do I have? ASM.js is the only thing that comes to mind, which has significant downsides. It feels like the dislike/complaints are pointed in the wrong direction. If you're upset that this isn't Java (not that you are), complain about why Java can't be used right now like WASM can. Complain that Java didn't manage to hold favor 10 years ago.
- pjmlp 7y agoI complain about the adoration, like WASM was some kind of gift from God and everyone else that came before never existed. 10 years ago there were ways run Python in the browser. ActiveState used to have such plugin for example. Why do you think there is a language attribute on the <script> tag? And for some strange reason, the same ones that adore WASM, seem to only be aware of Java as bytecode format and nothing else.
- asdkhadsj 7y ago> 10 years ago there were ways run Python in the browser. ActiveState used to have such plugin for example. I didn't say it was impossible, but it's a massive stretch to compare WASM now and some hack that worked if you had the right plugins installed. Common dude, that's just disingenuous. edit: To think of it differently, I'm able to compile any language to run on any modern browser (which is most these days). I can even do it at my work, since we support Chrome. This was never possible before. I waited for years to run Python in browser without hacks or trickery. You're thinking I just oopses, missed that this was all possible before? Sigh.
- solidsnack9000 7y agoA shared library isn’t really shareable across OSes or platforms. The neat thing about a WASM library is you can load it in your browser, in your native app or in your Python script.
- pjmlp 7y agoJust like we used to do with Pascal P-Code interpreters back in the day.