News for hackers. Stuff that matters.
Re:Bash functions are better than I thought by raziel2p on Sunday October 31, 2021 @06:26PM (#29061071)
> things are going to change with the introduction of wasm

people have been saying this for years already and nothing seems to have come of it :(

Re:Bash functions are better than I thought by heavyset_go on Sunday October 31, 2021 @07:54PM (#29061646)
I've seen some pretty interesting things like the use of Rust for front end development, like yew[1] and Seed[2].

There aren't many languages that are practical for WASM output. Scripting and managed languages need to ship their interpreters and runtimes with their WASM blobs, and can end up relatively large. JavaScript's interpreter and runtime are baked into every browser already.

That leaves only compiled and unmanaged languages for potentially good WASM targets. As mentioned before, Rust is seeing a lot development in that space. If LLVM can compile it, then Emscripten can output it to WASM.

[1] https://github.com/yewstack/yew

[2] https://github.com/seed-rs/seed

Re:Bash functions are better than I thought by hsn915 on Sunday October 31, 2021 @09:55PM (#29062341)
Are you sure nothing came of it?

Figma for example seems to be largely powered by WASM and the core of the product seems to be written in C++

https://www.figma.com/blog/webassembly-cut-figmas-load-time-...

https://www.figma.com/blog/building-a-professional-design-to...

I think the majority of web developers are just slow at catching up with this new things.

Re:Bash functions are better than I thought by steve_adams_86 on Sunday October 31, 2021 @07:37PM (#29061530)
Is that true though? Aren’t people using it for in-browser image and video editing? Doesn’t Google use it for drawing to Sheets and crunching numbers?

I thought that was the case but I can’t recall where I read it. If that’s not true then I should probably reconsider my thinking about wasm

Re:Bash functions are better than I thought by heavyset_go on Sunday October 31, 2021 @07:58PM (#29061673)
Yes, WASM is a good target for CPU bound number crunching. I'm not sure if it's used in Sheets, though.
Re:Bash functions are better than I thought by twox2 on Monday November 01, 2021 @11:35AM (#29068110)
Wasm isn't really going to change the front-end / browser side of javascript for the better, but it's great for graphics and anything else cpu intensive.
Re:Bash functions are better than I thought by copperx on Monday November 01, 2021 @12:39AM (#29063044)
WASM DOM manipulation will probably come soon, and that will place other languages in the exact same playing field as Javascript. For now, manipulating the DOM still requires calling Javascript.
Re:Bash functions are better than I thought by tambourine_man on Sunday October 31, 2021 @06:57PM (#29061288)
Yeah. Turns out, having an interpreted runtime in the browser is quite useful and sending bytecode across the wire not as practical.

We've been forgetting and relearning that for the past two decades.

Re:Bash functions are better than I thought by hsn915 on Sunday October 31, 2021 @09:48PM (#29062301)
"turns out"? How did it turn out so?

Actually it turns out that having an interpreted runtime causes a stream of endless problem. We keep try to patch them over but new problems keep coming up.

It turns out that a standarized low level byte code is the right way to ship cross platform applications. We already knew that. It just took a long time to go through the standarization process and be implemented by browsers.

If it seems like it's not in use today, it's largely because JavaScript has momentum and the majority of web programmers don't yet know how to take advantage of wasm (or maybe don't think they need it).

Re:Bash functions are better than I thought by tambourine_man on Monday November 01, 2021 @11:58AM (#29068495)
> It turns out that a standarized low level byte code is the right way to ship cross platform applications

So why hasn’t it taken over the world with Java and now with wasm?

> If it seems like it's not in use today, it's largely because JavaScript has momentum and the majority of web programmers don't yet know how to take advantage of wasm (or maybe don't think they need it).

There’s another possible reason. I’m sure you can come up with the answer yourself.

Re:Bash functions are better than I thought by hsn915 on Monday November 01, 2021 @08:55PM (#29075494)
Javascript never really had a chance to "take over the world" before Google released Chrome and the V8 engine. Before that it was just too slow.

Java applets really sucked. They took a long time to load and initialize. They all looked ugly (probably because of the default libraries?).

Also Java itself as a language was really bad and the development experience was awful. I want to say that no one wants to program in Java but in reality many people do (I don't understand those people).

The important lesson here is the implementation is more important than the idea.

Good idea with bad implementation -> goes no where.

wasm is not java.

The important quality about wasm is that it's not garbage collected. It's pretty close to just good old assembly.

Re:Bash functions are better than I thought by tambourine_man on Tuesday November 02, 2021 @12:34PM (#29083623)
>Javascript never really had a chance to "take over the world" before Google released Chrome and the V8 engine.

Chrome was released at the end of 2008, JavaScript was thriving way before that. We had Gmail since 2004, jQuery since 2006. WebApps were the “sweet solution” considered for iPhone apps at first in 2007. Chrome exists because of the healthy ecosystem that Firefox and Safari provided, not the other way around.

>It's pretty close to just good old assembly.

Precisely, and it's yet to be proven that's the best solution for the Web. I love it from the computer science perpective, but historically that idea hasn't struck a chord.