News for hackers. Stuff that matters.
Re:Ty: A fast Python type checker and language server by nickagliano on Wednesday May 07, 2025 @02:27PM (#43919071)
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.

Re:Ty: A fast Python type checker and language server by masklinn on Wednesday May 07, 2025 @03:01PM (#43919426)
> 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

Re:Ty: A fast Python type checker and language server by tasn on Wednesday May 07, 2025 @02:30PM (#43919096)
Astral announced it last year I think, so it's been a long time coming.
Re:Ty: A fast Python type checker and language server by emptysea on Wednesday May 07, 2025 @02:33PM (#43919139)
Also interesting, pyrefly uses Ruff’s parser!

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

Re:Ty: A fast Python type checker and language server by ipsum2 on Wednesday May 07, 2025 @02:37PM (#43919181)
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.
Re:Ty: A fast Python type checker and language server by zem on Wednesday May 07, 2025 @06:14PM (#43921068)
language tooling is a sweet spot for rust, for sure.
Re:Ty: A fast Python type checker and language server by akdor1154 on Wednesday May 07, 2025 @06:16PM (#43921077)
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.)

Re:Ty: A fast Python type checker and language server by _carljm on Wednesday May 07, 2025 @06:43PM (#43921264)
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.
Re:Ty: A fast Python type checker and language server by digdugdirk on Thursday May 08, 2025 @08:26AM (#43925459)
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?
Re:Ty: A fast Python type checker and language server by theLiminator on Thursday May 08, 2025 @12:48PM (#43928108)
I believe the only sharing is parsing/ast.
Re:Ty: A fast Python type checker and language server by kmacdough on Thursday May 08, 2025 @05:49AM (#43924648)
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.