Live data from Hacker News

Programming languages endorsed for server-side use at Meta

engineering.fb.com

251–260 of 302 posts

Re: Programming languages endorsed for server-side use at Meta

#251

Earlier quoted context omitted.

Rust has been adopted by Mozilla (of course), Microsoft, Meta, Google/Acrobat, Amazon, and even Apple for key infrastructure, among tons of others major big players. That's practically all of FAANG and more. D never had that.

>> Mozilla (of course) Mozilla is a c++ and javascript shop. What do they ship in Rust? How much of Firefox is written in rust for example? >> Microsoft, Meta, Google/Acrobat, Amazon Large firms have lots of devs and consequently lots of toy projects. Is their usage of rust more significant than their use of D? I mean Meta was churning out projects in D a while back (warp, flint, etc) and looked like it might be goin…

>Mozilla is a c++ and javascript shop. What do they ship in Rust? How much of Firefox is written in rust for example?

About 20%, if you compare it directly against C and C++ and exclude Javascript, CSS, HTML, Java, etc.

https://www.openhub.net/p/firefox/analyses/latest/languages_...

Re: Programming languages endorsed for server-side use at Meta

#252

Earlier quoted context omitted.

> Does anyone really think there is an advantage Rust brings here over everything else -- Golang, Python etc. Yes! IMO building CLI tools is one of Rust's sweet spots for a few reasons: - Rust is great at building small, fast, statically linked executables. Python and a lot of other languages are not. - Rust has excellent cross-platform support. The stdlib and crate ecosystem do a remarkable job of building abstracti…

> small ... executables. > clap Isn't clap kind of notoriously bad about executable bloat and compile times?

clap adds about 300kb with my usual release mode profile (lto = true, opt-level = 'z', panic = 'abort', strip = true). Bigger than I would like but for most projects I'm OK taking the binary size hit for nicer ergonomics and more features than argh.

Re: Programming languages endorsed for server-side use at Meta

#253
post #250

This was an interesting, thought-provoking read. But the author of the post is a member of the board of directors of the Rust Foundation. https://foundation.rust-lang.org/news/2022-03-16-news-announ... Perhaps a blind spot for Meta is they're spending time working away from PHP/Hack so as they reach for Rust (away from web-centric languages) they don't realize TypeScript has compelling reasons to choose it on the ser…

Possibly because nodejs is running on v8, that the primary creator is Google?

EDIT: thinking about it again, I guess the domain where nodejs is excel at has already being done in Hack, which already grow within FB.

Re: Programming languages endorsed for server-side use at Meta

#254

Earlier quoted context omitted.

UI is a poor fit for Rust, IMO, because the natural way to model UI widget hierarchies is rather painful with ownership tracking in the picture. But I don't see why that precludes Rust from being a good choice in other applications, CLI in particular.

Well, isn´t that a bit damning though? I am not an expert on Rust, so please enlighten me. If it is meant to replace C++, I would expect it to dethrone on the areas where it is king. I am looking at a crap ton of programs with an UI. Your IDE, your text editor, your spreadsheet program, your graphics editor, etc. Most of the modern programs just give up and ship as a full blown bloated memory eating web browser. Ther…

For CLI apps, performance may be important, and Rust offers a performance profile similar to C++. This is exactly the niche where relying on an automatic GC may be undesirable.

But also, I feel that it's generally incorrect to position Rust's safety model as the opposite of automatic GC. It kinda makes sense if you only focus on management of memory as a resource, but it ignores the whole race condition angle (which very much still exists in GC'd languages like Go or Java).

Re: Programming languages endorsed for server-side use at Meta

#255

Earlier quoted context omitted.

Rust has been adopted by Mozilla (of course), Microsoft, Meta, Google/Acrobat, Amazon, and even Apple for key infrastructure, among tons of others major big players. That's practically all of FAANG and more. D never had that.

>> Mozilla (of course) Mozilla is a c++ and javascript shop. What do they ship in Rust? How much of Firefox is written in rust for example? >> Microsoft, Meta, Google/Acrobat, Amazon Large firms have lots of devs and consequently lots of toy projects. Is their usage of rust more significant than their use of D? I mean Meta was churning out projects in D a while back (warp, flint, etc) and looked like it might be goin…

>Mozilla is a c++ and javascript shop. What do they ship in Rust? How much of Firefox is written in rust for example?

Mozilla created the Rust project and funded the language's creation and several years of maturity. They replaced a large chunk of the layout engine with a Rust version.

>Large firms have lots of devs and consequently lots of toy projects.

Yes. But they don't tout the languages they use in those toy projects in their official communications, help create the language foundation, support the language with devs, or build their critical infrastructure or new in-house mobile OS in those toy languages.

Here's an example from Amazon:

"At AWS, Rust has quickly become critical to building infrastructure at scale. Firecracker is an open source virtualization technology that powers AWS Lambda and other serverless offerings. It launched publicly in 2018 as our first notable product implemented in Rust. We use Rust to deliver services such as Amazon Simple Storage Service (Amazon S3), Amazon Elastic Compute Cloud (Amazon EC2), Amazon CloudFront, and more. In 2020, we launched Bottlerocket, a Linux-based container operating system written in Rust, and our Amazon EC2 team uses Rust as the language of choice for new AWS Nitro System components, including sensitive applications, such as Nitro Enclaves.

At AWS, we believe leaders create more than they consume and always leave things better than they found them. In 2019, AWS was proud to become a sponsor of the Rust project. In 2020, we started hiring Rust maintainers and contributors, and we partnered with Google, Huawei, Microsoft, and Mozilla to create the Rust Foundation with a mission to support Rust. AWS is investing in the sustainability of Rust, a language we believe should be used to build sustainable and secure solutions."

And here are more:

https://cloudblogs.microsoft.com/opensource/2021/02/08/micro...

https://opensource.googleblog.com/2021/02/google-joins-rust-...

https://docs.microsoft.com/en-us/windows/dev-environment/rus...

https://fuchsia.googlesource.com/docs/+/d4f9b980f18fc6722b06...

https://aws.amazon.com/blogs/opensource/why-aws-loves-rust-a...

https://aws.amazon.com/blogs/opensource/sustainability-with-...

https://thenewstack.io/microsoft-rust-is-the-industrys-best-...

>Where’s the big project written in rust? Servo and the rust compiler are the only two large rust projects on github.

I don't think you'll find Google, Amazon, Dropbox, etc backend code in GitHub, if that's your metric.

Re: Programming languages endorsed for server-side use at Meta

#256
post #202

Earlier quoted context omitted.

grep inner loops are coded straight in Assembly. So Rust would be a poor fit.

Can you link to the source of any widely deployed grep whose "inner loop" is coded in Assembly?

If I would have to guess it would be codecs.

Re: Programming languages endorsed for server-side use at Meta

#257
post #245

Earlier quoted context omitted.

Rust has been adopted by Mozilla (of course), Microsoft, Meta, Google/Acrobat, Amazon, and even Apple for key infrastructure, among tons of others major big players. That's practically all of FAANG and more. D never had that.

That Acrobat must've been Alphabet :)

Yeah

Re: Programming languages endorsed for server-side use at Meta

#258

Earlier quoted context omitted.

> The usage of both D and Rust is notoriously low in the industry Rust usage is not "notoriously low" (don't know how you came to believe that) and it's growing very rapidly. The fact that it's a major supported language at Meta is evidence enough to the contrary, not to mention the plethora of post titles on HN that end with "in Rust", or are about rewriting in Rust (some of these are personal projects but many are…

>> don't know how you came to believe that Hardly any job postings. No large projects on github. No halo project (does servo count? It’s not gone anywhere yet, is it still alive?). There’s an echo chamber around the language.

> Hardly any job postings.

Job postings that mention using Rust from July 2022 Who's Hiring thread alone: https://news.ycombinator.com/item?id=31948363 https://news.ycombinator.com/item?id=32070322 https://news.ycombinator.com/item?id=31949373 https://news.ycombinator.com/item?id=31947931 https://news.ycombinator.com/item?id=32015077 https://news.ycombinator.com/item?id=31947359 https://news.ycombinator.com/item?id=31969755 https://news.ycombinator.com/item?id=31949096

> No large projects on github. No halo project

Take your pick: https://github.com/search?l=Rust&o=desc&q=rust&s=stars&type=... Deno has 84k stars.

Re: Programming languages endorsed for server-side use at Meta

#259
post #237

Earlier quoted context omitted.

> The usage of both D and Rust is notoriously low in the industry Rust usage is not "notoriously low" (don't know how you came to believe that) and it's growing very rapidly. The fact that it's a major supported language at Meta is evidence enough to the contrary, not to mention the plethora of post titles on HN that end with "in Rust", or are about rewriting in Rust (some of these are personal projects but many are…

Rusts usage in industry absolutely is notoriously low when in comparison to C++ though (as is D’s) That’s changing of course but HN’s bubble is just that, a bubble.

My issue was with lumping in Rust with D when saying they both have "notoriously low usage" when Rust has, conservatively, probably >10x the usage of D.

Re: Programming languages endorsed for server-side use at Meta

#260

While this is cool to see "how the big guys do it", this article is worthless. Specifically, it lacks one fundamental thing: why. Why isn't Go in this list? It is very surprising since it feels like all off tech jumped on the Go bandwagon, though I won't complain. I can only guess at why, but it would be very interesting to see why. Why is Rust in the list, other than "so many people started to use it internally that…

I can't say Go had the adoption I was hoping for. It did well in the infra community (probably starting with docker) but, among my clients in services, I can think only of one failed startup who bet on Go (and actually failed because they decided to rewrite from node to go).

> and actually failed because they decided to rewrite from node to go

Interesting. What did golang do so badly that they failed?

Post reply on HN