News for hackers. Stuff that matters.
Re:Maybe you don't need Rust and WASM to speed up your JS by b0rsuk on Monday February 19, 2018 @03:53PM (#16415654)
I'm afraid it's easier to get started as a Javascript developer than a Rust developer. What if it's easier to learn JS optimization quirks than to become an average Rust developer ?
Re:Maybe you don't need Rust and WASM to speed up your JS by kbenson on Monday February 19, 2018 @04:15PM (#16415810)
It's a cost/benefit type of situation. Learning to optimize JavaScript might cost less, but the benefit is fairly narrow, and may lesson over time (or you may need to pay more in attention and time to keep up with JavaScript VM changes). Rust (or C++) to WASM costs more (if you don't already know the language), but the benefit should stay static and useful over time, and there are many other benefits as well (such as having a fast low-level language to fall back on for other needs.

This isn't unique to this situation either. If you're writing Python and your choice is to either deep dive into various hacks to maximize performance of your pure python or learn Rust/C/C++ and call out using an FFI mechanism, if you have the time to space, I think it's almost always better to learn the new language. There are many benefits to learning new languages beyond just the different performance characteristics, so if you can afford to take that path, I think it's usually a good choice to do so.

Re:Maybe you don't need Rust and WASM to speed up your JS by b0rsuk on Monday February 19, 2018 @11:50PM (#16417921)
I agree with this, but I think most people don't, until it's demonstrated Rust kicks ass. Javascript is all the age right now. People might think "I'll get a Javascript job now, and I will learn to optimize later. Javascript is highly optimized anyway." Then it's just inertia. They already know Javascript. Besides, Javascript may have a reputation for being messy, but not for being a hard language to pick up. Yes it does have an unusual OO style, and supports functional programming, but you don't have to start with high level topics just to write any code with it.

As far as I know Rust has just two major success stories right now: Firefox 57 (Servo) ripgrep (even included in Microsoft Visual Studio)

Re:Maybe you don't need Rust and WASM to speed up your JS by steveklabnik on Tuesday February 20, 2018 @08:29AM (#16420123)
> As far as I know Rust has just two major success stories right now

Here's a bunch more. Dunno what your definition of "major" is though: https://www.rust-lang.org/en-US/friends.html

Re:Maybe you don't need Rust and WASM to speed up your JS by kbenson on Tuesday February 20, 2018 @12:41AM (#16418104)
Sure, and that's why I was careful to couch the argument as just some other language that includes C and C++ as options (and truthfully includes others, but few have quite the same compatibility story). At this point if you don't know C++ or Rust, which one will give you the most benefit from learning it is a very open question. I think Rust has advantages over C++ in correctness and safety, but C++ currently offers better paths for understanding and utilizing existing code or getting a job using it (whether that was an initial goal or not). Five years down the line the differences may not be so cut and dry though. C++ will almost definitely still have those advantages, but the gap have have closed somewhat. Or maybe not? It's all up in the air.
Re:Maybe you don't need Rust and WASM to speed up your JS by pjmlp on Tuesday February 20, 2018 @06:04AM (#16419408)
Currently C++ still wins over Rust, regarding UI and mobile development, specially in what concerns out-of-box experience.

C++ had the advantage of being immediately adopted by the OS vendors for GUI development, although nowadays, with exception of Windows, its role has changed into just addressing the GPU.

So maybe one day we will get something like shaders, CoreGraphics, DirectX, SurfaceFlinger in Rust, but it will still need a couple of years.

Webrender is already something into this direction.

Re:Maybe you don't need Rust and WASM to speed up your JS by carlmr on Tuesday February 20, 2018 @05:49AM (#16419327)
>but C++ currently offers better paths for understanding and utilizing existing code or getting a job using it

I wouldn't say this is entirely wrong, but proper cross-platform package and test management with Cargo is a reason alone that utilizing existing code is waaay easier in Rust. C++ has more existing code though, so they might hit your niche needs better.

Re:Maybe you don't need Rust and WASM to speed up your JS by pjmlp on Tuesday February 20, 2018 @06:06AM (#16419417)
Here something like conan might finally win the hearts of C++ devs, but it is still pretty much in the beginning.

In what concerns Windows development, NuGET and vcpkg are already a big improvement.

Re:Maybe you don't need Rust and WASM to speed up your JS by carlmr on Tuesday February 20, 2018 @06:10AM (#16419452)
NuGet is pretty good, I've only used it with C#/F# though.
Re:Maybe you don't need Rust and WASM to speed up your JS by swsieber on Tuesday February 20, 2018 @12:48AM (#16418122)
Does drop box writing a fs in Rust count as a major success story?
Re:Maybe you don't need Rust and WASM to speed up your JS by b0rsuk on Tuesday February 20, 2018 @01:36AM (#16418273)
It doesn't count as a major success story I knew about when I was typing that comment.
Re:Maybe you don't need Rust and WASM to speed up your JS by hateduser2 on Monday February 19, 2018 @04:00PM (#16415705)
It seems less reliable to learn is optimization quirks, since you’re depending on an (infrequently changing?) implementation detail. Also writing those things sounds muh messier and less maintainable. All heuristic points I’m making.