On 24/10/26 09:15PM, Страхиња Радић wrote:
> The main question that I, as a user, have is: what does a program do,
> what is its main function? If it overlaps with some other program, the
> second thing I am asking is: what does it do better? And, having in
> mind the suckless philosophy, the following questions:
>
> - Is it more minimal?
> - Does it follow Unix philosophy:
> - Is it focused in what it does?
> - Is it fulfilling its purpose well?
> - Does it work well with other programs?
>
> By taking a brief look at swm, I find that it is more complicated than
> dwm. If we forget all the details, just the rudimentary
>
> $ cd swm
> $ wc -l *.[ch] | tail -1
> 4450 total
> $ cd ../dwm
> $ wc -l *.[ch] | tail -1
> 2871 total
>
> shows that dwm beats swm in SLoC count. Less is more.
>
> "Layout description language", while interesting academically, as a
> research project at the university, doesn't have much practical value
> to me as a user. The way I'm using dwm is such that perhaps 80% of the
> time I'm using the "tile" layout, and 20% of the time I switch to
> "monocle" layout, and that's enough to be efficient. I don't feel the
> need to even use the "rules" array in stock dwm, I am arranging windows
> in tags manually, using the MODKEY+Shift+<N> keys and switching to tags
> using MODKEY+<N>.
>
Good questions.
I see that you linked to Luke Smith's website in another email, so it
looks like you know him. That guy really helped popularize suckless
software, didn't he? In fact, he's the way I knew suckless. Maybe you
have not noticed but the features that swm implements are chosen or
designed basing on the features his heavily patched dwm has, so I expect
at least someone like him wouldn't be very resistent to these features.
By the way, they do work, right? I don't even know if people have no
problem cloning my projects (basing on the way you count the lines it
seems that you do), sigh.
Is it more minimal? It's minimal I would say, but dwm's minimality is an
extreme so let's compare with others: `wc -l src/*.[ch]` for bspwm shows
over 14,000, and `wc -l src/*.c` for i3 shows over 28,000. You can see,
in terms of source code minimality swm is still in dwm's tier.
dwm's encouragement for users to modify the source naturally attracts
proficient hackers that will dive much deeper than config.h, and
this means that the programming interface does matter to end users.
I claim that swm's programming interface is more minimal than dwm:
There are 91 function declarations in dwm.c, ordered alphebtically in a
monolithic list, versus 71 in swm.h, grouped by compilation units that
defines them. Also, the Client struct has 33 fields in dwm and 31 in swm.
And remember that's already the result of swm being a more sophisticated
window manager.
The layout description language might look somewhat a bloat, but it's
implemented in lyt.c alone and exposes only 4 global functions. What's
inside lyt.c is like code in a libray that users rarely need to care.
Inside lyt.c it isn't bad either if you compare with the vanitygaps patch
(which Luke uses). vanitygaps.c, which provides a number of layouts with
gaps, has 809 lines, while lyt.c, which allows a hacker to create a layout
(with gaps as well) by just a string instead of writing a tiling function,
has 770 lines. It's minimal with respect to its functionality, isn't it?
And I am not hardwiring such a thing into swm. It's a compilation
unit that has minimal interface and therefore can be easily replaced by
hackers who have better ideas.
Regarding working with other programs, swm's dmenu integration certainly
makes better use of dmenu than dwm does. swm uses dmenu, a separate
program, to provide menus that works like built-in, and communicates
with it using pipes. And swm works with the status program similarly,
the status program only needs to be a program that processes input and
produces output. Quite Unixy, right?
Also look at infobar (nothing to do with Alex Jones, seriously). Read its
README about what it provides, and compare that to the fact that it's
a shell script under 400 lines, isn't it surprisingly small? And its
internal working is all about pipes and corporation with other programs.
Does swm fulfill its purpose? Initially I attempted to hack dwm to an
extent of rewriting when I realized that under scrutiny Luke's dwm fork
looked like pieces of woods and plastics nailed and ducktaped together.
Patches are of varying quality, and when simply added together the
overall quality is often worse than the average. Then I began to see
dwm's state of being a bare-boned program plus various available patches
as a transitional phase that awaits the emergence of certain powerful
combination. So one of swm's main purpose is to find this combination
and make it organically. Yes not everyone is going to find all about
swm useful, but that's because it aims to be the least common multiple
rather than the greatest common divisor. You can tell how well it serves
this purpose.
What about infobar's purpose? I was at first unsatisfied with how most
others status program updates their results and that realtime updates
and clickability are often achieved hackishly. If you look at infobar's
solution to these problems I think you will agree that it's a good one.
> In particular, I don't see the need to have multiple programs with
> overlapping functionality as part of the official suckless software
> "suite". I'm fine using dwm and slstatus, thanks. I apply patches I
> choose and set my config.h the way it suits me.
>
It seems like you get the impression that I want suckless to host my
projects? I never requested that. It would be nice if swm and infobar
could be referenced in the website just like numerous others have been
but that's about it. What I want is for you guys to actually inspect
and judge them. My primary interest at this point is to get opinions
about, like, what level of talent is demonstrated? Do they stand out
among similar works? Complaints? Suggestions?
> What I would like to suggest to you in particular, and to others who
> would like to help the suckless project, is to look at the
>
> https://suckless.org/project_ideas/
>
> for ideas about areas to focus on, which are currently lacking and
> for which programming efforts would help the most.
>
Well, maybe later. It's just my first step.
Received on Sun Oct 27 2024 - 04:07:07 CET