News for hackers. Stuff that matters.
Re:Next Generation Out of Band Garbage Collection by ziddoap on Saturday November 02, 2024 @07:10PM (#42029921)
I bet the engineers at Instagram were unaware of pythons performance profile when they chose it, you should let them know that they should just switch to a different language.
Re:Next Generation Out of Band Garbage Collection by byroot on Saturday November 02, 2024 @07:16PM (#42029958)
Meta is just a small startup though, they probably don't have enough resources nor the skills to switch to a better language even after they've heard the gospel.
Re:Next Generation Out of Band Garbage Collection by immibis on Sunday November 03, 2024 @03:38AM (#42031865)
The joke is that Facebook literally did, right?
Re:Next Generation Out of Band Garbage Collection by byroot on Sunday November 03, 2024 @03:49AM (#42031902)
Did what? Rewrite Instagram into another language? Do you have any source on this?

Last time I checked they're working on improving Python performance instead (yes I know they forked it into Cinder, but they're trying to upstream their optimizations [0]). Which is very similar to what we're doing at Shopify.

Of course 100% of Instagram isn't in Python, I'm certain there's lots of supporting services in C++ etc, but AFAIK the Instagram "frontend" is still largely a Python/Django app.

The joke is that if Meta thought that replacing all the Python code they have with something else was worth it, they'd have done it already.

[0] https://github.com/facebookincubator/cinder

Re:Next Generation Out of Band Garbage Collection by lucianbr on Sunday November 03, 2024 @04:48AM (#42032133)
> The joke is that if Meta thought that replacing all the Python code they have with something else was worth it, they'd have done it already.

"Worth it" depends on both how much performance improvement you get, and how hard it is to replace. Did you consider maybe the rewriting effort is so humongous that it is not worth doing despite large performance improvements? Thus making the joke not funny at all...

Re:Next Generation Out of Band Garbage Collection by byroot on Sunday November 03, 2024 @05:14AM (#42032209)
That's exactly the joke though. Every time Ruby (or Python) is discussed on HN we get the same old tired question of "why don't they just rewrite in Rust".

But that's some silly engineer tunnel vision, squeezing the very last bit of performance out of a system isn't a goal in itself. You just need it to be efficient enough that it cost you significantly less to run that the amount of revenue it brings you.

I can bet you that moving off Python must have been pitched dozens and dozens of time by Meta engineers, but deemed not worth it, because execution speed isn't the only important characteristic.

So yes, I find it hilarious when HN commenters suggests companies should rewrite all their software into whatever is seen as the most performant one.

Re:Next Generation Out of Band Garbage Collection by IshKebab on Sunday November 03, 2024 @07:44AM (#42032737)
It's usually dismissed because companies think short term, and switching languages is a project with huge short term disadvantages and huge long term advantages.
Re:Next Generation Out of Band Garbage Collection by HumanOstrich on Sunday November 03, 2024 @02:14PM (#42035354)
It's usually dismissed because it's almost always a huge strategic blunder.
Re:Next Generation Out of Band Garbage Collection by debugnik on Sunday November 03, 2024 @04:48AM (#42032134)
I think they meant Facebook switched their PHP code to Hack and HHVM, their own PHP-like language and implementation.
Re:Next Generation Out of Band Garbage Collection by IshKebab on Sunday November 03, 2024 @04:24AM (#42032015)
I don't know if you're joking or not but that is exactly true. Meta went as far as creating their own PHP engine and then a new PHO compatible language because they didn't have the resources to switch from PHP.

Instagram is presumably in the same position. Switching language is basically impossible once you have a certain amount of code. I'm sure they were aware of the performance issues with Python but they probably said "we'll worry about it later" when they were a small startup and now it's too late.

Re:Next Generation Out of Band Garbage Collection by eru on Sunday November 03, 2024 @05:42AM (#42032312)
Well, Facebook also created their own hacked up version of PHP (called Hack) that's presumably easier to migrate PHP to.

Hack is actually surprisingly pleasant, basically about the best language they could have made starting from PHP. (I know, that's damning with faint praise. But I actually mean this unironically. It has TypeScript vibes.)

Re:Next Generation Out of Band Garbage Collection by krapp on Sunday November 03, 2024 @05:51AM (#42032348)
I was excited about Hack when it came out. Unfortunately PHP took just enough from it to kill it. I gave up on it once Composer stopped supporting it, after backwards compatibility with PHP no longer became a goal.

IMHO Hack's best feature was native support for XHP... which (also unfortunately) isn't something PHP decided to take.

Re:Next Generation Out of Band Garbage Collection by eru on Sunday November 03, 2024 @05:56AM (#42032356)
I only used Hack when I was very briefly working for Facebook. (And I used PHP once before nearly 20 years ago by now for some web site I had 'inherited', back when PHP was truly an awful language)
Re:Next Generation Out of Band Garbage Collection by Twirrim on Sunday November 03, 2024 @01:24PM (#42034943)
Hack really gave PHP/Zend the kick up the arse that it seemed to need.
Re:Next Generation Out of Band Garbage Collection by eru on Monday November 04, 2024 @12:46AM (#42038869)
I guess like Scala (et al) and Java? C++ also seems to be learning things from Rust these days.
Re:Next Generation Out of Band Garbage Collection by IshKebab on Sunday November 03, 2024 @07:11AM (#42032614)
Yes I mentioned that.
Re:Next Generation Out of Band Garbage Collection by electricwire on Saturday November 02, 2024 @07:22PM (#42029979)
They may well have been initially, its a pretty puzzling choice
Re:Next Generation Out of Band Garbage Collection by worik on Sunday November 03, 2024 @01:33AM (#42031339)
> I bet the engineers at Instagram were unaware of pythons performance profile when they chose it,

Is the Instagram stack Python? I doubt it, but stranger things have happened

I suspect it is actually some derivative of Apache, or Nginx. Something sensible

Re:Next Generation Out of Band Garbage Collection by httgp on Sunday November 03, 2024 @02:42AM (#42031699)
Instagram is built with Django.
Re:Next Generation Out of Band Garbage Collection by orf on Monday November 04, 2024 @03:24AM (#42039620)
You expect that the instagram stack is something sensible, such as only a web server? What?