6 ms·
> Meta’s primary supported server-side languages are Hack, C++, Rust, and Python. > For specific use cases, we support other languages, including Java, Erlang,
by Xeoncross 4y ago
> 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.
- 01acheru 4y agoProbably Erlang because of Whatsapp, IIRC it's backend was written in Erlang.
- jwdunne 4y agoI 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.
- pessimizer 4y agoAnd they actually moved to Erlang for chat before Whatsapp, around when they hired https://yarivsblog.blogspot.com/ https://yarivsblog.blogspot.com/
- antholeole 4y agoHack because?
- bcrosby95 4y agoLegacy.
- Lt_Riza_Hawkeye 4y agoBecause the entire website is written in hack?
- klodolph 4y agoBasically, 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.
- packetslave 4y agoThere'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.
- mhoad 4y agoSo 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.
- ljoiajsdfwfwdf 4y agoHack is a facebook project. Hack was born out of need to improve speed of PHP performance and add a typing discipline.
- louthy 4y ago> Haskell because elitism Was there really a need for this comment? How about: for correctness and expressivity
- kristopolous 4y agoWhat you offered up is pretty close to the meaning of elite.
- TillE 4y ago"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.
- kristopolous 4y agoIn 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.
- derefr 4y ago> 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. :)
- pjmlp 4y agoHack 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.
- dboreham 4y ago> Haskell because elitism. Ouch. True elitists always code in ML.
- reil_convnet 4y ago> 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.
- throwawaymaths 4y agoIirc 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
- mdcds 4y ago> Haskell because elitism. Does anyone know if Simon Marlow is still at Meta and what he works on?
- coderdd 4y agoGlean, at least tangentially?
- shirogane86x 4y agoI 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).
- SkyMarshal 4y agoBack 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.