renzev

joined 1 year ago
[–] renzev 12 points 2 weeks ago

I learned about it the hard way lol. seq used to generate a csv file in a script. My polish friend runs said script, and suddenly there's an extra column in the csv...

[–] renzev 4 points 2 weeks ago

I think a good rule of thumb for getting offended is to first ask yourself: does this really offend me, or am I acting offended on behalf of some other theoretical person who's not actually here? And if it's the latter, then you probably shouldn't be offended.

It's just a rule of thumb tho. Like if someone is saying "death to jews", you still have every right to oppose that even if you aren't a jew of course.

[–] renzev 2 points 2 weeks ago (1 children)

Huh, I thought you were joking, but I just checked on google translate, and apparently the correct way to pronounce "threw" really is the same as "through". I always pronounced "threw" a bit more in the front of my mouth so it has a different sound. Crazy stuff.

[–] renzev 17 points 2 weeks ago

tbh almost every time I see a system settings panel or a program that lets you reduce blue light on a schedule, it's always accompanied with a description that sounds like "reducing blue light may help you sleep better". I don't think there are many people touting it as some sort of scientific neurological thing, it's just that many users have a personal preference for reduced blue light at nighttime, and the developers want to accommodate that preference. Not everything has to be backed up by scientific research, sometimes people just like things.

[–] renzev 3 points 2 weeks ago (3 children)

What is there to be confused about? They can speak english correctly, but they simply refuse doing so due to a lack of respect for the language. Almost every professor at my uni is also like this: they have the skills to follow grammatical rules, but they don't owe it to anyone to actually do it. This is normal.

[–] renzev 28 points 2 weeks ago

I've been meaning to learn how to avoid using pipefail, thanks for the info!

[–] renzev 11 points 2 weeks ago

Better would be to leave the 1970s and never interact with a terminal again…

I'm still waiting for someone to come up with a better alternative. And once someone does come up with something better, it will be another few decades of waiting for it to catch on. Terminal emulation is dumb and weird, but there's just no better solution that's also compatible with existing software. Just look at any IDE as an example: visual studio, code blocks, whatever. Thousands of hours put into making all those fancy buttons menus and GUIs, and still the only feature that is worth using is the built-in terminal emulator which you can use to run a real text editor like vim or emacs.

[–] renzev 7 points 2 weeks ago

People keep on telling me that python is a "scripting language" but honestly I would rather use the shoddiest and most barebones shell you would give me than python if I had to make a script. It all boils to interfaces, and there are more programs, libraries, and daemons that have a shell interface as opposed to whatever other "better" language there is out there. Trying to write scripts with Python or ruby or whatever will just boils down to plumbing data between external programs in a less succinct syntax. What good is type safety, try/catch, and classes if all the tools that you're using are taking in and spitting out raw text anyway?

[–] renzev 10 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

Alpine linux, one of the most popular distros to use inside docker containers (and arguably good for desktop, servers, and embedded) is held together by shell scripts, and it's doing just fine. The installer, helper commands, and init scripts are all written for busybox sh. But I guess that falls under "scripting" by your definition.

[–] renzev 1 points 2 weeks ago

Create archive: 7z a archive.7z file1.pdf file2.pdf file3.pdf ...
Extract archive: 7z x archive.7z

What is there to hate? It's pretty much the same as every other archive tool that I've seen.

858
submitted 1 year ago* (last edited 1 year ago) by renzev to c/memes
 
 

Does anybody know why dbus exists? I've been wracking my brain trying to come up with a usecase for dbus that isn't already covered by Unix sockets.

You want to remotely control a daemon? Use sockets. You want the daemon to respond to the client? Sockets. Want to exchange information in json? plaintext? binary data? Sockets can do it. Want to restrict access to a socket? Go ahead, change the socket's permissions. Want to prevent unauthorized programs from pretending to be someone they're not? Change the permissions of the directory containing the socket. Want network transparency? That's why we have abstract sockets.

Plenty of well-established software uses sockets. Music player daemon uses sockets. BSPWM uses sockets. Tmux uses sockets. Pipewire uses sockets. Dhcpcd uses sockets. Heck, dbus itself relies on sockets!

For developers, using sockets is easy. I once wrote a program that interfaced with BSPWM, and it was a breeze. Dbus, on the other hand, not so much. I tried writing a Python script that would contact Network Manager and check the WiFi signal strength. Right off the bat I'm using some obscure undocumented package for interfacing with dbus. What is an introspection? What is a proxy object? What is an interface? Why do I need 60 lines of (Python!) code for a seemingly trivial operation?

So why do some developers decide to use dbus when they could just use unix sockets and save a lot of hassle for themselves and others?

view more: ‹ prev next ›