4 ms·
> Also, one should keep in mind that having to apply personal patches is perfectly acceptable for suckless software. I don't get it. This patch increases the c
by vog 10y ago
> Also, one should keep in mind that having to apply personal patches is perfectly acceptable for suckless software.
I don't get it. This patch increases the code base by merely 60 lines of code (104 insertions, 44 deletions).
Is 60 lines already considered bloat, in a verbose language like C?
Also, is this meant to lead to fewer complexity? Maintaining the patch separately from the code base is nothing but cumbersome. Essentially this is a long-time feature branch, which is a well-known anti-pattern regarding software quality and maintenance. What if there are more and more of such patches? What if they overlap and can't be applied together? In a central code base these formal conflicts would be resolved once and for everyone, early on.
I would have expected this feature (and its code) to be enabled/disabled by a single #define in config.h. That would be more consistent with the suckless philosophy of configuration. Or, reducing that bloat by simply enabling it always.
- juliangoldsmith 10y ago>Is 60 lines already considered bloat, in a verbose language like C? It's more about features. tmux and screen are widely used, so a lot of people won't need that functionality to be duplicated. Keeping extra features separate lets the users pick and choose what they want. It's also worth noting that suckless's software is not meant for someone who wants a turnkey solution. It's meant to be customized by most every user.
- ycmbntrthrwaway 10y ago> Is 60 lines already considered bloat, in a verbose language like C? Due to high code quality, removing even 10 lines is an achievement for suckless.org projects. Try it yourself and submit a patch to mailing list if you succeed. > Also, is this meant to lead to fewer complexity? Maintaining the patch separately from the code base is nothing but cumbersome. Maintaining feature as a patch prevents you from weaving it deep inside the code, adding hooks here and there just to make it work. It is harder to do, but it is the right way to make sure all feature related logic is kept in one place. I have some pet suckless inspired projects. During development I introduced some useless features such as pthread support just because I learned about them. Then once I realized they are useless I removed them. It greatly improved code structure.
- vog 10y ago> Maintaining feature as a patch prevents you from weaving it deep inside the code, adding hooks here and there just to make it work. It is harder to do, but it is the right way to make sure all feature related logic is kept in one place. I'm used to achieve this by keeping each topic in a separate module (in C: function or file, in other languages: module, class, whatever). You'd then have clear entry points into that module. Interestingly, the given patch isn't structured like that. So I'd argue that code would benefit from becoming a first-class citizen in the code base. As a patch it just gives the illusion of a well-separated feature. (Because a patch file is always a single file, no matter how much the changes are scattered around in the code base.) > I have some pet suckless inspired projects. During development I introduced some useless features such as pthread support just because I learned about them. Then once I realized they are useless I removed them. It greatly improved code structure. I fully agree that removing useless features does not only shorten, but simplify code. However, given that by far not everybody uses screen/tmux, I disagree with the "scrolling is useless" assumption here.