In the weeks since the Hack open source launch and the Hack developer day, there has been a lot of information, code, blog posts, etc coming from our nascent community. To us on the team, it’s been incredible and encouraging to see the community reception to Hack. Here are some of the highlights of the things we’ve seen come out of our community. (And we almost certainly haven’t seen everything, so please let us know in the comments what we’ve missed!)

Github Projects

The folks at PocketRent, some of the earliest adopters of Hack, have a small Hack framework. Even if you aren’t interested in using it directly, there are great examples of everything from XHP to async functions.

Victor Berchet has released a Vagrant configuration to help get HHVM and Hack up and running in a VM as quickly as possible. Many folks have had trouble getting HHVM and Hack up and running, and while we’re trying to improve that process moving forward, if you’re one of those folks, you may want to give it a try.

Emre Sokullu built and released hack-mvc, a small MVC framework for Hack. He also wrote a blog post discussing his motivation behind using HHVM and Hack.

Before the Hack release, Victor Berchet wrote a series on the Hack language (part 1, part 2). He’s got lots of good information on the Hack type system and what it might mean for current PHP developers. Just keep in mind it was written before the official release, and so many of the things listed as “not documented” should in fact now be well documented.

Again, thanks to everyone who has created the information above, and to everyone who is already trying Hack. I’ve personally always been excited for what this technology could do to improve developers’ lives, and am looking forward to helping to grow the fledgling Hack community.

If you or anyone is running into any problems, please let us know! For bugs and problems, feel free to file an issue on github. For general questions, we monitor the “hacklang” StackOverflow tag, and members of the Hack team are also typically on IRC (#hhvm on Freenode) during the workday US Pacific time.

I actually wasn’t aware of that one, thanks for pointing it out! I sadly don’t speak German myself, but I’m pretty sure at least one member of our team does, so we’ll make sure to have someone check it out.

This is something we’re considering, yes. For now, you may want to try http://docs.vagrantup.com/v2/synced-folders/rsync.html — it will hopefully generate the right inotify events and fix the problem, though I haven’t tried it personally. (You can also move your code out of the VirtualBox share.)

If you want a one-shot batch mode, we do have an implementation of that — you can run “hh_server –check path/to/www/dir”

Are you using VirtualBox for any inherent reason, or are you on an unsupported OS and just need it to get Linux running? What OS are you using? We’re trying to prioritize building a “less smart” incremental mode vs. proper OS X support. (Windows will come somewhat later and is more involved.)

I tried using rsync. With auto-sync it works more or less reliably (if you run scripts that modify a large number of files auto-sync is slow sometimes).
I use VirtualBox because at this moment it is still far more easier to set up hacklang on ubuntu than everything else. I am on OSX on the moment. +the ability to keep a project completely sandboxed.

I have hhvm installed in my VM (with all of its dependencies). That’s where my server is set up. But I’m coding from my master OS (from outside). Here I don’t need the whole power of HHVM, just the type checker.

Thank you! I was so frustrated when I wasn’t seeing the type checker catching my errors. I have confirmed that making changes inside my VM works. As does setting up the VM to sync with rsync. Though it’s a bit awkward having to do the extra step of `vagrant rsync-auto`.

I feel like I am missing something though.. Is hh_client supposed to alert your errors as soon as a change is detected? Right now I am having to do `hh_client` each time I want to check. If not, how is that any different thant the `hh_server –check path/to/www/dir` you mentioned earlier.

I can’t speak for the parent, but I am using vagrant & virtual box to manage development environments that are similar to production. I’m not sure having proper OS X support would help much, because I would still rather develop on a VM so that I could stay as close to production as possible.

Running hh_client is how you check for Hack errors. It just queries the server for the current error list, so if you want to run it automatically, you need to set that up yourself. There are a couple ways to get it to run automatically:

I’ve looked video of talk about PHP -> Hack convertion. And I have a question about PhpDoc sections. As I understand – you ignore them, but most of code I write at least last year contains proper PhpDoc sections that you can definitely use during convertion.

We don’t plan to typecheck them as-is right now. Here is a long thread where I discuss our thoughts on different conversion strategies, including docblock comments: https://github.com/facebook/hhvm/issues/2236. (Short version: type-checking them isn’t enforced by the runtime, which is dangerous.)

Using them to aide a conversion effort is potentially useful. The challenge there is trying to parse the docblock comments, since everyone writes them slightly differently, and then get that into a format that makes sense in the Hack type system.