Live data from Hacker News

Why Discord is switching from Go to Rust

blog.discordapp.com

511–520 of 670 posts

Re: Why Discord is switching from Go to Rust

#511

Earlier quoted context omitted.

I really wish Intel or MS or someone would fund D so it could give Go and Rust a run for their money. It's as fast (or faster), expressive, powerful and, subjectively, easier to pick up and code in than Rust. It just needs some backers with muscle.

Maybe some big FAANG company. Start at the beginning of the acronym, I guess. I wonder if anyone could persuade anyone at Facebook to do a little bit of D professionally. I bet if even one serious Facebook engineer made a serious effort to use D, its adoption woes would be over.

Walter Bright the author of D worked at Facebook writing a fast preprocessor for C/C++ in D.

Re: Why Discord is switching from Go to Rust

#512

Earlier quoted context omitted.

I really wish Intel or MS or someone would fund D so it could give Go and Rust a run for their money. It's as fast (or faster), expressive, powerful and, subjectively, easier to pick up and code in than Rust. It just needs some backers with muscle.

Maybe some big FAANG company. Start at the beginning of the acronym, I guess. I wonder if anyone could persuade anyone at Facebook to do a little bit of D professionally. I bet if even one serious Facebook engineer made a serious effort to use D, its adoption woes would be over.

I thought Facebook used to “unofficially” support D? Or am I mixing languages up?

Right now, I think eBay is one of the big companies that uses D.

Edit: Sibling comment beat me to it.

Re: Why Discord is switching from Go to Rust

#513
post #511

Earlier quoted context omitted.

Maybe some big FAANG company. Start at the beginning of the acronym, I guess. I wonder if anyone could persuade anyone at Facebook to do a little bit of D professionally. I bet if even one serious Facebook engineer made a serious effort to use D, its adoption woes would be over.

Walter Bright the author of D worked at Facebook writing a fast preprocessor for C/C++ in D.

Alexandrescu, too.

They also talked about it pretty frequently.

Maybe ggp's claim that D just needs a heavy hitter backing it might be misplaced.

Re: Why Discord is switching from Go to Rust

#514

I've heard lots of hot takes on "what Go really is". Here's mine. Go is what would have happened if Bell Labs wrote Java.

>Go is what would have happened if Bell Labs wrote Java And Unix is what happened when Bell Labs wrote an operating system -- something that was born outdated from the start. Just like Golang.

Yet simple enough to be understood and its features actually used, widespread and that stood the test of time.

Re: Why Discord is switching from Go to Rust

#515
post #347
post #246

Earlier quoted context omitted.

> Go is network-app specific Just because it is used most for "network apps" doesn't mean it's limited to that. On the other hand, you could argue that Rust is a wrong fit for anything _except_ performance-critical applications, because for anything else it's not worth to saddle yourself with the added complexity. > and Rust very broad --a true general purpose prog lang-- it is easy to see how Go mature so quickly (n…

As the grant parent commentor i cannot down vote, so that wasn't me. Google explicitly shown no intent to make Go a fit beyond network apps. You can hack something into doing more than originally intended, but then you are usually operating "outside of warranty". > On the other hand, you could argue that Rust is a wrong fit for anything _except_ performance-critical applications Well, Rust does more than C-level high…

Go is a general purpose programming language. It is suitable for a large variety of programming tasks beyond network services (though itself a massive problem domain)

For example Go is great for building cli apps. Simple, easy to install and easy to understand.

For another Go has surprisingly good windows support. Google didn’t do that.

For a third Go has robust cryptography libraries.

There are actually lot’s of other contributions from the community if you’d take the time to look.

Re: Why Discord is switching from Go to Rust

#516
post #192

Really interesting post, however they're using a 2+years old runtime, Go 1.9.2 was released 2017/10/25 why did they not even try Go 1.13? For me the interesting part is that their new implementation in Rust with a new data structure is less than 2x faster than an implementation in Go using a 2+years old runtime. It shows how fast Go is vs an very optimized language + new data structure with no GC. Overall I'm pretty…

The graphs were in different units. The final Rust version was over 100x faster.

Re: Why Discord is switching from Go to Rust

#517
post #465

Earlier quoted context omitted.

> 1.12 seems to specifically address their performance concern Maybe it does, maybe it doesn't. Maybe 1.14 has a performance regression with their specific load and they get screwed. We'll never know. You know why? They permanently solved their GC problems by eliminating GC. That's the smart play.

Actually it turns out that they DID test the latest version which at the time was 1.10 (see my edit). I guess you should be surprised now? :D

Since I actually cited 1.10 as one they tested I'm not surprised at all.

Re: Why Discord is switching from Go to Rust

#518
post #290

Earlier quoted context omitted.

One the one hand, yes. On the other hand, all of this sounds much more complex and fragile. This seems like an important point to me: "Remarkably, we had only put very basic thought into optimization as the Rust version was written. Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version."

A C app will tend to outperform a Java or Golang app by 3x, so it isn't too surprising.

This really depends on what job a program does and how well the C program is implemented.

Re: Why Discord is switching from Go to Rust

#519
And brings me back to my years old nag. "Ok, you got GC, fine. But DO give me option to hand free specific memory when I want to. I don't consider hand allocation and deallocation such a pain than GC going wild."

This doesn't only go for Go.

Re: Why Discord is switching from Go to Rust

#520

I'm curious what the product-engineering landscape in the company looks like to allow for a language rewrite to happen. I feel like this would be a hard sell in all companies I've worked at. Was this framed as a big bug fix? Or was faster performance framed as a feature?

I think they're at a scale now where the cost of running it starts to become important as well. At least when we're talking about big performance increases like this.
Post reply on HN