Is it any more maintainable with four levels of abstraction?
palordrolap
Some middle-aged guy on the Internet. Seen a lot of it, occasionally regurgitating it, trying to be amusing and informative.
Lurked Digg until v4. Commented on Reddit (same username) until it went full Musk.
Was on kbin.social (dying/dead) and kbin.run (mysteriously vanished). Now here on fedia.io.
Really hoping he hasn’t brought the jinx with him.
Other Adjectives: Neurodivergent; Nerd; Broken; British; Ally; Leftish
- 0 Posts
- 122 Comments
Be aware that a lot of distros will be switching from X11 to Wayland at some point in the not-too-distant future and these ancient tools will not work there.
People have tried to write equivalents (
ydotoolis one I’m aware of), but Wayland has intentionally been written to make doing such things difficult, for “security” reasons.I will be grumpy until I can make my scripts work again, but that’s for future me to deal with.
They allow the user to script changes to, and pull information from, windows in the window manager. Like read, if not also set, a window’s title, change a window’s dimensions, move it around, send it to a different desktop, send keypresses, bring a window to the foreground, etc. etc.
Basically, anything the user can do with the mouse, keyboard or window manager via the GUI, and a little more besides, can be automated.
The two commands work slightly differently to each other and one can often do something the other can’t.
As an example, I have a script that resizes the active window to a 4:3 ratio at full vertical height on my 16:9 monitor. I’ve then bound that script to a keypress in the window manager. It’s a lot like having something halfway between window mode and maximised mode.
Couldn’t I do that with the mouse? Sure. But with the script I don’t have to gauge by eye and spend multiple mouse clicks and movements trying to get it just right.
You know how slackers tend to make more of an effort to at least look like they’re doing what they should be when the boss walks by?
This is the same relationship between the computers and the IT department.
And the real truth may be somewhere in between. The user may suddenly regulate their behaviour and take extra care, or at least act sufficiently differently, when the IT person is watching over their shoulder.
They don’t do the thing that makes the computer complain. Everything looks normal. IT person goes away. User reverts to original habits. Computer complains.
Or else the IT person uses the computer themselves, but does not emulate the user sufficiently well, so the computer behaves.
I know it’s not always this but it goes a long way to explaining how tech aura became a thing.
I’m going to miss
xdotool(andwmctrl) when my distro eventually ditches X11.I don’t use them often, but I do use them, and their functionality is nice to have.
There are partial replacements out there, but last I checked, they were very weak approximations.
Unmentioned by other comments: The LLM is trying to follow the rule of three because sentences with an “A, B and/or C” structure tend to sound more punchy, knowledgeable and authoritative.
Yes, I did do that on purpose.
You can also try signalling the parent with a SIGCHLD. Most of the time it does nothing, and hey, you’d be using a stronger version of the kill command anyway if it doesn’t work.
history | grep -E '(sed|grep|awk|perl)' | wc -l107Dang. That’s out of 1000. I need to up my game. Also three of those
seds are part of something with a-basedirand don’t count.So yeah, about 10% of my commands are iterating shell pipe things for poops and giggles, I guess.
… and this got me going down the rabbit hole of writing a filter for my history to pull out the first command on the line. This is non-trivial because of potential preceding variable assignments. Most used commands are currently
aptandmanandls. I thinkaptis a Spiders Georg situation because the system is fairly fresh and I keep finding things that I haven’t installed yet. Also I went through a patch of trying to parse its output.… oh, er… unga bunga.
palordrolap@fedia.ioto
Programmer Humor@programming.dev•Oh no! Linus doesn't know AI is useless!
302·27 days agoIf 1) you’re smart or practised enough to be able to generate what you’re asking the AI to do for yourself, 2) you’re able to take what the AI generates and debug, check and correct it using non-AI tools like your own brain, 3) you’re sure this whole AI-inclusive process will save time and money, and 4) you’re sure using AI as a crutch won’t cause you brain-rot in the long term, go nuts.
Caveat: Those last two are tricky traps. You can be sure and wrong.
Otherwise, grab the documentation or a bunch of examples and start hacking and crafting. Leave the AI alone. Maybe ask it a question about something that isn’t clear, but on no account trust it. It might have developed the same confusion that you have for precisely the same reasons.
So anyway, Linus clearly fits 1 and 2, and believes 3 and 4 or else he wouldn’t be using an AI. Let’s just hope he hasn’t fallen into the traps.
palordrolap@fedia.ioto
Programmer Humor@programming.dev•You can pry pattern matching from my cold dead hands
171·2 months agoThis is pretty smart for the left guy. He’s usually down at the level of “HTML is a programming language” or “What’s a programming language?”.
That said, the first one of those isn’t mutually exclusive with what he says in the meme.
Add more colours a button that turns it into a slot machine. Three sevens and you win a prize.
(a redirect to a picture of a duck)
palordrolap@fedia.ioto
Programmer Humor@programming.dev•Its actually because I'm a noob 😓
7·2 months agoThe GPL doesn’t control how guilty I’ll feel if I don’t.
palordrolap@fedia.ioto
Programmer Humor@programming.dev•Its actually because I'm a noob 😓
6·2 months agoMost of my stuff is badly hacked together “runs on my machine” code. If I released any of it onto a public repository, I’d then be on the hook for maintaining it and making it run on more than just my machine, or else examining, deconflicting, and merging pull requests where other people have done the work. I really don’t have what it takes for all that.
qedwas also a line editor but pre-dated and inspireded, so that’spicotonanooredtoexagain, just even further back in time.sedandgrepgrew out of commands withined(or equivalent) so I guess you could say they’re each kind of a knight’s move two to the side and once backward from the direction ofextovi. Backwards because they’re simpler, but two to the side because they’re not interactive.As to what would be “backward but one to the side” in that analogy, that’d be something like a tool that asked questions about every line in a file and made changes accordingly. I don’t think there’s any such standard tool, but I can think of at least a couple of ways to write one.
Comparison time!
exis toedasnanois topicoThat is, it’s an editor that works in almost exactly the same way as the original, but it’s by somebody else.
exis toviasviis tovim, or C to C++.That is, the latter grew out of and improved upon the former, but you can still use them like their forerunners if you really want, which is why
vihas anexmode and why you can still use pointers in C++ if you’re sufficiently warped.
If your system has vi or a clone, try
vi -e, or, if the symlink is set up,ex. Technically that’s vi inexmode, notedper-se but it’s about as similar as you’re going to get without a lot of pointless bother.
palordrolap@fedia.ioto
Programmer Humor@programming.dev•It was best as a silly toy language in the 1990's...
4·2 months agoThe Cinnamon desktop environment found in Linux Mint uses JavaScript on the back-end. My knowledge doesn’t extend much beyond that (other DEs, and what they do, nor the full extent of JS in Cinnamon), but I did look at it at one point.
Makes me wonder if OP was talking it about that in particular or if there’s some other project with a bundled JS interpreter they decided not to work with.
palordrolap@fedia.ioto
Programmer Humor@programming.dev•Lucky enough, I am C++ Developer
15·3 months agoMe, looking between a picture of Bjarne Stroustrup and OP: … are you sure about that?
palordrolap@fedia.ioto
Programmer Humor@programming.dev•Why /dev/null Is an ACID Compliant Database
6·3 months agoReminds me of dev.null as an e-mail address, but perhaps the service is more useful(?). I had access to the back-end of the mail server in question and it literally had
/dev/nullin the configuration.And yes, it ate any e-mails sent to it.
Some people genuinely do not understand the concept of GUI windows and how they work. They do not generate a full mental model of the desktop and the windows on it and only see the whole screen as one bewildering interface. They focus on what they do know in order to get by.
This may be especially true of people who learned their IT with small screens or low resolutions where running an application full screen (or as the only active application!) is required to get anything done.
Your colleague saw you click on part of the interface they were ignoring because they didn’t understand it and magic happened.