-
Notifications
You must be signed in to change notification settings - Fork 283
drop SLOC limit #497
base: main
Are you sure you want to change the base?
drop SLOC limit #497
Conversation
This would be a pretty major change to the project, which I know you understand. dwl was created in response to discussions I read on the suckless MLs, with the intent of providing a Wayland option that adherents of the suckless philosophy could honestly try. That's what established dwl's niche versus other excellent tiling compositors (Vivarium, River, Hyprland, Sway, etc.). You can imagine that, to me at least, abandoning that feels like admitting that the diehards on the mailing list were right about Wayland versus X11. I'm open to increasing the line limit for core dwl under the right circumstances, but I still feel that it's important that we have one. The SLOC restriction limits the amount of code we're responsible to maintain, forces us to think hard about what features are truly indispensable, and encourages us to innovate to keep code simple (e.g. bar -> stdout and session manager). I'm confident that we still have room to work with - whether that's refactoring, recognizing what can be done by cooperating with other programs, or upstreaming useful default/auto stuff to wlroots. Is this proposal in the context of specific missing functionality? |
Missing functionality that is present in dwm:
It has been pointed out in the past that things like touch-screen input are insignificant or are of minimal concern to the "majority of users" on a tiling window manager and should thus be relegated to patch status. It has also been noted that serious people using dwl are not wasting their time playing games and thus pointer constraints are of no real significance (despite being brought up by several different users in several different issues) and belong in patch status as well. In opposition to these dismissals, I would point out that parity with dwm is an explicit goal of dwl. Parity with dwm is even the primary reason for insisting on adherence to 2000 SLOC. Is this about what the majority of users use, or is this about parity with dwm? If it's about the majority of dwl users, are the majority of users concerned with 2000 SLOC? if it's about parity with dwm, then which is more critical, divergence from dwm in missing functionality or divergence from dwm in SLOC? If parity with dwm is the most significant concern, then adhering to 2000 SLOC is a single point of parity in what keeps becoming a larger pool of non-parity points. |
Hi fauxmight, Thanks for your contributions to dwl. I can tell there are some strong feelings here, so hopefully I can gently clear up the misconceptions and the mistaken statements/questions that arose from them. Keeping the codebase under a fixed SLOC has always been a top priority. More than feature parity with dwm - that's why dwl hasn't had a built-in bar since day one. :) So the statement "Parity with dwm is even the primary reason for insisting on adherence to 2000 SLOC" is not true. With an intentionally limited amount of code, we have to be very deliberate about how we choose to invest it. Several considerations are weighed against each other on a case-by-case basis:
None of these trumps the others, so the questions in the second half of the post don't really make sense - they're based on the assumption that there is a simple priority order among these concerns, which isn't the case.
I do also want to note that the words chosen for your first couple of points sounds like they're intended to make the dwl developers sound rude and dismissive. I've been careful about who I give access to the project, because I know there are some corners of the suckless community that can be toxic sometimes, and I would never want ours to become one of them. I know that it can be easy to take rejection personally when you're campaigning for a favorite feature, but not being included in core doesn't mean that a feature is insignificant. There is just a high bar to clear for inclusion and retention of a feature - even I patch my dwl, knowing that what I need is not what everyone needs.
|
@djpohly Many thanks for your creation. There would be no passionate stances on any matters regarding dwl if you had not gifted us all with this creation in the first place. My opinions are just that, opinions. They stand as they are. However, reading your reply, I recognize that I came off harshly and abrasively in my previous reply. That is neither constructive nor productive and I apologize. |
(sorry to intrude the conversation) (very grateful for dwl, I appreciate you and your work a lot)
IMO the usefulness of this patch outweighs any benefits of having a SLOC limit.
As a maintainer, you can choose not to merge a PR until you're convinced it belongs in the "core" project and find it elegant enough. An arbitrary SLOC limit is not the only way (and IMO definitely not the best way) to keep things compact, maintainable and useful. |
I'm interested in read those discussions, can you point me to the threads?.
My intention of this is not to start to merge things like madmans, as dimkr pointed above, we can (and must) consider what features we introduce to core dwl (maybe add a clarification).
It's not exclusive for it but part of the reason is pointer constraints.
We need seriously rewrote that part of the readme, I always understood that the SLOC limit was because dwm.
I have always considered dwl a compositor that anyone (with at least a basic knowledge of C) can use. I do not think is necessary to know how wayland works if you only want to use dwl. The problem here is that our users have to maintain patches (with functionality provided by the xserver) that they do not fully understand, which brings the risk of breaking the patches.
I want to add here the xorg-server, we talk about dwm/Xlib but not about the xorg-server, as pointed in the commit there is a big difference between X11 and Wayland, it's (as you know) that we have to be not only the window manager but also the server, the reason because dwm can exist with less than 2000 lines is because it does not have to do the things that the xserver does (i.e: touch, pointer-constraints, enable/disable outputs, handle input (I do not mean handle keybindings, I mean notify the clients about the events), rendering, and so on), wlroots does (most) part of this for us, but still we need to tell wlroots to do it (which consumes lines).
|
I would say the limited SLOC does promote hackability, i would never be able to do some of things i do now, if dwm wasn't that small of a codebase that allowed me to go in an hack things. i believe this would also be useful for dwl. Things being in patch status gives a lot more flexibility as well, imo If users are applying patches they don't understand, we could spend time on documentating it in such a way that they do understand |
Sure, I don't want to remove the limit to end up with 5000 lines (I want to keep the SLOC low too!), unfortunately, for the reasons I pointed above I think we should remove it, I don't think it's good idea to keep raising the limit.
We could, but for patches that implement a protocol the users first would have to read the protocol, and then read the docs the author made (note: I'm not going to write docs for patches except for my own). Which you may understand is a hassle to the users who just want add a protocol to their dwl |
@djpohly, I just thought about this while writing the previous reply. |
I agree with this sentiment, I know basic C and use dwl daily. dwm misses proper parenting because it is not absolutely needed, which makes many java programs not work. example input methods engines, in wayland you must have an protocol, if that protocol is not available, then many indic, sinetic and japonic speakers cannot use your windowmanager. |
Maybe, but I think the error these diehards make is not taking dependencies into account. |
@fbushstone tearing is probably to be implemented with pointer constraints because both are related to games so it probably makes sense to have both or neither. As for HDR I agree because it's not even complete as of today on any DE (only SteamDeck tries something) and most people doesn't have display capable of that. |
Dropping the sloc limit should only be if dwl is to implement more core features such as #504. However, I still tend to agree with @sevz17. Adding features not required to actually run dwl should be handled by a patch. However, the problem arises when a multitude of patches have to support each others features... it can get messy fast. |
I feel dropping SLOC limit will in turn promote hackability. This might sound weird at first, but I feel like every dwl user needs to add patch for basic functionalities, so adding custom patches is harder and take more effort to maintain (more conflicts...). I feel like I should patch dwl not to make apps work, but to customize my workflow. Adding more wayland protocols and dropping the sloc limit sounds like a good direction to me, even tho I don't know much about maintaining dwl. |
I totally agree with this |
I'll merge this in a month (2024-01-08), so if anyone has something against this please add a comment (in Codeberg) @djpohly I tried to answer your concerns but you didn't reply, I also asked you if you would disappear again, it has been two months since that and of course you disappeared again. I'm removing you from the Codeberg organization, thank you for creating dwl, but at this point I can no longer consider you a dwl developer. |
No description provided.