Live data from Hacker News

Programming languages endorsed for server-side use at Meta

engineering.fb.com

241–250 of 302 posts

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

#241
post #30

“Since we began our journey with Rust, the number of projects using Rust inside Meta has increased at an accelerated rate” That almost sounds like an endorsement. I’ve been holding off learning Rust. However, it seems like Rust adoption is reaching a tipping point.

Yep, and its pretty much going to become the next C++ - i.e widely adopted at first, and driven into a shit state. Specifically because of this https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html This needs to exist in Rust for it to get adopted, because forcing good developers to get explicit with code for memory safety when they are doing simple operations is going to result in them ignoring the language. So ev…

> C++ has a standard library and smart pointers that eliminate a lot of errors with dangling pointers, and if people use those exclusively

You can't use smart pointers exclusively, because there is no "smart observational pointer", and there cannot be one, because that would be a reference type checked by a borrow checker, which is exactly what rust uses.

You can emulate it with shared pointers, but then you're left with basically a reference counted language. Why not using swift at this point? Also this creates a semantic impedance mismatch that tends to manifest with cycles.

Source: walked a codebase that would (ab)use shared pointers

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

#242
post #56

Earlier quoted context omitted.

> Haskell because elitism Was there really a need for this comment? How about: for correctness and expressivity

Haskell's runtime performance is unethical from a carbon perspective.

Haskell benchmarks better than _many_ languages, so that seems hard to support.

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

#243

I’m surprised they said Rust is their new language of choice for CLI tools. I’m no expert but always saw Go as the better choice for CLI tooling where performance is important, Rust more of a low level language for highly performant libraries and tools, and Python a good choice for scripting or plumbing that needs to work and be easily maintainable, without special performance concerns (Python is my primary language,…

Go is the go-to for many teams, especially CLIs. Unfortunately there are strong opinions held by high influence on Rust vs. Go instead of Rust + Go. To the point of finger pointing any chance they could with "see??"

Many have left as a result. Weird hill to die on. :)

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

#245

Earlier quoted context omitted.

>> Rust is far more widely used than D in the industry An off the cuff comment but all the same it made me think - how would you get data for an assertion like that. The usage of both D and Rust is notoriously low in the industry, a rounding error. That has to make it so hard to measure. Still, you'd expect D to be more popular because Rust's only been around 10-ish years or so. If you click through the TIOBE ranking…

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 :)

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

#246

Earlier quoted context omitted.

>> Rust is far more widely used than D in the industry An off the cuff comment but all the same it made me think - how would you get data for an assertion like that. The usage of both D and Rust is notoriously low in the industry, a rounding error. That has to make it so hard to measure. Still, you'd expect D to be more popular because Rust's only been around 10-ish years or so. If you click through the TIOBE ranking…

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 going all in at one point (they even hired one of the leads on D lang).

>> That's practically all of FAANG

Who were we missing? Netflix, they’ve dabbled with D too: https://github.com/Netflix/vectorflow

Don’t misunderstand my point - it’s not that D is more popular than rust, it’s that rust is not used for real work in any significant capacity yet.

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

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

#247

I'm very surprised that C++ is one of the recommended languages for backend services. I occasionally am interested in learning C++ but with my context as a web developer I find it doesn't really fit any of my use cases. How would one go about building a rest service in C++? Do you have to write everything yourself or are there libraries and frameworks. I did some light looking into it after reading the article but I…

> How would one go about building a rest [service.]

At Meta, you wouldn't. Everything is Thrift. For WWW, you'll have more graphql.

Meta also has a shit ton of libs to make service development easier than exists publicly.

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

#248

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?

Depends on your definition of "small". Clap will add significantly to the compile time, but your binary won't be too much larger. Rust binaries tend to fall in the range of 2–30MB, depending on lots of things.

But that's still relatively small compared to Go, or even Python if you consider needing to bundle the interpreter for "fully statically linked".

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

#249

Earlier quoted context omitted.

>> Rust is far more widely used than D in the industry An off the cuff comment but all the same it made me think - how would you get data for an assertion like that. The usage of both D and Rust is notoriously low in the industry, a rounding error. That has to make it so hard to measure. Still, you'd expect D to be more popular because Rust's only been around 10-ish years or so. If you click through the TIOBE ranking…

> 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.

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

#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 server-side:

  * Vercel-driven / full-stack developer innovation
  * ubiquity of JS/TS for tooling, innovation, etc.
  * fast enough to run serverless
  * rich ecosystem, though you do need to curate your dependencies yourself and not just let npm take you for a ride
  * closer to customers; since closer to the web, but with types.
  * no over-engineering re: borrow checker for 90% of use cases.
I'm biased but I see no fundamental reason why everything doesn't converge on TypeScript in the future. C : C++/Rust (context: systems development) as JS : TS (context: all programming).
Post reply on HN