Live data from Hacker News

Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

astral.sh

51–60 of 247 posts

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#51
post #10

I wish Go had something like Ruff! A lot of languages are getting amazing tool but Go has a very fragmented ecosystem with a lot of tools but none of them feel as high quality has the likes of Ruff, Oxc, Biome or even PHP's Mago

Golang-ci exists for a while and everyone is using it.

Not sure what you're talking about.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#52
post #12

The amount of fascination that people have with these "grammar nazi" bots -- some of them implementing completely arbitrary "rules" and some of them disagreeing with others on what "good" Python code should look like -- doesn't stop to amaze me. Here's "bad" code: important_numbers = { 'x': 3, 'y': 42, # Answer to the Ultimate Question! 'z': 2 } Here's what "good" code should look like: important_numbers = {"x": 3, "…

The actual rules are less important, only the consistency of applying them is.

I find that people who argue against automatic linting and formatting tend to be the same that would argue incessantly about style. So much wasted energy, I want none of that.

Also, in your example above, if you put the comment on the line _above_ instead of inline the formatter will most likely do the right thing.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#53
post #37
post #20

Earlier quoted context omitted.

In my previous place, discussions on coding style were forbidden in PRs. It worked just fine. Edit: one could also use single or double quotes in strings, and it didn't anger the grammar nazi bots as there were none.

Which gets rid of the discussion, but not the problem coding style rules are supposed to fix: Code looks the same, regardless of who wrote it. That's the whole point of code style guidelines like that as there's no functional reason for them. That's why I like Go, every piece of code looks the same, there's one default enforced linter and this discussion (or discussion if discussion should be allowed or prohibited) d…

Waiting patiently for the other person to produce a post hoc rationalization about why everybody’s code looking different is in fact a good thing

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#54

I find it somehow interesting that a tool for Python is written in Rust.

It's the same for JavaScript. Rust is the better language (especially for large projects like these), but sometimes you don't have a choice but to use Python or JS/TS.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#55
post #28

Earlier quoted context omitted.

It's not by accident that tabs vs spaces is one of the stereotypical great debates in programming.

I've never seen this debate take place outside of internet forums, almost always as a joke. It's been about 15 years since I even remember it coming up much as a joke, frankly.

Yes, because the battles have been fought and spaces won

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#56
post #12

The amount of fascination that people have with these "grammar nazi" bots -- some of them implementing completely arbitrary "rules" and some of them disagreeing with others on what "good" Python code should look like -- doesn't stop to amaze me. Here's "bad" code: important_numbers = { 'x': 3, 'y': 42, # Answer to the Ultimate Question! 'z': 2 } Here's what "good" code should look like: important_numbers = {"x": 3, "…

It's funny to see this comment about Python, which was designed to be a style North Korea. Maybe in a decade we'll see a Go linter and have a good laugh at that.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#57
post #51
post #10

I wish Go had something like Ruff! A lot of languages are getting amazing tool but Go has a very fragmented ecosystem with a lot of tools but none of them feel as high quality has the likes of Ruff, Oxc, Biome or even PHP's Mago

Golang-ci exists for a while and everyone is using it. Not sure what you're talking about.

I've been using golangci-lint for years, it's okay but it's slow even with a cache, as soon as you have good amount of lints enabled your ci can suddendly take minutes.

That's not the fault of golangci-lint, it's just the concept of bringing together a bunch of different linters and keeping it fast is impossible. And the configuration is a bit wild too, because every linter obviously has their own decisions on how it wants to be configured.

Ruff can lint in seconds or even sub second.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#58

Good news. enabling 413 rules by default means most projects get useful linting without touching the config at all!

Maybe it's just me, but getting overrun with "413 x potential warnings" hardly sounds useful :) Great for greenfield, less so for existing projects. Although nowadays, fire up your agent with "/goal work through and address all lint warnings by fixing the code according to XYZ" and leave it alone for a couple of hours and I guess it's no longer an issue... Don't get me wrong, the new level of details coming from Ruff…

> uv run ruff check --fix

Generally gets you 90% there.

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#59
post #55

Earlier quoted context omitted.

I've never seen this debate take place outside of internet forums, almost always as a joke. It's been about 15 years since I even remember it coming up much as a joke, frankly.

Yes, because the battles have been fought and spaces won

Okay, so if the battles are won why do I have to care? What is the point of having so many strict, enforced style rules if your exemplar has already been long dealt with?

Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

#60
post #53
post #37

Earlier quoted context omitted.

Which gets rid of the discussion, but not the problem coding style rules are supposed to fix: Code looks the same, regardless of who wrote it. That's the whole point of code style guidelines like that as there's no functional reason for them. That's why I like Go, every piece of code looks the same, there's one default enforced linter and this discussion (or discussion if discussion should be allowed or prohibited) d…

Waiting patiently for the other person to produce a post hoc rationalization about why everybody’s code looking different is in fact a good thing

Can you not read code if it uses single vs double quotes?
Post reply on HN