News for hackers. Stuff that matters.
Re:Back end of Meta Threads is built with Python 3.10 with s... by disgruntledphd2 on Thursday July 06, 2023 @01:31PM (#36619653)
They ended up compiling PHP to assembly! Facebook is a company that will go to ridiculous lengths to avoid rewrites.
Re:Back end of Meta Threads is built with Python 3.10 with s... by that_guy_iain on Thursday July 06, 2023 @01:38PM (#36619774)
I thought they tried it multiple times. The problem is they had so many developers writing new code any rewrite attempt would fall behind super quickly?

So they created their own language Hack so allow a slow transfer from PHP to Hack. Which is basically the idea behind Kotlin.

Re:Back end of Meta Threads is built with Python 3.10 with s... by snapetom on Thursday July 06, 2023 @02:42PM (#36620807)
Was there a separate initiative for assembly, or are you thinking about HipHop? HipHop was for C++ and got a lot of attention back when it was released.
Re:Back end of Meta Threads is built with Python 3.10 with s... by pjmlp on Thursday July 06, 2023 @02:49PM (#36620888)
Yes, the 2nd rewrite for a VM, where the JIT compiler turned out to be quite good versus HipHop, and development focus switched to HHVM.
Re:Back end of Meta Threads is built with Python 3.10 with s... by disgruntledphd2 on Thursday July 06, 2023 @04:32PM (#36622519)
I was thinking about HHVM, which I believed was essentially assembly for a VM. Am I wrong on that?
Re:Back end of Meta Threads is built with Python 3.10 with s... by snapetom on Thursday July 06, 2023 @04:37PM (#36622590)
No, you're right. HHVM was the 2nd iteration. I was thinking of the first project, which was for C++. Looking at wikipedia, that was called HPHPc.
Re:Back end of Meta Threads is built with Python 3.10 with s... by jarjoura on Thursday July 06, 2023 @03:07PM (#36621181)
I know you're being hyperbolic, but during my time there, your impact was measured only on measurable things like performance gains but never on lines of code. So engineers would always go in the direction of whatever gets you the biggest win.

Sometimes that actually meant rewriting the thing from scratch, and other times that meant adding something else as a middleware to prevent touching the original thing.

For the most public success story, React was a complete rewrite of the thing before it, for example.

Re:Back end of Meta Threads is built with Python 3.10 with s... by disgruntledphd2 on Thursday July 06, 2023 @04:31PM (#36622498)
I spent five years there, and made that joke constantly.

It's mostly hyperbole but there's definitely a kernel of truth to it. I generally dislike rewrites and I wonder if FBs approach influenced me more than I realized at the time.

Re:Back end of Meta Threads is built with Python 3.10 with s... by nikanj on Thursday July 06, 2023 @04:14PM (#36622143)
Rewriting in hip-tech-du-jour is for startups with lots of funding and little of traction.

Why would a massively successful company toss a stick in their own spokes by tearing the product to ground?

Re:Back end of Meta Threads is built with Python 3.10 with s... by nobleach on Thursday July 06, 2023 @04:47PM (#36622754)
But it's actually a _really bad_ strategy for a startup! It'll be realized the moment you try to hire for hip-tech-du-jour. Most likely, you don't even have the problem that hip-tech-du-jour claims to solve.
Re:Back end of Meta Threads is built with Python 3.10 with s... by jarjoura on Saturday July 08, 2023 @02:05PM (#36647015)
TIL what hip-tech-du-jour is lol
Re:Back end of Meta Threads is built with Python 3.10 with s... by lightbendover on Thursday July 06, 2023 @10:27PM (#36626276)
Every company should go to ridiculous lengths to avoid rewrites. Rewrites of significant tech (as a proxy, lets say 100+ kloc) spell doom. Doom.
Re:Back end of Meta Threads is built with Python 3.10 with s... by Tainnor on Friday July 07, 2023 @02:48PM (#36636608)
Every company? What about banks that have old codebases running on Cobol?

I'm also very skeptical about big bang rewrites, but there are points where you need to migrate off certain tech. Ideally you can make that transition piece by piece though, but that also introduces its own set of problems (now you have two systems and the new one has to inherit some of the baggage of the old one in order to be compatible).

Re:Back end of Meta Threads is built with Python 3.10 with s... by jarjoura on Saturday July 08, 2023 @02:15PM (#36647142)
This is exactly the kind of innovation I see coming out this current AI boom we're in. Take legacy codebases and spit out complete rewritten versions in whatever language that not just translates, but takes it much further and re-interprets it on top of modern architecture designs. It completes it with tests and a basic UI, or whatever makes sense for the project.

Those systems are well understood and well tested, so it's not cost effective at the moment to embark on a complete rewrite. Current AI coding systems are also very unreliable, so it's just a matter of time before those two meet on the graph and voila, another boom in moving the legacy world into safe languages.

Re:Back end of Meta Threads is built with Python 3.10 with s... by engcoach on Saturday July 08, 2023 @01:26PM (#36646544)
It’s definitely not for the timid or mediocre
Re:Back end of Meta Threads is built with Python 3.10 with s... by jononomo on Friday July 07, 2023 @07:44AM (#36630242)
I remember when I used to rewrite stuff before fully understanding the drawbacks of what I was rewriting it in.