Live data from Hacker News

Astral

astral.sh

141–150 of 248 posts

Re: Astral

#141
post #102

This sounds nice, but um, what's the benefit to faster linting? Is it being slow really a problem people have? I've no experience of this.

Just because you don't have the issue doesn't mean it's non-existent. We went from 8ish seconds with flake8 to tens of milliseconds with ruff. Ruff can just run as a pre-commit hook because it's so fast.

I for one have stopped using flake8 in favour of ruff because of both speed and the huge amount of supported rules in ruff already.

Re: Astral

#143
This is great, I'm going to switch to this from black. Being used to working in other languages I feel like I'm swimming in molasses when using Python.

It's funny that all good things for Python are not written in Python. Says a lot about the language.

Re: Astral

#144

Earlier quoted context omitted.

I agree and would ask: is linting that much of a bottleneck to development? Having an automated lint run upon opening a PR seems like a minor expense, especially when you can work on other tickets while you wait.

It's much more noticeable when running locally. Going from something like black + pylint + mypy running in a pre-commit hook to black + ruff + mypy has been wonderful for me. It lets me actually set up another terminal session to run ruff on every file change - where pylint would take seconds, ruff is essentially instant. Side note: I really hope mypy can get the same treatment; it runs quickly once its cache is esta…

I'm currently speeding up Mypy + Jedi in Rust. I'm pretty far already and it's definitely a lot faster. Tests are currently running 500 times faster than Mypy.

Re: Astral

#145

I really hope they develop a faster mypy. In my dev workflows, mypy takes most of the time. Linting is a small fraction of it.

I'm currently speeding up Mypy + Jedi in Rust. I'm pretty far already and it's definitely a lot faster. Tests are currently running 500 times faster than Mypy.

Re: Astral

#146
post #103
post #96

Earlier quoted context omitted.

Banning is a little extreme, but I agree that title is unhelpful. Better title would be "Ruff is a fast Python linter written in Rust" (which is a slight paraphrase from one of the subheads).

Or "Ruff creators found Astral Software Inc." or something.

Editoralizing is discouraged and your post will end up edited to match the original URL’s title either way.

Re: Astral

#147
post #109

Earlier quoted context omitted.

I actually cursed Maturin a few years ago, as it refused to compile on OpenBSD and hence broke some lib I planned to use. Python is becoming a bit too reliant on Rust. Rust is good but, in term of portability, is just not as mature as C. If your lib relies on Rust, please please please test it on something beyond Linux and Mac.

> please test it on something beyond Linux and Mac That’s asking a lot. If your platform is poorly supported by Rust, then maybe that’s where your efforts should be directed. If you fix that, lots of interesting stuff beyond one library is unlocked.

Theo de Raadt engaging the Rust community would be a sight to behold :)

Re: Astral

#148
post #30

Earlier quoted context omitted.

> Charlie Marsh is just a damn good developer curious how you assessed this. did you inspect the code or are you just commenting from the user POV?

[flagged]

then you probably dont know that i'm actually more supportive of charlie than most and are reading negative intent from a perfectly neutral/innocent question that is perhaps badly phrased :)

Re: Astral

#149
User of Ruff here and follower of Charlie's work.

I've been slinging python since 2003, and I've used a pretty wide swath of the toolchain. I've also had the (pleasure?) of using python in a lot of different contexts: desktop applications, web programming, custom scientific calculation plugins, grad school hacks, Maya, and obviously Juypter notebooks.

My honest take: Toolchain tools like Ruff are the only way the Python ecosystem as a whole moves forward. In order to be broadly adopted by the wide swath of use cases, it needs to be universally applicable and have a killer reason for being (in this case, speed, which opens up new use cases that didn't exist before).

Ironically, the commonality to these toolchain improvements for python ... is that they not be written in Python. If you want good analogues, you can look at the work that others have done with multithreading and trying to bypass the GIL, which is one of my other hobby horses with Python. Hot take: For most users, python is not used for itself, but more to flexibly orchestrate some other low-level problem. This is why Maya, scipy, most of data science, and other DSLs use python so much.

To empower these users, you either need to (1) work in the compiler (2) below the GIL or (3) do the heavy lifting of wrapping around the language flexibility without requiring changing the python code itself. Ruff does that, and I imagine the thesis of Astral is to extend that philosophy to the rest of the toolchain.

Lastly, in the spirit of this site, I'll give my second spicy take: I think web development in python is on the decline, and the future of python is in data science and related fields. These fields care a lot about fast toolchain, and will use ruff and other tools to achieve those ends without modifying legacy code. For web, node has won. I know users that use python but you can't really beat needing to learn just one language vs two to build a web app.

Re: Astral

#150

User of Ruff here and follower of Charlie's work. I've been slinging python since 2003, and I've used a pretty wide swath of the toolchain. I've also had the (pleasure?) of using python in a lot of different contexts: desktop applications, web programming, custom scientific calculation plugins, grad school hacks, Maya, and obviously Juypter notebooks. My honest take: Toolchain tools like Ruff are the only way the Pyt…

>Hot take: For most users, python is not used for itself, but more to flexibly orchestrate some other low-level problem.

Well, there's nothing wrong with that.

In fact, a great "glue language" (and Python sure needs lots of improvements in many areas) is kind of the holy grail of IT!

Post reply on HN