News for hackers. Stuff that matters.
Re:Speeding up PHP with the HipHop VM by nicholassmith on Thursday November 29, 2012 @06:55PM (#4851059)
Amazed at all the 'engineer X policy or feature request slackers'. Can't say I'm the biggest fan of Facebook as a service but what their engineers are doing in terms of pushing the state of the art is fantastic.

Out of curiosity if there's anyone involved in Facebook on HipHop, has there ever been a discussion about just shifting from PHP to a more performant language, or is a case of still reaping the benefits of PHP in terms of dropping a developer in and not worrying about skill sets?

Re:Speeding up PHP with the HipHop VM by lbrandy on Thursday November 29, 2012 @07:20PM (#4851159)
> ...about just shifting from PHP to a more performant language

We already shift lots of things out of PHP into more performant (c++, java, etc) languages when we are building services and/or extensions and/or other computationally intensive things.

But I think more to your point (and if not, let me indulge in the strawman), since this comes up frequently on reddit/hn: php is not somehow -uniquely- broken. While PHP might be uniquely broken as a language (ha ha), it's not -uniquely- broken as a platform/runtime. Everything you think is performant is broken at a large enough scale. Put another way, it's not just about the switching costs of rewriting in some other language. If we could magically snap our fingers and convert the entire codebase from php to some other language, that's just the beginning of understanding, tweaking, and occasionally rebuilding everything about the runtime/libraries/etc to make it work.

At the end of the day the language itself is given way too much attention in discussions like this.

Re:Speeding up PHP with the HipHop VM by dkhenry on Thursday November 29, 2012 @10:49PM (#4851737)
So is your argument then that there is so much vested in facebook in dealing with and optimizing for PHP at scale that the real cost would be acquiring that knowledge a second time on a different platform since you _will_ run into scale problems no matter what language you use ?

From my experience in dealing with PHP performance warts. You can make it somewhat fast, but man the insides are so messed up every time I get into the core and try to do anything I want to rip my hair out.

Re:Speeding up PHP with the HipHop VM by nicholassmith on Friday November 30, 2012 @04:34AM (#4852561)
Thanks for the response.

That's a big part of my point, but Facebook seems to have invested a lot in the HipHop compiler and VM as a way to tackle the rough spots from using php. All languages are in their own way rough in places, but I was more curious about whether anyone has gone "this is great but maybe we're at the symptoms and not the cause". But you're right about the total investment being way, way larger than just a code base rewrite.

Interesting to learn that you do use multi languages for different things, a lot gets made of HipHop and Facebooks use of php that I didn't think to guess that different levels of the service might be getting built with different tools, at least not at scale.

Re:Speeding up PHP with the HipHop VM by jebblue on Friday November 30, 2012 @01:42AM (#4852154)
>> Can't say I'm the biggest fan of Facebook as a service but what their engineers are doing in terms of pushing the state of the art is fantastic.

They let people upload comments and pictures. Anything fancy is done mostly in the client or am I overlooking something?

Re:Speeding up PHP with the HipHop VM by j_col on Friday November 30, 2012 @04:33AM (#4852557)
> They let hundreds of millions of people upload billions of comments and pictures

Fixed it for you. Scale makes simple things difficult.

Re:Speeding up PHP with the HipHop VM by nicholassmith on Friday November 30, 2012 @04:38AM (#4852573)
Well, for a non-client example they do a lot of analytics, probably more than we know. Plus they created their own highly optimised php compiler from scratch that isn't just production ready, but battle hardened.

HipHop alone should get Facebook's development team praise.

Re:Speeding up PHP with the HipHop VM by debacle on Friday November 30, 2012 @09:06AM (#4853255)
The PHP language is performant just fine, though it has a few warts (that could be solved by making HHVM support a superset of PHP).

The problem is that the interpreter is shite.