Hacker News new | past | comments | ask | show | jobs | submit login

I mentioned elsewhere but might as well here again. These tools should only be run on the files that changed, not every single one in the repo. I run my tools with the script equivalent of:

    git status | grep \.py | tools
And it should exit in a split second. We have a pretty large codebase, though not gigantic.



People seem to forget the three ways to make things faster in computers:

1. Micro-optimisation,

2. Better algorithms,

3. Change the problem.

The potential impact of each of these increases as you go down.

Choosing Rust over Python is micro-optimisation. All things being equal, the impact isn't going to be that great. People are like "let me squeeze out every ounce of power from my CPU so I can run a linter on the entire codebase every time I save". Python folk are like "why on earth would you do that?" We simply changed the problem.


You might be interested in pre-commit which does exactly that! https://pre-commit.com/

It probably will also support Ruff if it doesn't already.


Yup, I know it, thanks. Think of the above as pseudo code.

Still, I want some things to run more often than commit, such as pyflakes.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: