Hack Community Roundup

Posted on May 9, 2014 by

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!)

Hack logo

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.
  • Brian Scaturro has begun work on HackUnit, an xUnit testing framework written in Hack.
  • For deployment, the folks at Heroku have first-class support for HHVM and Hack, and have contributed instructions to our Hack example site on how to get it running on Heroku.

Presentations

Blog Posts

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.

Posted in Hack Language | Leave a reply

18 Responses to “Hack Community Roundup”

  1. Utomo says:

    How about releasing tools to convert php script to hack?
    Or help popular opensource to migrate. Such as opencart

  2. Nino says:

    Not that big yet, but not to forget: the german speaking hack and hhvm support forum. http://www.fbhack.de

    • Josh Watzman Josh Watzman says:

      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.

  3. […] awesome news about Hack and HipHop in the current blog post of the official HipHop/HHVM dev […]

  4. Adrian Budau says:

    Would you consider added polling to hh_server next to inotify? Virtualbox shared folders don’t trigger inotify notifications properly so this would be very useful :-)

    • speg says:

      Is this why I have to manually restart and do hh_client check each time?

    • Josh Watzman Josh Watzman says:

      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.)

      • Adrian Budau says:

        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.

      • Adrian Budau says:

        It seems I can’t edit comments so I’ll make anew one: I would not require this if hh_client and hh_server could be more easily installed (i.e. not require the whole of hhvm).

        • Josh Watzman Josh Watzman says:

          Having hh_client/hh_server without HHVM isn’t terribly useful, since you need HHVM to actually run your code! Or am I missing something about the use case you have in mind?

          • Adrian Budau says:

            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.

            I hope was clear enough :-)

      • speg says:

        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.

  5. 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.

    Do you have plans about supporting this at least as optional feature?

    • Josh Watzman Josh Watzman says:

      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.

Leave a Reply