Live data from Hacker News

Backend of Meta Threads is built with Python 3.10

twitter.com

421–430 of 458 posts

Re: Backend of Meta Threads is built with Python 3.10

#421
post #382

Earlier quoted context omitted.

Costs that wouldn't have happened in first place if a scripting language hadn't been chosen in first place.

Please tell me what language they should have written it in then? They have a incredibly successful company. What did ruby do to hurt you personally. This whole line is co oketely irrational. You want thier webapp written in assembly?

Why resort to a straw man? There are plenty of options between "a language that does not even have strong types" and "machine code"? E.g. Elixir is strongly but dynamically typed and you can take it quite far while reaping most of the benefits of typing and not losing velocity as you would with many statically strongly typed languages.

Nuance matters. I wouldn't pick Ruby for anything except scripts nowadays. You get absolutely zero guarantees and being able to whip out an MVP in 2 days is not as important as people make it out to be. Extremely often being able to have an MVP in 10-20 days is just as viable but then you will have to write less tests and have more guarantees from your compiler.

Re: Backend of Meta Threads is built with Python 3.10

#422

Earlier quoted context omitted.

>Remember when Twitter was written in Ruby? Ruby is the exception to the rule. Friends don't let friends start new Ruby projects in 2023.

Respectfully disagree about not starting new Ruby projects now - can we still be friends? It works and is easy to get started for simple stuff, same with PHP for some folks or Django etc.

"Easy to start" is oversold in my experience. At one point you want more guarantees upfront.

Re: Backend of Meta Threads is built with Python 3.10

#423

Earlier quoted context omitted.

>Remember when Twitter was written in Ruby? Ruby is the exception to the rule. Friends don't let friends start new Ruby projects in 2023.

Ruby in 2023 is miles ahead it was 10 years ago.

Yet it's still super behind tech like Elixir or Golang, which are both faster and give you more compile-time guarantees.

Re: Backend of Meta Threads is built with Python 3.10

#424

Earlier quoted context omitted.

>Guess I'll just write my next project in Bash then, after all, if it's a good idea they will come right? Execution can wait until you've got a few hundred mil. Yea actually. Bash/CGI could handle plenty. If thats your most comfortable language then go for it.

Bash is seriously underrated as a programming language these days. About 80% of the code I now write is in bash, because usually the problem ones trying to solve has a trivial solution if you just use existing tooling in creative ways.

I don't disagree with your premise and I write plenty of bash and zsh scripts but "the creative ways" very often are a rabbit hole that exposes way too many edge cases.

At one point I wake up two hours later and realize I could have finished this in 15 minutes with Golang or even Ruby.

Re: Backend of Meta Threads is built with Python 3.10

#425

For the “Python isn’t fast enough for production backend” crowd from the same company that brought you the largest social network built on PHP + MySQL.

Quite often, the choice of language is failing to see the forest for the trees. Saving nanoseconds or cycles because you chose C++ over Python pales in comparison to milliseconds spent at network barriers reading from a cache service or database

Yes and no, I still remember the times when several Ruby on Rails apps I consulted for had 5ms DB queries and Rails' ActiveRecord was taking 120ms.

Technically choosing C++ over Python will save you several orders of magnitude more than nanoseconds.

Though C++ might be a bad example. I'd replace Python web app with Elixir or Golang.

Re: Backend of Meta Threads is built with Python 3.10

#426

Earlier quoted context omitted.

At Facebook scale those nanoseconds are worth millions in compyte, energy, etc.

But do the millions you spend a year on compute cost more or less than the millions you would spend a year in labor finding the increasingly rare breed of C++ developers who can optimize things for instruction or cycle count? Such developers usually have over a decade of experience (if not multiple decades). Python developers are a dime a dozen, comparatively Plus, instruction and cycle counting is low hanging fruit…

> But do the millions you spend a year on compute cost more or less than the millions you would spend a year in labor finding the increasingly rare breed of C++ developers who can optimize things for instruction or cycle count?

That's a very valid question but in the case of Facebook they already have them so why not use them for that?

I mean yeah, they made their choice -- use HHVM and it likely served them very well. I am just pointing out that in their case sourcing extra (or even any at all) C++ devs is a non-issue because they already have plenty.

Fully agreed with your memory latency remark.

Re: Backend of Meta Threads is built with Python 3.10

#427

Earlier quoted context omitted.

i don't think anybody really claims python can't be used to build large software the claim is usually more about how the maintenance costs are just way higher versus a statically typed language

But is that true if the dynamically typed language has type annotations?

They truly and tangibly help somewhat but people give them too much credit.

Re: Backend of Meta Threads is built with Python 3.10

#428

Earlier quoted context omitted.

Please tell me what language they should have written it in then? They have a incredibly successful company. What did ruby do to hurt you personally. This whole line is co oketely irrational. You want thier webapp written in assembly?

Why resort to a straw man? There are plenty of options between "a language that does not even have strong types" and "machine code"? E.g. Elixir is strongly but dynamically typed and you can take it quite far while reaping most of the benefits of typing and not losing velocity as you would with many statically strongly typed languages. Nuance matters. I wouldn't pick Ruby for anything except scripts nowadays. You get…

It's not a straw man, I'm asking him where he stands. How far does he want to take it?

You mentioned Elixir. You literally suggested a language that was created 6 years after Shopify began.

You wouldn't pick Ruby, thats your choice. People are still making billions of dollars with it.

So, since you took up the mantle, what language should they have used 17 years ago when they started the company?

Re: Backend of Meta Threads is built with Python 3.10

#429

Earlier quoted context omitted.

Ruby in 2023 is miles ahead it was 10 years ago.

Yet it's still super behind tech like Elixir or Golang, which are both faster and give you more compile-time guarantees.

Behind how? There are no good web frameworks for Golang at all, and relatively few sites being built with it.

Elixir? Okay, it's a nice language that is also dynamically typed. It has some advantages but good luck finding anyone with knowledge of how to program in it or has even used a functional language before.

I don't personally use Ruby these days but to say it's super behind is just silly. Golang is as similar to Ruby as C++ is.

Re: Backend of Meta Threads is built with Python 3.10

#430

Earlier quoted context omitted.

Why not exactly? What language would you suggest?

Elixir, Golang, maybe even Rust (that one is a hard sell though, there could be a lot of friction at the start and part of it persists even when the project matures).

Literally none of those languages existed when Shopify was launched. Did you expect them to get into a time machine or make that happen or what?
Post reply on HN