Tag Archives: hhvm

Some C and some C++ (hhvm).

Nice day today. Just look at this fog:

I guess that's how San Francisco looks just about any average day

Really nice day today. Too warm to go shredding though. Well, i guess you can’t always get what you want.

Alright, back to the coding stuff. Learning C. Made couple exercises. Nothing special. I bet pointers are much more fun than just writing a function that returns value through it’s parameter (character array). Scratched the surface here.

assert.h is really helpful module. So i can write my functions and then put all tests in main() and be sure they work. Poor’s man unit testing. But since i haven’t tried writing my own modules that’s all i have now.

Next thing is hhvm. I’ve managed to compile it overnight. And it even works. I was surprised that there is a huge lag. Just invoking it on empty PHP file


takes around 300ms. Just PHP 5.3.10 (which installed on my virtual ubuntu box) is 3 times faster on this not particularly hard task. I was also trying to make measurements with ‘fold‘, but picture remained unchanged. Which does not make any sense, except maybe that i am not testing it properly. Well, will see how it will work in server mode later.

Here is a bunch of documents on how to install hhvm on different systems: https://github.com/facebook/hhvm/wiki/_pages. I am pretty sure that hhvm will get only better and we will eventually all switch to it. But not for another couple years for sure.

That’s it for today.

Lazy day? Friday!

Very unproductive day today. I had a plan to play with hhvm on Openshift. But two problems:

  1. the gcc there is older than hhvm needs; and
  2. when building new gcc i hit 80000 user files limit.

I still not quite sure how they want others to build cartridges for the platform.
End of story here for now.

But, i’ve managed to get hhvm erm… building on the Ubuntu virtual machine. Well, frankly speaking it is still building, and i suppose this will happen for another hour or so.

But, i’ve been reading the C book meantime and doing some exercises. Which is very helpful. Now i can write valid C programs like this one:


int main(void) {
      { {{ printf("%s", "I was surrounded by curly brackets\n"); }} }
    } {{{ printf("%s", "But managed to escape\n"); }}}
  return 0;

Meanwhile hhvm build progress have come up to 60% and my laptop battery level is 7%. I wonder who will win?..

That’s it for today.

Here is how my laptop saluted me in the morning couple days ago:
Not as fun for me though.