Live data from Hacker News

Pyrefly: A new type checker and IDE experience for Python

engineering.fb.com

71–80 of 177 posts

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

#71
post #52
post #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…

JSX is my favorite thing to come out of Facebook (also the only good thing).

I feel bad for that people that love JSX and don't know about lit-html yet.

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

#72

I'm curious to know more about the Pyre to Pyrefly transition, specifically the rewrite in Rust. Was that merely a case of trading in a lesser-known language for the language du jour? Were there specific advantages they wanted to get out of Rust?

Hi! We address this question in our FAQ and probably could do a longer blog post about our experience after we are further along: https://pyrefly.org/en/docs/pyrefly-faq/#why-rust

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

#73
post #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…

Meta seems to place a pretty high premium on controlling its open source projects, especially dev tooling. I guess dating back at least to the git maintainers telling them they were doing things wrong with their monorepo and refusing to upstream scale fixes, which precipitated their migration to mercurial (who were more than happy to take the contributions).

Given the change velocity of internal tooling you can understand why owning your own project makes sense here.

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

#75
post #52

Earlier quoted context omitted.

JSX is my favorite thing to come out of Facebook (also the only good thing).

I feel bad for that people that love JSX and don't know about lit-html yet.

JSX supports

* Autocompletion

* Type checking

* Syntax highlighting

* Lack of runtime string parsing

Tagged template literals don't.

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

#76
post #75

Earlier quoted context omitted.

I feel bad for that people that love JSX and don't know about lit-html yet.

JSX supports * Autocompletion * Type checking * Syntax highlighting * Lack of runtime string parsing Tagged template literals don't.

JSX does not support any of these, it was coded by others.

tagged template literals can have all of these, some already exist¹ and doesn't need a build step.

1. https://marketplace.visualstudio.com/items?itemName=bierner....

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

#77

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?

They're saying pyright is a Python type checker, but it's written in Typescript, not Rust.

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

#78

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?

just like the Python compiler/interpreter is written in C.

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

#79

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.

> I'd prefer to have non-performance critical code for Python written in Python

A type checker is performance critical code. You can watch how Pylint, just a linter, written in Python, lints your source code line by line. It's so slow it can take 30 seconds to update the linting after you change some lines.

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

#80
post #75

Earlier quoted context omitted.

JSX supports * Autocompletion * Type checking * Syntax highlighting * Lack of runtime string parsing Tagged template literals don't.

JSX does not support any of these, it was coded by others. tagged template literals can have all of these, some already exist¹ and doesn't need a build step. 1. https://marketplace.visualstudio.com/items?itemName=bierner....

Matt, who works pretty high level on VS Code, has written some amazing plugins.

But they still don't have all the first-class features of JSX.

I don't think this plugin works with type checking for instance.

Post reply on HN