Ask HN: State of PHP at Facebook

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • HHVM

    A virtual machine for executing programs written in Hack.

  • Though it is internally-built, Hack is already open source at https://github.com/facebook/hhvm/.

    FB uses a pretty wide array of languages internally -- I don't know if they release statistics publicly, but you can filter/search their open-source projects by language at https://opensource.fb.com/projects/#filter.

  • ent

    An entity framework for Go

  • For anyone interested, it looks like there's an open-source version (close, at least) to Ent at https://github.com/ent/ent.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Boston-PHP-Meetup-Examples

    Boston PHP Meetup examples

  • Hack is open source.

    My understanding from a talk back in 2014, is hack was developed because of frustrations with PHP evolution. Honestly I think it may have lit a fire under the PHP developers because php7 had significant speed improvements.

    Talk:

    "Facebook recently introduced and open-sourced Hack (https://code.facebook.com/posts/264544830379293/hack-a-new-p...), a gradually-typed programming language for HHVM that interoperates seamlessly with PHP. Hack builds the bridge between the dynamically and statically-typed worlds – providing code correctness while maintaining a fast feedback loop. Facebook is committed to working with the community to improve and refine the Hack language, to help interested developers convert to Hack (https://code.facebook.com/posts/264544830379293/hack-a-new-p...), and to narrow the HHVM compatibility gap with PHP5 and popular frameworks."

    https://www.meetup.com/bostonphp/events/184609542/

    Slidedeck on Hack (https://github.com/gabelevi/Boston-PHP-Meetup-Examples/blob/...)

  • xhp-js

    Easily create JS controllers for XHP elements, and XHP wrappers for React elements

  • There is: it's called XHP (https://docs.hhvm.com/hack/XHP/introduction).

    That said, I'm not sure how you'd go about server-side rendering React from Hacklang, as it seems that the open-source solution to do so is no longer supported (https://github.com/hhvm/xhp-js).

  • hack-codegen

    Library to programatically generate Hack code and write it to signed files

  • There's also https://github.com/hhvm/hack-codegen/tree/master/examples/do..., along with the article at https://engineering.fb.com/2015/08/20/open-source/writing-co...

    This is modern Hack code, but not representative of the state of the Ent framework nowadays - ent/ent is closer design-wise, but not usable from Hack.

  • user-documentation

    Documentation for those that use HHVM and write Hack code.

  • > Are there any large Hack codebases I can explore?

    depends what you mean by 'large' - perhaps https://github.com/hhvm/user-documentation ?

    > Does anyone know if FB tracks changes to PHP so Hack is "up to date"?

    No, for the most part, Hack no longer considers PHP 'upstream'. Exceptions are things like security fixes to extension functions, if that particular extension function was derived from PHP.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts