HNHacker News
TopNewBestAskShowJobs

phooji

41 karma · joined January 16, 2015

submissionscomments
phooji··on Zoncolan: How Facebook uses static analysis to detect, prevent security issues
Zoncolan and SPARTA both use abstract interpretation at their core, but as far as the code/implementation goes they are mostly unrelated. Zoncolan is built on top of the Hack type checker (https://hacklang.org/), which means that it's largely written in OCaml.
phooji··on Pyre: Fast Type Checking for Python
Pyre is faster in some circumstances.

With that said, the real answer is 'it depends', and it may well be the case that mypy serves your needs better.

phooji··on Pyre: Fast Type Checking for Python
I think (2) is the overriding concern: we're getting really great results with the static analysis tools we've built internally on top of the Hack type checker. Building a similar tool on top of mypy would've required fairly invasive changes; we decided to use the Hack type checker infra instead.

Full disclosure: I worked on the Hack type checker briefly, a long time ago :)

phooji··on Pyre: Fast Type Checking for Python
Please send us a pull request if this is something you'd like this to live in the pyre-check repo!
phooji··on Pyre: Fast Type Checking for Python
You can run Pyre without using watchman if your editor-of-choice supports LSP -- the two modes are basically complementary. You can also run `pyre check` in non-incremental mode, though that may be slower depending on the size of your codebase.
phooji··on Pyre: Fast Type Checking for Python
Good question [I am the 'Pieter' on that blog post]. There will be a talk at PyCon that covers parts of this. It comes down to two reasons:

1) Performance. We needed something that would consistently work quickly on Instagram's server codebase (currently at several million lines).

2) We are building deeper semantic static analysis tools on top of Pyre. We've built some of these tools for Hack/PHP already, so following the Hack type checker's architecture is the best way for us to achieve this.

phooji··on Pyre: Fast Type Checking for Python
https://pyre-check.org/ roughly covers it.