3 ms·
They ended up compiling PHP to assembly! Facebook is a company that will go to ridiculous lengths to avoid rewrites.
by disgruntledphd2 3y ago
They ended up compiling PHP to assembly! Facebook is a company that will go to ridiculous lengths to avoid rewrites.
- that_guy_iain 3y agoI 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.
- snapetom 3y agoWas 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.
- pjmlp 3y agoYes, the 2nd rewrite for a VM, where the JIT compiler turned out to be quite good versus HipHop, and development focus switched to HHVM.
- disgruntledphd2 3y agoI was thinking about HHVM, which I believed was essentially assembly for a VM. Am I wrong on that?
- snapetom 3y agoNo, 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.
- jarjoura 3y agoI 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.
- disgruntledphd2 3y agoI 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.
- nikanj 3y agoRewriting 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?
- lightbendover 3y agoEvery company should go to ridiculous lengths to avoid rewrites. Rewrites of significant tech (as a proxy, lets say 100+ kloc) spell doom. Doom.
- engcoach 3y agoIt’s definitely not for the timid or mediocre
- Tainnor 3y agoEvery 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).
- jarjoura 3y agoThis 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.
- jononomo 3y agoI remember when I used to rewrite stuff before fully understanding the drawbacks of what I was rewriting it in.