News for hackers. Stuff that matters.
Re:Making WebAssembly better for Rust and for all languages by Dude2023 on Wednesday March 14, 2018 @12:48PM (#16586096)
> This is because JS is a good choice for most things.

That's why it's one of few languages: 1) with mainstream transpilation; 2) more than one transpiler.

Re:Making WebAssembly better for Rust and for all languages by amelius on Wednesday March 14, 2018 @12:50PM (#16586133)
Isn't that simply because, until recently, JS had a "monopoly" on languages you could use inside a browser?
Re:Making WebAssembly better for Rust and for all languages by jerf on Wednesday March 14, 2018 @03:29PM (#16587572)
If you look at it as "compilation tends to converge on the lowest-level possible output", it all fits pretty well. Dynamic scripting languages flouted that for a long time, but now there's enough JITs floating around that show that even they tend in that direction.

So if JS is the lowest possible level language, than that will be the compilation target for a program going into that context.

x86 has its many, many critics, but I've never heard any of them say that x86 is bad because so many things compile to it....

Re:Making WebAssembly better for Rust and for all languages by burner5692 on Wednesday March 14, 2018 @12:55PM (#16586183)
Yes, that's the only reason anyone has voluntarily used JavaScript.
Re:Making WebAssembly better for Rust and for all languages by kiriakasis on Sunday March 18, 2018 @08:08AM (#16611565)
This, is false. for many (some, if you prefer) use cases javascript is perfect.
Re:Making WebAssembly better for Rust and for all languages by urda on Wednesday March 14, 2018 @01:00PM (#16586233)
The only reason JS is popular is because it holds a monopoly in the space it operates in.

There are so many superior languages to it.

Re:Making WebAssembly better for Rust and for all languages by wcarron on Wednesday March 14, 2018 @01:41PM (#16586677)
Jeez, this horse always gets beaten to death, twice. We get it. You hate JS. ${language_of_choice} is better because [Reasons].

In the end, it doesn't matter. JS is here to stay. If you don't want to write it, don't write code for projects that need it. Constant complaining about its faults does nothing at all except produce noise in threads like this.

And, fwiw, I don't see too many C projects for Front-end solutions like e.g. React. Maybe that means JS is a superior language in the context of the problem is was made to address. Holy shit! Who would have thought that "it depends" applies to development?!

Re:Making WebAssembly better for Rust and for all languages by CaptSpify on Wednesday March 14, 2018 @02:08PM (#16586916)
A bit defensive, aren't we? I didn't see OP say anything about hating JS, just that it only got popular for the wrong reasons.
Re:Making WebAssembly better for Rust and for all languages by andromeduck on Wednesday March 14, 2018 @10:28PM (#16590047)
> Maybe that means JS is a superior language in the context of the problem is was made to address. Holy shit! Who would have thought that "it depends" applies to development?!

Only in terms of access/availability but that was his point...

Re:Making WebAssembly better for Rust and for all languages by themihai on Wednesday March 14, 2018 @12:58PM (#16586212)
It's the only language supported by web browsers. That's the reason people still use it.
Re:Making WebAssembly better for Rust and for all languages by kowdermeister on Wednesday March 14, 2018 @03:36PM (#16587617)
So how do you explain Node.js being so popular?
Re:Making WebAssembly better for Rust and for all languages by monocasa on Wednesday March 14, 2018 @03:49PM (#16587699)
Because frontend devs migrated to the backend and didn't want to learn a better language.
Re:Making WebAssembly better for Rust and for all languages by always_good on Thursday March 15, 2018 @12:26AM (#16590398)
Suggesting tha Node is only used by lazy front-end developers does nothing but show how condescending and uncharitable you are towards other people who picked different trade-offs than you.
Re:Making WebAssembly better for Rust and for all languages by Kutta on Thursday March 15, 2018 @05:32AM (#16591402)
Not wanting to learn a different language is a justifiable preference. Software is full of cost/benefit questions like that. Believing true things also doesn't make you uncharitable.
Re:Making WebAssembly better for Rust and for all languages by eropple on Wednesday March 14, 2018 @06:42PM (#16589010)
And those of us who went to it from those ostensibly "better" languages...?

Go on. Say we're "wrong". I could use a chuckle. :)

Re:Making WebAssembly better for Rust and for all languages by pjmlp on Thursday March 15, 2018 @05:02AM (#16591291)
What about, we need to pimp up our CVs for HR department drone filters?
Re:Making WebAssembly better for Rust and for all languages by tytytytytytytyt on Wednesday March 14, 2018 @11:22PM (#16590209)
Not wanting to use those better languages is effectively the same in this case. But you mentioned it being wrong first...
Re:Making WebAssembly better for Rust and for all languages by eropple on Thursday March 15, 2018 @11:06AM (#16593446)
Because I'm rather tired of the silly claims. I write Rust. I write Kotlin. I write C++. I write Ruby. And I also write JavaScript. Horses for courses--and the mind-meltingly stupid sneering nonsense should just end. Just...end.

I used to smarm about it. I was wrong to. You should stop, because you are wrong now.

Re:Making WebAssembly better for Rust and for all languages by tytytytytytytyt on Thursday March 15, 2018 @02:17PM (#16595255)
> Because I'm rather tired of the silly claims. I write Rust. I write Kotlin. I write C++. I write Ruby. And I also write JavaScript.

I never made any such 'claims', but I'm happy for you. I enjoy those things, too...

> and the mind-meltingly stupid sneering nonsense should just end. Just...end. I used to smarm about it. I was wrong to.

You're the one sneering, smarming, etc. and attempting to create drama. I never said anything about using Node being bad. Maybe you should re-read what I wrote?

> You should stop, because you are wrong now.

Hey, keep believing that if it makes you feel better.

Re:Making WebAssembly better for Rust and for all languages by sseth on Thursday March 15, 2018 @03:49AM (#16591064)
Ryan Dahl wanted to replicate the nginx "async" model for normal web development. Since javascript was single-threaded, it pretty much forced an asynchronous programming model and many of the libraries were already built that way, so it proved to be a fertile ground for experimentation.

In other words, we have node.js and not node.xxx because other languages at that time did not provide a suitable ecosystem for building asynchronous programs. Today most languages have much better async support, or they have features (like goroutines in golang) which achieve the same objective in a different way.

Re:Making WebAssembly better for Rust and for all languages by imtringued on Thursday March 15, 2018 @08:55AM (#16592386)
Emphasis on ecosystem. I remember working with netty and other platforms that provided async networking years before nodejs got popular and asnyc became "trendy".
Re:Making WebAssembly better for Rust and for all languages by osullivj on Thursday March 15, 2018 @09:04AM (#16592441)
Doug Schmidt's C++ Reactor and Sam Rushings Python Medusa did async networking 20 years ago. But in the late 90s and early 2000s a lot of J2EE based server code was built in Java that used one blocking thread per client; that was a major wrong turn in mainstream SW design that took a long time to correct, IMHO.
Re:Making WebAssembly better for Rust and for all languages by always_good on Thursday March 15, 2018 @12:35AM (#16590424)
Well, how many other languages are sent over the wire to be interpreted on a ubiquitous client that's been incrementally changing for decades?

Is it a mystery to you why this situation is different from your favorite language that you aren't source-to-source compiling?