TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Ruff Formatter: A fast, Black-compatible Python formatter

56 pointsby CathalMullanover 1 year ago

3 comments

veqqover 1 year ago
The difference in tooling stories of DIY ecosystems like Python vs. batteries included ecosystems like Go is fascinating.<p>I&#x27;ve rarely thought of formatting in Go (occasionally wishing it would allow 1 line if statements). But this forgoes many possible optimizations. We don&#x27;t get fun stories of 30x improvements! (And Go could be optimized a lot, the main compiler implementation foregoes most possible optimizations because the team prioritizes keeping it simple to enable long term refactoring.)<p>But then in Python I remember tab or space battles, in C you have endless formatting battles which they call coding styles etc. etc. I&#x27;ve never worked professionally in it but it seems like you get people using random build tools... Which are constantly improving! Yet the constant churn horrifies me, seems like it would take up a lot of mental space. Is that true in practice?<p>LISP (well, Scheme (well, Racket)) is a weird middle ground. Formatting e.g. seems like a solved problem, built into the IDEs with similar behavior since IDK when (I&#x27;ve never thought about it.) Overall, you sort of create tooling while programming. In Common Lisp, substantial tooling is also built into the professional IDEs. The compilers also do quite a lot.
评论 #38007045 未加载
评论 #38009188 未加载
wodenokotoover 1 year ago
I really don’t like how black formats list that ends with a comma differently from lists that don’t. I hope this either didn’t make it to ruff or can be turned off.<p>Either way, it looks like an interesting development!
评论 #38009277 未加载
freediverover 1 year ago
Impressive tool, amazing speed. What is the business model behind the company?