This is really well done, thank you! As a noob I wasn't expecting to comprehend much, but you were able to translate your understanding in terms that anyone could digest. Not many people can do that, especially on KZbin. Really appreciate you taking the time to do this & I hope you keep making videos!
@joneskin14323 жыл бұрын
I've spent a good amount of time looking at suckless code to try to learn C. A lot of what's in the code is what I previously learned to be antipatterns- stuff like prolific use of globals, almost all variables/methods are static, lots of typedefs, etc. I'm guessing that most of these are deemed fine because the codebase is so small- my understanding is those things can get out of control when codebases get very large. I love how the code is so clean and readable, but I also wish I knew where there was some discussion on design choices and architecture of it that I could learn from.
@avahekellenberger49823 жыл бұрын
I agree that their architecture isn't very scalable, and you're probably correct that they chose this route with the intent of keeping the code base very small. Not sure if I'll cover it, but I think i3's code base is much more organized if you'd like to take a look.
@mattwilliams1844 Жыл бұрын
They are declared as static globals because the variable needs to live through out the entire programs execution. remember that in C the keyword static means different things based on the context it is used in. For example if you declare a static variable inside a function it means the value of that variable will persist through many function calls. If static is used in a global context it makes that variable or function private to only that file. That is how C handles encapsulation. These aren't considered anti-patterns in C because it is not an OOP language. in C++ for example Display dpy could be wrapped in class that holds it as a unique_ptr, and you could use it that way to etc etc. DWM's code base is not so scalable, but it can be easily refactored to be so. Remember the entire Linux kernel is in C, and you will see similar approaches to common problems. Splitting DWM's code into separate files, using more descriptive variable names, and adding better file/function documentation would make it more welcoming.
@SuperKhezar2 жыл бұрын
5:37 line 247 is that a function pointer that takes an array of other function pointers and maps them to the event types? I'm trying to understand how that works. Edit 1: line number typo
@manabuizayoi95672 жыл бұрын
From my understanding line 247 is an array of function pointers, and the next lines are just mapping the indexes of the array to the respective functions
@happygofishing10 ай бұрын
"this is for opembsd, nobody cares" 😂
@TanyaParker-h5vАй бұрын
Moore Laura Anderson Maria Lopez Mark
@motif57753 жыл бұрын
Great video and information, thank you much good sir!!
@theodorealenas31712 жыл бұрын
Is it easier to manually change DWM or BSPWM? Shall I make DWM read a named pipe, or shall I try to modify manually BSPWM?
@alexferreira4401 Жыл бұрын
I like your color scheme. Do you have a repo with your dotfiles? also, whats that firefox theme?
@DavidEngelen9 ай бұрын
Thank you so much for this video 😄
@dakyskye3 жыл бұрын
Good video 👍
@ahmedsaadsabit1749 Жыл бұрын
This is so fucking awesome
@rsmith314162 жыл бұрын
Awesome video!
@xy94393 жыл бұрын
Awesome video
@armynyus91233 жыл бұрын
This is beautiful. Btw: Why do people not like X anymore, I find the architecture quite convincing.
@low-key-gamer61172 жыл бұрын
Less secure than Wayland, unorganised mess.
@-aexc- Жыл бұрын
also much worse multimonitor support when you're mixing monitors
@armynyus9123 Жыл бұрын
@@-aexc- I heard the opposite: Multi display in wayland suck when resolutions differ. I could not imagine better support than I have in X, I mean: Nothing missing, all working, even with 3 displays.
@spht9ng Жыл бұрын
Why would the function's return type be on the line above and not inline with the function? wtf that looks so bad lmao
@bhavyakukkar5 ай бұрын
Makes it easier to search for functions because you know there'll be at line start
@joaopauloalbq3 жыл бұрын
This video is bloated :v
@agungsatria91962 жыл бұрын
Tf
@AtomToast3 жыл бұрын
good video but please don't go around rooms and spam your stuff without context
@avahekellenberger49823 жыл бұрын
Thanks, but I've only shared it in a friend's discord server (once). If someone is spamming links to my videos, it isn't me
@AtomToast3 жыл бұрын
Okay damn. Well then I guess you have a very passionate fan :)
@BryanJenks3 жыл бұрын
LOL hey Atom, i love how we always end up on the save content 🙃️
@AtomToast3 жыл бұрын
I mean your discord was one of the places this got posted in :p