6 ms·
HHVM 3.0.0
- alexgartrell 13y agoSo coincidentally I work at Facebook and know a bunch of these guys pretty well, but I don't actually interact with the Hack stuff at all (as I work in infrastructure doing flash and network stuff, primarily). I recently played around with the Open Source hack stuff and I installed it on my VPS. 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 http://hacklang.org/tutorial
- adamors 13y agoConsidering that you can convert PHP files to Hack by just changing the opening tag, I think it would be very similar to the way HHVM is used currently.
- alexgartrell 13y agoSorry, to be clear I'm more curious about how it's integrated with version control and how things like MVC are done. I really haven't got a clue. For that matter, are people mostly using HHVM via fast-cgi?
- adamors 13y agoOh I see. I think the best answer to your question is the Hack example site https://github.com/hhvm/hack-example-site https://github.com/hhvm/hack-example-site. It contains the source for the Hack site along with build instructions. Although it's not an MVC site, they do a lot of inline HTML ...
- kmavm 13y agoYeah, almost everyone in the real world is using it via FastCGI. People have a huge investment in the configuration and operation of their existing http server (nginx or apache).
- dan15 13y agoI work at Facebook as well, but mainly in JavaScript so I haven't done a lot of PHP either :) 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.
- huntedsnark 13y agoDonald Glover is his real name, as a rap artist he is Childish Gambino.
- jholly 13y agoFacebook is a roll! This, react, warp! Bravo guys!
- adamors 13y agoWhile the release names based on rappers is quite a fun idea, I don't get why they didn't go for people who are, you know, good at hip hop. I mean 50 cent and Childish Gambino? And especially next to Em and Ghostface. Or is this a good release/bad release kind of thing?
- noblethrasher 13y agoI can’t say much about the others, but 50-cent has a famously hardcore work ethic, for that alone he’s worth celebrating.
- hanley 13y agoSame with Eminem. He and Dre are obsessive in their work. "In 2006, Snoop Dogg told the website Dubcnn.com that Dr. Dre had made new artist Bishop Lamont re-record a single bar of vocals 107 times." [1] https://en.wikipedia.org/wiki/Dr._Dre#Work_ethic https://en.wikipedia.org/wiki/Dr._Dre#Work_ethic
- sehr 13y ago> Don't be mad cause I'm doing me better than you doing you
- elgenie 13y ago(I work on HHVM/Hack at FB) 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
- Terr_ 13y agoQuick sidequestion: Does HHVM support the Weakref extension? 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 https://github.com/facebook/hhvm/wiki/Extensions [2] http://docs.hhvm.com/manual/en/book.weakref.php http://docs.hhvm.com/manual/en/book.weakref.php
- ZeroGravitas 13y agoI noticed the other day that PHP has 30% code coverage. Is HHVM working to improve that (and pass the same tests, bug for bug) or is it relying on the unit tests of frameworks and packages?
- dcc1 13y agoSo what IDE to guys at facebook use for HACK? My favourite editor PHP Storm doesn't support it, yet.
- jwatzman 13y agoMany engineers here use vim and emacs. We ship integration scripts for both of them -- in `/usr/share/hhvm/hack` in the Debian and Ubuntu binaries, in `hphp/hack/editor-plugins` in the github repo.
- cookerware 13y agoWhat server can I use with HHVM to get the performance boost claimed in the video? Does it have a built in HTTP server? Are there any benchmarks proving that HHVM improves performance? Can I get a better performance than my current setup of Nginx + uWSGI + Flask ?
- jhgg 13y ago>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.
- thefreeman 13y agoIt says it works via FastCGI, so you should be able to use any web server you want. edit: Seeing as how Flask is Python, and HHVM is for PHP, you may have some trouble there.
- igouy 13y agoPresumably it depends on the task, on how much the previous code-tuning prevents hhvm jit, on how much the code is changed with type hints, ... Compare PHP fannkuch-redux with Hack Vector fannkuch-redux: http://benchmarksgame.alioth.debian.org/u64/program.php?test=fannkuchredux&lang=php&id=1 http://benchmarksgame.alioth.debian.org/u64/program.php?test... http://benchmarksgame.alioth.debian.org/u64/program.php?test=fannkuchredux&lang=hack&id=1 http://benchmarksgame.alioth.debian.org/u64/program.php?test...
- nnq 13y agoWhat worries me is the large list of 'unsupported PHP features': http://docs.hhvm.com/manual/en/hack.unsupported.php http://docs.hhvm.com/manual/en/hack.unsupported.php . 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.
- stephenr 13y agoThe list of "unsupported" features is attrocious but not suprising. When a language makes dick jokes in syntax, you shouldn't expect much.
- nnq 13y ago==> jokes aside, they are pulling in a very different direction from the one of the core PHP devs... this alone makes me expect less from the entire PHP system as a whole. They just made the PHP equivalent of Perl 6 vs Perl 5. But at least they are using their "Perl 6" and it works fine for them. 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...)
- thefreeman 13y ago