News for hackers. Stuff that matters.
Re:Programming languages endorsed for server-side use at Meta by Xeoncross on Wednesday July 27, 2022 @01:02PM (#32253065)
> Meta’s primary supported server-side languages are Hack, C++, Rust, and Python.

> For specific use cases, we support other languages, including Java, Erlang, Haskell, and Go

Makes sense. Python because ML.

Rust because of performance.

C++ and Java because all-the-things.

Go because 75% of all cncf.io projects are Go.

Haskell because elitism.

Erlang because stability.

/s

I think the real story is that migrating off PHP was too hard, so Hack was started which required a substantial C++ employee pool which meant that Rust was the ideal replacement to all of this skipping the Java/Kotlin and Go ecosystems altogether.

So not just scale at play here, a cause-and-effect of past hiring decisions.

Re:Programming languages endorsed for server-side use at Meta by pjmlp on Wednesday July 27, 2022 @01:28PM (#32253471)
Hack has an interest pivot though.

It started with their PHP to C++ compiler, then someone started a JIT compiler, and eventually the JIT proved to be a better outcome in tooling and performance, that they scraped the compiler and kept the JIT instead.

It had the side effect that proper PHP now enjoys a JIT as well.

Re:Programming languages endorsed for server-side use at Meta by 01acheru on Wednesday July 27, 2022 @01:16PM (#32253296)
Probably Erlang because of Whatsapp, IIRC it's backend was written in Erlang.
Re:Programming languages endorsed for server-side use at Meta by jwdunne on Wednesday July 27, 2022 @01:41PM (#32253723)
I believe the chat backend was implemented in Erlang too. When I was much younger, the web based instant messaging seemed like magic to me so I looked into it and turned out they used Erlang.
Re:Programming languages endorsed for server-side use at Meta by pessimizer on Wednesday July 27, 2022 @02:57PM (#32254996)
And they actually moved to Erlang for chat before Whatsapp, around when they hired https://yarivsblog.blogspot.com/
Re:Programming languages endorsed for server-side use at Meta by louthy on Wednesday July 27, 2022 @01:25PM (#32253427)
> Haskell because elitism

Was there really a need for this comment? How about: for correctness and expressivity

Re:Programming languages endorsed for server-side use at Meta by Xeoncross on Wednesday July 27, 2022 @03:01PM (#32255068)
True, I was going to write something else for Haskell but realized it didn't matter what I put as I'd be called out and corrected regardless.
Re:Programming languages endorsed for server-side use at Meta by SkyMarshal on Wednesday July 27, 2022 @04:06PM (#32256103)
Why would you have been called out for saying “correctness and expressivity”? That’s accurate, though also probably legacy now that Rust can satisfy most or all of those use cases.
Re:Programming languages endorsed for server-side use at Meta by kristopolous on Wednesday July 27, 2022 @01:32PM (#32253552)
What you offered up is pretty close to the meaning of elite.
Re:Programming languages endorsed for server-side use at Meta by TillE on Wednesday July 27, 2022 @01:38PM (#32253654)
"Elite" and "elitism" are totally different concepts.

Disparaging jokes about programming languages are really tired and uninteresting, I was glad to see that the Carbon discord explicitly bans them.

Re:Programming languages endorsed for server-side use at Meta by kristopolous on Wednesday July 27, 2022 @02:46PM (#32254779)
In practice they're always (?!) about the userbase.

Everything's got exceptions but it's usually a punch by proxy. This would be really obvious if it was anything else.

If someone started making fun of say basketball, keeping it not about the people who play and are fans would be quite a precipice to navigate.

You could certainly complain about the technicals of the rules but you're no longer in the world of jokes.

Given that, Haskell, unless you're a mathematician, is still one of the least accessible language outside of purely academic, esoteric or intentionally obfuscated ones.

Re:Programming languages endorsed for server-side use at Meta by derefr on Wednesday July 27, 2022 @05:11PM (#32257028)
> Given that, Haskell, unless you're a mathematician, is still one of the least accessible language outside of purely academic, esoteric or intentionally obfuscated ones.

Tiny nitpick: Haskell the language and runtime is just another ML. You could technically write a ground-up Haskell program that doesn't do any maths stuff — in about the same way that you can write a ground-up Erlang program that doesn't use OTP.

Haskell just has a standard library and language-package ecosystem that's full of stuff only mathematicians were previously expected to understand. :)

Re:Programming languages endorsed for server-side use at Meta by gumby on Wednesday July 27, 2022 @01:42PM (#32253738)
An elite is a subset that was drawn out of a pool. The set of very rich people is a small subset: an elite. The group of prisoners chosen for execution today is also an elite.

I can't see how those statements in any way define any sort of population subset.

Re:Programming languages endorsed for server-side use at Meta by kristopolous on Wednesday July 27, 2022 @01:59PM (#32254034)
The elite is associated with accuracy, cleanliness of execution, precision, correctness, an ability to be flexible and expressive while maintaining refined control and precision.

Take olympic athletes or orchestral musicians for instance.

If say a violinist said they only used a particular violin because it was that which was correct and expressive, that's much closer to elitist than say egalitarianism.

Re:Programming languages endorsed for server-side use at Meta by weego on Wednesday July 27, 2022 @02:03PM (#32254086)
To be fair the absolute state of scala is largely due to imported elitism from Haskell crossovers
Re:Programming languages endorsed for server-side use at Meta by chakkepolja on Wednesday July 27, 2022 @02:30PM (#32254514)
/s because sarcasm
Re:Programming languages endorsed for server-side use at Meta by ljoiajsdfwfwdf on Wednesday July 27, 2022 @04:09PM (#32256163)
Haskell's runtime performance is unethical from a carbon perspective.
Re:Programming languages endorsed for server-side use at Meta by kadoban on Wednesday July 27, 2022 @06:04PM (#32257634)
Haskell benchmarks better than _many_ languages, so that seems hard to support.
Re:Programming languages endorsed for server-side use at Meta by reil_convnet on Wednesday July 27, 2022 @03:25PM (#32255452)
> Erlang because stability.

Maybe because of WhatsApp acquisition ? Some services might still be running in Erlang. Last I heard, Erlang was being replaced by C++.

> Haskell because elitism.

Haxl used to be a project at FaceBook, not sure what Haskell is used for now there.

Thoughts as an outsider. I dont work [neither have worked] at Meta.

Re:Programming languages endorsed for server-side use at Meta by throwawaymaths on Wednesday July 27, 2022 @03:34PM (#32255630)
Iirc the story was fb messenger was written in Erlang, then they rewrote in c++ because of no trust in erlang (I think that was around when fb messenger started sucking with everyone complaining about bugs -- it was better last I used it 4 yrs ago) then ironically they re-acquired Erlang via WhatsApp.

I wonder if they will make that mistake twice

Re:Programming languages endorsed for server-side use at Meta by shirogane86x on Thursday July 28, 2022 @03:53AM (#32261557)
I think Sigma (FB's spam filtering system) is still written in Haskell, but I may be wrong (basing this around internet rumours since I don't work at Meta).
Re:Programming languages endorsed for server-side use at Meta by mdcds on Wednesday July 27, 2022 @03:52PM (#32255912)
> Haskell because elitism.

Does anyone know if Simon Marlow is still at Meta and what he works on?

Re:Programming languages endorsed for server-side use at Meta by coderdd on Wednesday July 27, 2022 @04:30PM (#32256464)
Glean, at least tangentially?
Re:Programming languages endorsed for server-side use at Meta by dboreham on Wednesday July 27, 2022 @01:42PM (#32253739)
> Haskell because elitism.

Ouch. True elitists always code in ML.

Re:Programming languages endorsed for server-side use at Meta by SkyMarshal on Wednesday July 27, 2022 @04:12PM (#32256213)
Back in the 2010s pre-Rust era Facebook hired and acqui-hired some big names in the Haskell and functional programming world. Probably still have some of them, and their codebases. But Rust can probably now satisfy most of those use cases.
Re:Programming languages endorsed for server-side use at Meta by antholeole on Wednesday July 27, 2022 @01:21PM (#32253355)
Hack because?
Re:Programming languages endorsed for server-side use at Meta by klodolph on Wednesday July 27, 2022 @02:19PM (#32254361)
Basically, all the front-end code on the server side is written in Hack, because it was originally written in PHP. My understanding is that general application logic, like permissions, is handled by libraries written in Hack. Also stuff like templates (for HTML or other UIs, including CSS), etc.

Hack is recognizable as a PHP derivative but the experience of writing Hack is very different from the experience of writing PHP.

Re:Programming languages endorsed for server-side use at Meta by packetslave on Wednesday July 27, 2022 @02:59PM (#32255040)
There's a LOT of infrastructure that already exists in the Hack ecosystem at Meta. Especially around things like data access control, privacy, auditing, data deletion, etc.

When I left earlier this year, pretty much all of the internal storage systems (from MySQL to blob storage) were moving to requiring all access to be via a common Entity framework that encoded the above-mentioned things in a common way. That framework exists on the non-Hack side of the house, but it's much, much easier and in some ways more robust on the Hack side.

Re:Programming languages endorsed for server-side use at Meta by mhoad on Wednesday July 27, 2022 @04:15PM (#32256258)
So all the things they are especially bad at?

Only a semi troll comment, IRL Facebook recently said they were genuinely unable to audit where personal information was ending up across their systems which is a terrifying thing to think about and another reason I genuinely hope their pivot to VR kills them as a company.

Re:Programming languages endorsed for server-side use at Meta by ljoiajsdfwfwdf on Wednesday July 27, 2022 @03:54PM (#32255936)
Hack is a facebook project. Hack was born out of need to improve speed of PHP performance and add a typing discipline.
Re:Programming languages endorsed for server-side use at Meta by bcrosby95 on Wednesday July 27, 2022 @01:33PM (#32253567)
Legacy.
Re:Programming languages endorsed for server-side use at Meta by Lt_Riza_Hawkeye on Wednesday July 27, 2022 @02:01PM (#32254053)
Because the entire website is written in hack?