Live data from Hacker News

HipHop VM: now at 98.5% PHP framework parity, 16% faster

hhvm.com

91–100 of 112 posts

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#91
post #82
post #36

Earlier quoted context omitted.

This was making the rounds recently: http://news.php.net/php.internals/70691 Basically, if you use PHP you're part of the largest computer joke in history.

"PHP you're part of the largest computer joke in history" <-- Good Luck with Scaling Ruby/Python

Python scales quite fine actually (Disqus and YouTube use it for a majority of core development). It's all about the tech behind the scenes (uWSGI, Tornado, Ngnix, memcache/redis, etc), not the language itself (just as it is with PHP). Try scaling PHP if only using Apache Prefork instead of mod worker + php-fpm or Ngnix + php-fpm and you'll see what I mean.

I have no problem with using either PHP or Python on a particular project, depending on what is involved. I wish PHP threads would show a bit more maturity/pragmatism on both sides of the aisle sometimes.

http://yougov.github.io/pycon/slides/

http://highscalability.com/blog/2012/3/26/7-years-of-youtube...

http://www.slideshare.net/jinaljhaveri/scaling-python-webapp...

http://blog.disqus.com/post/62187806135/scaling-django-to-8-...

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#92
post #10

Earlier quoted context omitted.

That's more interesting. How much faster is hhvm overall?

The Wikipedia article ( https://en.wikipedia.org/wiki/HipHop_for_PHP ) says "up to 6x", however, about 2x speedup versus plain PHP was a more typical experience for me when I used it before.

So basically it's as fast as using PHP with an opcode cache?

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#93
post #57

Earlier quoted context omitted.

I'm actually a tad worried about what will happen to all the people who coded primarily PHP for their whole life when that roof finally collapses. Seems like it might look a bit like what happened with Symbian / Nokia -- they also had a massive cognitive dissonance over the quality of the developer environment, and when the system finally broke, it broke quickly and in a nasty way. Then again, it's not impossible to…

I'm curious how you came to the conclusion that something that occupies, by conservative counts, over 75% of the web as being "a blatant fallacy". Symbian / Nokia went the way of the dodo because the end user fell in love with the ease of use of the iPhone. In our case, the end users are people who use the internet, not the ones writing code. Your argument is about as ridiculous as I can imagine, with no real data to…

Calling each and every criticism of the language you like as "frothing hatred" (as I've seen PHP folks do quite a lot lately) reeks of cognitive dissonance. Perhaps you should get over it.

Also, the end users of a programming language are the programmers, not the users of the application. 99% of users could not care less what's under the hood just as long as it works.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#94
post #90
post #53

Earlier quoted context omitted.

No. This blog post is about HHVM. The PHP to C++ translator was removed from the HHVM source tree back in February. (I'm an HHVM team alum.)

It was a reply to a now deleted comment! It was about social network from spain. He provided a link to an article that talked about the old HpHp (HipHop C++ translator). I pointed it out, and then the guy deleted the comment entry, as it seems. (edit: this was the article the other guy posted yesterday: http://corporate.tuenti.com/en/dev/blog/the-epic-tale-of-mov... )

No worries, sorry for the confusion.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#95
post #72

Earlier quoted context omitted.

Don't take this the wrong way, but you're actually developing new applications with CodeIgniter? Ugh...

Yeah, Laravel is pretty much the modern framework for people who can't divorce themselves from CodeIgniter.

What does Laravel do that other frameworks like FuelPHP and Yii don't do? I hear a lot about it but don't hear a lot about why it's so much better than others.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#96

Does anyone have an easy method of testing HHVM on your website? I was thinking of recording the production requests for x amount of time and replaying them on HHVM so you could see if responses are identical, there are no crashes, state of the database is same afterwards, etc.?

Recording requests is a good idea.

Another idea once you're reasonably comfortable and have done a smoke test is to direct a small amount of your traffic/users (say 1%) to the HHVM version, while closely monitoring its error log.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#97

I wonder how hard it would be (for me) to take php and change all function names to be consistent. All PascalCase and spelled out (no awful abbreviations). Then download the documentation and change it there as well.

While you're at it, convert intrinsic types to objects too, while retaining backwards compatibility:

    $foo = 'bar';
    echo $foo->length(); // 3
    echo strlen($foo); // 3
This would get rid of a lot of the confusion around string function names.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#98

Is there a good tutorial on installing HHVM on server and then running your PHP app?

Yes, on the official wiki: https://github.com/facebook/hhvm/wiki/_pages

First read the page related to your Linux/BSD e.g. "Prebuilt Packages on Ubuntu 12.04"

Then read the page "Using nginx as Front Server to HipHop"

As last step read this blog article how to write/edit the config file (/etc/hhvm.hdf): http://www.hhvm.com/blog/113/getting-wordpress-running-on-hh...

Read this and copy things you need from the documentation: https://github.com/facebook/hhvm/blob/master/hphp/doc/option...

This is how I got HHVM working.

To sum up:

  * you need a little bit of basic Linux knowledge
  * install Linux or BSD (e.g. Ubuntu 12.04 LTS) (64-bit)
  * install Nginx (or since last week HHVM also supports Apache with FastCGI)
  * install HHVM
  * install MySQL or MariaDB, etc.
  * create a web directory where you place your php files
  * edit the hhvm.hdf (config file)
  * start hhvm
Btw. a lot of blog posts you find with Google search are still about the old HpHp (the former and now outdated PHP to C++ translator also called HipHop from FB)... so better skip third party blog posts older than January 2013 ;)

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#99

Earlier quoted context omitted.

The Wikipedia article ( https://en.wikipedia.org/wiki/HipHop_for_PHP ) says "up to 6x", however, about 2x speedup versus plain PHP was a more typical experience for me when I used it before.

So basically it's as fast as using PHP with an opcode cache?

No, 2x speedup relative to PHP with an opcode cache.

Re: HipHop VM: now at 98.5% PHP framework parity, 16% faster

#100
post #76

Earlier quoted context omitted.

yeah , some people think it's easy to understand what strstr does...

...like everyone who has learned C or its derivatives. It's just part of the vocabulary of the language. You could as well ask "what's a list comprehension " in Python, for example.

Set comprehension is a standard mathematical term (http://en.wikipedia.org/wiki/Set-builder_notation). List comprehension is a fairly natural name given that.
Post reply on HN