HHVM 3.0.0
hhvm.com
hhvm.com
I know they can be considered bad practice, but in practice you use at at least a couple of them at least once in every project! And you use it because the alternative would be even uglier. (Also, what's the point in having a language with a separate namespace for functions and variables - Perl and Common Lisp being the only other ones I know of - if you can't at least have fun with variable variables and using a string directly as a function :) )
...also, they've "downgraded" PHP's closures mechanism. I mean, with:
return function foo($a, $b) use ($outer1, $outer2) { ... }
...PHP managed to do things better then all other dynamic languages - finally a way of being explicit about what variables from the outer scope you drag into a closure! The Hack guys totally missed the point - they've made everything stricter, but they relaxed this constraint and reverted one of the few good ideas in PHP.Their VM may be awesome, but their language is horrid - they take away the "fun" features of PHP but don't fix any of the bad language design issues. It's like throwing away the baby and keeping the bath water - yeah, the water will keep you alive for a few more days in the desset, but the baby can actually be fun to play with.
When a language makes dick jokes in syntax, you shouldn't expect much.
If we could at least start to see shared hosts offering support for Hack and XHP it would seem more hopeful. (btw, you think PHP devs would like this? I was kinda pondering over it as a business idea...)
That's not quite "shared host easy", but it's still pretty easy to get up and running on heroku if you know what you are doing.
when a sole company creates its own modified "version" of an existing language, and that company has a stated motto of "move fast and break things" why would you possibly trust them to maintain any features/compatibility longer than they themselves see a use for it?
...to be honest, it's the kind of feature that I'd like to see in Javascript, not in PHP, to help me easily scan through callback hells in other people's code. It's true that callbacks don't tend to be abused in PHP and we don't have event labyrinths and long running event driven apps that can grow in memory usage, but these things will crop up, and when they do we'll have one less tool to make code more explicit and easier to read.
I guess the fate of all good ideas that land in PHP is to be ignored, hated and then forgotten :)
Has anyone else played with Hack in a productionish environment? I'm just wondering what deployments and stuff are actually looking like in the world outside of Facebook.
p.s. tutorial that really exposed me to hack is here: http://hacklang.org/tutorial
For that matter, are people mostly using HHVM via fast-cgi?
Although it's not an MVC site, they do a lot of inline HTML ...
You could use a common PHP framework like FuelPHP, Laravel or Kohana. I'm not sure which frameworks are 100% compatible with HHVM, but I think they're all getting quite close to 100% (or may even be at 100% with the 3.0 release). It's fine to mix PHP and Hack in the one project, so you could use a PHP framework and use Hack just for your code.
Are there any benchmarks proving that HHVM improves performance?
Can I get a better performance than my current setup of Nginx + uWSGI + Flask ?
That's really a bad question. It really all depends on where your bottleneck is. If you're benchmarking "Hello World" HHVM will be undoubtedly faster than Python/Flask. But if your bottleneck is in database/io, then you won't see much of a performance gain.
edit: Seeing as how Flask is Python, and HHVM is for PHP, you may have some trouble there.
Compare PHP fannkuch-redux with Hack Vector fannkuch-redux:
http://benchmarksgame.alioth.debian.org/u64/program.php?test...
http://benchmarksgame.alioth.debian.org/u64/program.php?test...
We have an on-call rotation in which one person has the job of cutting (and testing) the internal named release. That person has final choice for the name, often subject to lobbying by the more rap-enlightened members of the team.
/me was pushing for C = Common
I ask because while it is not listed on the github wiki[1] but does appear in the manual[2]. I'm assuming the manual is an oversight, branched from PHP's manual and not pruned.
That said, weak-references are indispensable for certain problems, and I'd love to see them standard.
[1] https://github.com/facebook/hhvm/wiki/Extensions [2] http://docs.hhvm.com/manual/en/book.weakref.php