Hacker News new | ask | show | jobs
by nickagliano 410 days ago
Interesting to see astral come out with this right around facebook’s release of “Pyrefly, a faster Python type checker written in Rust”.

Not making any sort of ethical statement, just interesting that rust keeps eating the python and JS tooling worlds.

7 comments

> Interesting to see astral come out with this right around facebook’s release

Astral announced they were building a typechecker back in January: https://x.com/charliermarsh/status/1884651482009477368

Also interesting, pyrefly uses Ruff’s parser!

https://github.com/facebook/pyrefly/blob/a8626110da034f8e513...

Astral announced it last year I think, so it's been a long time coming.
Pyrefly is a rewrite of Pyre, a Python typechecker which has been around for 4-5 years. Pyre is the strictest type checker I've used, compared to mypy, but its kind of a pain to set up.
Yes, because this is precisely what rust has proven it is exceptional for: tooling that needs to be very correct and strives to be fast.
language tooling is a sweet spot for rust, for sure.
Yeah.. Have either of the ty / pyrefly teams reached out to the other? I feel like the community does not really need two fast python type checkers.

(However, vc-backed astral probably need control over theirs to keep monetization options open, and Facebook probably need control over theirs so it can be targeted at Facebook's internal cool-but-non-standard python habits... Sigh.

Why do we have nice things? Money. Why can't we have nice things? Also money.)

Yes, we've talked; I know a number of the pyrefly devs well. Ty had already been months in development when pyrefly development started. We discussed collaboration, but they decided they needed to do their own thing in order to move quickly and ensure it would serve their needs, which is totally reasonable.
It looks like both projects seem to use Ruff at their core, is there any documentation that describes the differences in each project's approach?
I believe the only sharing is parsing/ast.