We’d like to get more developers in the community using Hack. But we know there’s been something lacking: a good, consolidated resource for learning Hack and getting the most use out of it. We have documentation online, but it’s more of a reference than a tutorial.
I have good news on that front: for the past few months, I’ve been writing a book about Hack and HHVM, and starting today, you can get an early look at it through our publisher, O’Reilly Media.
This is an Early Release — it’s not finished yet. Not all of the chapters are available yet, and the ones that are available might still change before final publication. The technical content is solid, though, so you should be able to read what’s there and go start writing Hack. The book is about HHVM/Hack version 3.6 LTS, which was released in March.
Buying now gets you an ebook with the content as it is now, plus ongoing updates as more chapters become available, and the final ebook when it’s published this summer.
We’d like your feedback on the early release! Questions, comments, concerns: all welcome. If you’re still confused about anything after reading about it in the book, please let us know so we can make it better. Send your feedback to firstname.lastname@example.org.
- Kristian: I am a big fan of PHP and so far I love most of the changes I see in Hack. I am curious to know if the editor used in the tutorial is available as source code (with the nifty intellisense-like funcionality). The reason I ask: I got on the net/learned to code back in 1993 when I discovered text-based MUDs. I learned C/C++ after falling in love with LPC (the interpreted language of the MUD I was on). I would like to create a new generation of web-based MUD using a restricted subset of Hack where other users can alter/extend the codebase on-line.
- Josh Watzman: We're working on a full-featured Hack IDE. There's more information at http://nuclide.io/. The tutorial demo is a really really really basic web editor. I certainly wouldn't want to use it as an IDE! If you want to play around with it, though, it's made of a few components: - The editor itself is CodeMirror. - The typechecker core is a JS cross-compile of the actual Hack typechecker. Source for the JS bits are here https://github.com/facebook/hhvm/tree/master/hphp/hack/src/js but most of it is just the normal Hack typechecker. - It's glued together with a bit of JS webworker magic, see http://hacklang.org/wp-content/themes/hack/demo/hack_demo.js and http://hacklang.org/wp-content/themes/hack/demo/hack_demo_worker.js But I'd just wait for Nuclide :)
- PHP Annotated Monthly – May 2015 | JetBrains PhpStorm Blog: […] Hack & HHVM book by Owen Yamauchi has reached early release stage, so if you’re interested in using Hack/HHVM in your projects, that might be a good read. […]