Live data from Hacker News

Pyrefly: A new type checker and IDE experience for Python

engineering.fb.com

41–50 of 177 posts

Re: Pyrefly: A new type checker and IDE experience for Python

#41
I'm a little worried on behalf of the "Python Language Tooling Team" at Meta, because uv has been so popular, and I wouldn't be surprised if ty wins out in this space.

So watch out, or this will become like Atom or Flow, an internal competitor of a technology that is surpassed by the more popular external open source version, leaving the directors/vps muttering to themselves "It's too bad that this team exists at all. Could we get rid of them and just switch to the open source stuff?"

Perhaps just something for the manager (Aaron Pollack?) to keep an eye on....

Re: Pyrefly: A new type checker and IDE experience for Python

#42
post #6

Earlier quoted context omitted.

I think astral and meta were both working on their own type-checkers independently. My current understanding is that meta released so they could preempt the initial release of ty. It seems like they're a bit further ahead in development. Not sure if there are going to be any real differences between the two down the line.

Sounds a lot like TypeScript and Flow.

Sure, but in this case they are both implementations of a spec defined by PEPs, so a bit more like gcc vs clang (less tightly bound than those, of course, in design decisions). Neither company is trying to invent a new language here.

Re: Pyrefly: A new type checker and IDE experience for Python

#44

Earlier quoted context omitted.

Close, Microsoft’s type checker Pyright is Typescript. Its still faster than mypy for me though.

Pls forgive my ignorance, but how is Typescript (a superset of Javascript) used to type-check Python?

You can write a parser and type checker for pretty much any language in pretty much any language. It's just text files as input and text as output.

Re: Pyrefly: A new type checker and IDE experience for Python

#45

Earlier quoted context omitted.

I agree. I simply can't support anything Mark Zuckerberg does at this point.

This is an open source developer tooling project, not a product which Zuckerberg had anything to do with. What's the point of ignoring it?

Guilt by association is very in vogue these days

Re: Pyrefly: A new type checker and IDE experience for Python

#46

Earlier quoted context omitted.

I agree. I simply can't support anything Mark Zuckerberg does at this point.

This is an open source developer tooling project, not a product which Zuckerberg had anything to do with. What's the point of ignoring it?

> Why we built Pyrefly: Back in 2017, we embarked on a mission to create a type checker that could handle Instagram’s massive codebase of typed Python

They're saying this on fb.com. How does it not have anything to do with fb?

The feedback section takes you to fb's github.

Re: Pyrefly: A new type checker and IDE experience for Python

#47
post #26

Earlier quoted context omitted.

On one hand, I feel like I've been in a coma since covid because I've just been coasting along with Marshmallow and jsonschema, but on the other hand it's like a lot of the major advances have been in the past couple years. Apparently pydantic got a big version update in 2023? And now all these competing static type checkers?

Pydantic got the re write in rust treatment so de/serialization is crazy fast now.

msgspec must be insanely fast then: https://jcristharif.com/msgspec/benchmarks.html

But of course unless parsing and manipulating JSON is your bottleneck, Pydantic is great, too.

Re: Pyrefly: A new type checker and IDE experience for Python

#48
post #21

This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty

That's sort of how I felt about things before, but the reality I believe is we wouldn't have uv if they 'just contributed to poetry'.

I tend to agree.

I don't know the differences between the two well enough to know if it was the case here, but in my experience sometimes you need to innovate on a fork, or from scratch in order to create the space/freedom to do so.

Once a project is popular, it's harder to justify and be confident about major changes (aka https://m.xkcd.com/1172/)

Re: Pyrefly: A new type checker and IDE experience for Python

#49
Why is "written in Rust" a feature to be mentioned? Who cares? So my type checker has memory protection and is compiled. I'm not running my type checker on an embedded system or in a mission critical service. It seems kind of like "written in Erlang". I'd prefer to have non-performance critical code for Python written in Python. That way the broader community can support and extend it.

Re: Pyrefly: A new type checker and IDE experience for Python

#50

Why is "written in Rust" a feature to be mentioned? Who cares? So my type checker has memory protection and is compiled. I'm not running my type checker on an embedded system or in a mission critical service. It seems kind of like "written in Erlang". I'd prefer to have non-performance critical code for Python written in Python. That way the broader community can support and extend it.

Shortcut for "noticeably fast."

Open source Rust is still review able.

Post reply on HN