Live data from Hacker News

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

astral.sh

21–30 of 247 posts

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

#21
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

Oh wow, not so long ago the sentiment was exactly opposite. Python community was struggling with tools and everyone wished to have `gofmt` for Python.

Granted, this is a linter, not a formatter, but my larger point is I am glad that Python ecosystem evolved like it did recently.

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

#22
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

[flagged]

I have actually tried. But I'm not very knowledgable in the area, so it's more LLM slop than my good ideas. And I'm not sure I have the energy and passion to maintain it long term.

https://github.com/gempir/strider

It's definitely possible, if Google would put like one or two smart minds on the problem full time they could easily solve this problem and make the ecosystem so much stronger. But I'm guessing they already have something like this in-house and no interest in open sourcing it.

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

#23
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 point of the "grammar nazi" bots is to focus on the actual problems: if a bot is deciding about linting, you don't have to waste brain power to discuss it in PRs. It is what it is, everyone gets the same, shut up and work on what matters. I'm surprised you consider it a lot of energy spent, I tend not to spend any on this, it just runs automatically on my code and I drop out of pretty much every discussions about…

I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.

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

#24
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

Oh wow, not so long ago the sentiment was exactly opposite. Python community was struggling with tools and everyone wished to have `gofmt` for Python. Granted, this is a linter, not a formatter, but my larger point is I am glad that Python ecosystem evolved like it did recently.

Ruff is actually a formatter too

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

#25
post #17
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

What? I feel go has one of the best language tooling out there without requiring a bully ide to do stuff. golangci-lint is quite comprehensive. What do you miss otherwise? (Honestly go's distributing itself has covered a lot of it)

golangci-lint is good, but you have to glue together a bunch of linters, and it adds up. You can easily get runtimes of several minutes, there are caches etc but the main problem is that golangci-lint doesn't own the lints, so it will never be as fast as something like Ruff.

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

#26
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

I’m not entirely sure what you mean by a fragmented ecosystem? Go has first-party formatting and linting and the language is deliberately restricted to ensure it is written in a certain way, even when written by complete novices. Compare that to Python or TypeScript which are Wild West languages without opinionated first-party tooling, and it’s clear why Ruff/Biome feel great. You just wouldn’t get that same high wit…

Go has a good start for that, but It's not enough for me.

Gofmt is a great idea but it isn't strict enough for my taste. Go does not have any first party static analyzers, closest is Staticcheck which is even sponsored by Google themselves

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

#27
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

It does and it is even better. It is called the Go Analysis Framework (https://pkg.go.dev/golang.org/x/tools/go/analysis).

It is fairly new so not well known but it is what powers go fix and go vet under the hood. And I believe the Go team is currently working on making it possible for module authors to easily describe their own custom analysis passes that would run automatically when running go fix.

It is extremely easy to define your own analysis.Analyzer struct that describes your own static analysis pass. You get access to all sorts of useful information such as the AST, types, even SSA info and you can even compose the information between analyzers. Then you can easily compile it into a binary and run it by passing that binary to go fix with a command line flag. The go toolchain itself handles all the complex caching logic so that your analyzers run fast.

Since it is made by the go team itself and part of the toolchain it should slowly become the unified standard you are looking for. So hopefully golangci-lint and others should eventually all unify under this framework.

You can easily give it a go by telling some AI agent to write some Go Analysis analyzers and telling them to drive them with go fix. My Go projects tend to accumulate a bunch of these to enforce all sorts of rules deterministically and automatically instead of some imprecise markdown file.

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

#28

Earlier quoted context omitted.

The point of the "grammar nazi" bots is to focus on the actual problems: if a bot is deciding about linting, you don't have to waste brain power to discuss it in PRs. It is what it is, everyone gets the same, shut up and work on what matters. I'm surprised you consider it a lot of energy spent, I tend not to spend any on this, it just runs automatically on my code and I drop out of pretty much every discussions about…

I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.

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

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

#29

Earlier quoted context omitted.

The point of the "grammar nazi" bots is to focus on the actual problems: if a bot is deciding about linting, you don't have to waste brain power to discuss it in PRs. It is what it is, everyone gets the same, shut up and work on what matters. I'm surprised you consider it a lot of energy spent, I tend not to spend any on this, it just runs automatically on my code and I drop out of pretty much every discussions about…

I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.

These used to happen all the time. In one (otherwise great) programming course in university you would even get points subtracted if you did not follow the lecturer's preferred style.

(I think that in their case it was partially because uniformity made correcting faster.)

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

#30
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

Oh wow, not so long ago the sentiment was exactly opposite. Python community was struggling with tools and everyone wished to have `gofmt` for Python. Granted, this is a linter, not a formatter, but my larger point is I am glad that Python ecosystem evolved like it did recently.

Yeah, that's how much Astral changed python. UV and Ruff are amazing tools.

Go can get there, but like I said, I think everyone is building some partial tools that solve some problems, but there is not that one player building that one great tool.

Post reply on HN