Badabinski

@Badabinski@kbin.earth
0 Post – 84 Comments
Joined 4 months ago

Alt account of @Badabinski

Just a sweaty nerd interested in software, home automation, emotional issues, and polite discourse about all of the above.

Having been in this situation (the only binary I could use was bash, although cd was a bash builtin for me), echo * is your friend. Even better is something like this:

get_path_type() {
    local item
    item="$1"
    [[ -z "$item" ]] && { echo 'wrong arg count passed to get_path_type'; return 1; }
    if [[ -d "$item" ]]; then
        echo 'dir'
    elif [[ -f "$item" ]]; then
        echo 'file'
    elif [[ -h "$item" ]]; then
        echo 'link'  # not accurate, but symlink is too long
    else
        echo '????'
    fi
}

print_path_listing() {
    local path path_type
    path="$1"
    [[ -z "$path" ]] && { echo 'wrong arg count passed to print_path_listing'; return 1; }
    path_type="$(get_path_type "$path")"
    printf '%s\t%s\n' "$path_type" "$path"
}

ls() {
    local path paths item symlink_regex
    paths=("$@")
    if ((${#paths[@]} == 0)); then
        paths=("$(pwd)")
    fi
    shopt -s dotglob
    for path in "${paths[@]}"; do
        if [[ -d "$path" ]]; then
            printf '%s\n' "$path"
            for item in "$path"/*; do
                print_path_listing "$item"
            done
        elif [[ -e "$path" ]]; then
            print_path_listing "$path"
        printf '\n'
        fi
    done
}

This is recreated from memory and will likely have several nasty bugs. I also wrote it and quickly tested it entirely on my phone which was a bit painful. It should be pure bash, so it'll work in this type of situation.

EDIT: I'm bored and sleep deprived and wanted to do something, hence this nonsense. I've taken the joke entirely too seriously.

8 more...

My pain tolerance for shitty input methods has been permanently warped after experiencing psychic damage from using Teamviewer to connect to a system over a very flaky HughesNet satellite link. I was working for a vendor that supplied a hardware networking box to a stupid retail company that sells food and shit. I just wanted to ssh to our boxen on a specific network so I could troubleshoot something, but the only way I could get to it was via putty installed on an ancient Windows XP desktop on the same network as our box that could only be accessed with Teamviewer. My favorite part of that was that the locale or something was fucked up, so my qwerty keyboard inputs were, like, fucking transformed into azerty somehow?? The Windows desktop was locked down and monitored to a tremendous degree, so I couldn't change anything. The resolution was terrible, the latency was over a second, and half of my keyboard inputs turned into gibberish on the other side.

Oh, and I was onsite at that same company's HQ doing a sales engineering call while I was trying to figure out what was wrong. I spent 5 days sitting in spare offices with shitty chairs, away from my family, living that fucking nightmare before I finally figured out what was wrong. God damn, what a fucking mess that was. For anyone reading this, NEVER WORK FOR GROCERY/DRUG STORE IT. They are worse than fucking banks in some ways. Fuck.

EDIT: also, I asked 'why Teamviewer' and the answer was always shrugs. This was before the big TeamViewer security incidents, so maybe they thought it was more secure? Like, at least they didn't expose RDP on the internet...

2 more...

The arch wiki has a udev rule that can automatically do something if the battery crosses a certain threshold: https://wiki.archlinux.org/title/Laptop#Hibernate_on_low_battery_level

No polling which is great. I always try to do stuff on an event driven basis where possible for efficiency reasons. Gotta test this out though, since your battery might not send events for every percent change.

find is also just a fucking mess in terms of UX. The fact that the ordering of positional and optional arguments are so strongly tied to each other has always driven me fucking bonkers. Nowadays, I install fd everywhere I can and tell people to switch to it and never look back. locate is nice and all, but I always forget to update the db and I don't want it populating in the background.

tar doesn't bug me as much, provided you use unix or GNU style options. tar xvf foo.tar is just icky and less readable than tar -xvf foo.tar. I will happily concede that it's not very ergonomic though. I used to rely on things like dtrx (short for Do The Right eXtraction) because it was such a pain to remember the options for tar/unrar/unzip/7z.

2 more...

This is excellent news.

However, the article is a bit light on the details. Like, was the state being sued? If so, who was suing them? Also, can this be appealed? Or is the legislature there going to have to try to pass a constitutional amendment allowing the practice of forced birth? I'll go look it up, but I just find it odd that none of that context was provided in the article.

EDIT: here's an article with more details and the full text of the judge's ruling: https://www.wabe.org/breaking-judge-rules-georgias-restrictive-abortion-law-unconstitutional/

It will likely be appealed. The case is:

SISTERSONG WOMEN OF COLOR REPRODUCTIVE JUSTICE COLLECTIVE, on behalf of itself and its members et al. v. STATE OF GEORGIA

EDIT: AP is continuously updating the article, so I imagine that they'll probably add some or all of this context before long.

Nope, it would have no bearing on my decision-making process. Not my body, not my womb, not my fucking business.

oh my God it's like you're in my head get out of my head. I'm reading this because I'm trying to catch up on sleep and need to distract myself from the dread, so this hits way too close to home lol

The screenshots look really nice. I've personally always struggled with designing nice TUIs, so I really appreciate the way this looks.

I'd recommend trying out shellcheck and potentially building it into your repo as a CI check. I've written a ton of Bash over the years, and I've found shellcheck to be absolutely essential for any script over ~100 lines. It's not perfect, but it does do a great job of helping you avoid many of the foot guns present in Bash. I also dearly love this site. It's a fantastic reference, and I look at it almost every day.

I may take some time later today and provide a bit of specific feedback.

It very definitely was 😅 The way that company used the satellite network was cool, don't get me wrong. They would use it to push content out to all their stores with multicast which was really efficient with bandwidth. I loved it for that, but I hated interacting with it over unicast in any way, shape, or form. Horses for courses, as they say.

Ditto for tar and unrar, although I deal with .7z so infrequently that I have to look at the manual every time I use it.

find's fucked up argument handling really becomes a problem for me when I want to use it in a complex pipeline or when using the -exec flag. I've spent far less time debugging in those situations since switching to fd. I won't yuck the yum of folks who are comfortable and like find, but I feel that we probably have more approachable alternatives for new users.

I prefer "As Foretold."

Feminist as foretold.

FUCK.

I have once again been hooked all the way to the fucking gills.

Yeah, hypercapnia is fucked. I'm actually testing a small CO2 gas generator (literally just citric acid added dropwise to sodium bicarb with an acid trap and a dehumidifying stage) as a means to kill pests on houseplants and did some reading on the symptoms to be safe. It is unpleasant. It's not the worst death I could imagine, but it's shit.

As an aside, the way that CO2 kills bugs is interesting. Basically, the excess CO2 (in the range of 10-80,000 ppm) causes their spiracules (i.e. the little holes in their exoskeletons they use to breath) to stay open. This causes them to lose moisture until they die of dehydration (usually in a matter of hours). All this happens long before they asphyxiate or suffer from any sort of acidification from the CO2. It's a bit fucked up, but all other means of getting rid of the pests on my partner's houseplants have failed.

Rental prices are very possibly not determined by the market these days. RealPage and other companies like it may be colluding to fix prices at artificially high levels.

This ProPublica article covers the practice fairly well: https://www.propublica.org/article/yieldstar-rent-increase-realpage-rent

EDIT: apologies, that was the wrong article. This is the one I wanted to link: https://www.propublica.org/article/yieldstar-rent-increase-realpage-lawmakers-collusion

Because Vaxry (the lead dev) got banned from contributing to wlroots or any other FDO projects.

As for why he was banned, this is the only thing I've read about the whole thing: https://drewdevault.com/2024/04/09/2024-04-09-FDO-conduct-enforcement.html

Basically, he violated the FDO Code of Conduct when being told that a particular thing he said/enabled in a Discord community would not be acceptable if it was seen in spaces covered by said CoC.

This appears to be his response.

What if you need to file a bug? What if you have a question on the config that's not easily answered by the docs? If you never, ever find bugs and never, ever have questions, then sure, separate the two. There are genuinely people like that, but they're not common. If you're one of them, then I'm genuinely glad for you.

My opinion is this: You use software. You don't use people, but you sure as hell rely on them.

2 more...

I think this is my favorite version of this fucking meme so far. I am giggling.

I imagine that part of it comes down to motivation. I pretended to be an adult on a special-interest forum when I was twelve years old because I needed an escape from my miserable existence. At that time, I had no control over my life and every morning I woke up meant I had a new chance for traumatic shit to happen. I desperately needed to be someone else, so I took my time, researched shit, and avoided any conversation where I might be outed. I'm sure I didn't fool everyone, but I got some shocked responses when I went back as an adult and owned up to it.

Kids doing it for the authority boost or just as a childish fancy will be easier to spot. Kids doing it as a coping mechanism for their horrible lives will probably blend in a lot better.

I love that this is how I learned Biden is from Delaware.

I want to call out something, since I feel a connection is being drawn here that is not valid. His gun was not 3D printed.

Investigative sources said that the gun used in the incident consisted of two metal cylinders wrapped in vinyl tape, which could fire six projectiles when the trigger was pulled. When prefectural police examined the seized weapon, they found it was equipped with an electrical cord and battery and that it was designed to ignite the gunpowder with an electrical current.

Sourced from this site: https://mainichi.jp/english/articles/20220725/p2a/00m/0na/021000c

I'm not taking issue with most of what you said, but FDM 3D printers aren't the issue here. Making a gun can be done at home with essentially no tools. I don't think we should get pulled in to blaming societal issues on a single piece of technology.

I'm in a hurry so I've left this comment short, I may come back and edit it with more thoughts later.

2 more...

oh fuck I did misread it. Man, now I sound like a big ol' asshole. Sorry, OP :/ I had a bad week thanks to some ChatGPT code and just kinda jumped out when I saw the word "ChatGPT" next to Bash.

I find it interesting that the article makes no mention of his linguistic work (edit: this is not a criticism of the article, just an idle remark. It need not be mentioned, given the political focus of the article). The Chomsky Hierarchy has had a massive impact on the world of software development, for example. If you've ever written a regular expression, you've used his work.

7 more...

Your eye is still open under that flap though, no? I dabbled in Olympic pistol shooting back when I was doing across-the-course service rifle, and I was told to always keep both eyes open by the dude teaching me. Same for service rifle (and later palma). I always found that closing one of your eyes fucks up your focusing. If you don't have the little flappy dealy, you just do your best to defocus/deprioritize the view out of your non-dominant eye. I actually went for quite a while without any sort of cover because it helped me avoid cross firing (which is probably more of an issue with across-the-course than with Olympic pistol).

You're absolutely right about the lack of spectacles though. This guy is one hell of a marksman.

1 more...

I'm guessing it's nostalgia. The bananas in the original game had stickers on them, but the newer games didn't. There are a lot of people who love the old SMB games and are happy when anything is done to make the new ones like the old ones.

I don't get being so excited about it, but these games weren't a core part of my childhood. I played the party games in SMB 1 once and those were fun, but I don't think I ever actually played the main game.

For me, it's Arch for desktop usage. When I first started using Arch it would not have been Arch, but now it's Arch. The package manager has great ergonomics (not great discoverability, but great ergonomics), it's always up to date, I can get a system from USB to sway in ~20 minutes (probably be faster if I used the installer), it's fast because it doesn't enable many things by default, and it's honestly been the most reliable distro I've ever used. I used to use OpenSUSE ~10 years ago, and that broke more in one year than Arch has in ten.

I personally feel like Arch's unreliable nature has been overstated. Arch will give you the rope to hang yourself if you ask for it, but if you just read the emails (or use a helper that displays breaking changes when updating like paru) and merge your pacnews then you'll likely have a rock solid system.

Again, this is all just my opinion. It's easy for me to overlook or forget all of the pain and suffering I likely went through when learning how to Arch. I won't recommend it to you, but I'll happily say how much I've come to enjoy using it.

5 more...

I don't know the tone or content of your previous messages, but I appreciate that you removed potential misinformation and took the whole exchange as a learning opportunity rather than digging in your heels.

I also appreciate that @girlfreddy@lemmy.ca simply asserted the facts present in the article as a part of their initial message. It's nice to see positive interactions develop out of a less-than-ideal starting point.

1 more...

Nah, the slow hop-hop-hop is like a jog. Mustelids can fucking zoom if they're in danger or after prey. Like, even dopey-ass domesticated ferrets can get going pretty damn quick when they've been hurt or feel threatened. Nobody has posted what species of otter attacked this lady, but river otters can reach speeds of 47 kph (29 mph) on land. Sea otters are slow and fat, but these weren't sea otters.

You aren't outrunning a pack of otters in a sprint. It's no question that you could outrun them over a long distance, but mustelids are zoomy little fuckers.

(note that I like mustelids and had 4 ferrets, so please don't mistake my tone as being sour on them)

EDIT: holy shit, ferrets can be bred and trained to run at like 22 mph. That's insane!

1 more...

Let me provide my interpretation. Kamala Harris was naturally born, so she was made by a woman, hence the whole "woman-made destruction" comment. Trump was excreted out of a sewer-blocking fatberg that was impregnated after someone foolishly ejaculated down a storm drain.

Fuck man, I've only been awake for an hour and I'm already pissed off about this shithead. Time to take a break.

Ugh, I hate ChatGPT. If this is Bash (which it is, because it's literally looking for files in a directory called ~/.bashrc.d), then it should god damned well be using syntax and language features that we've had for at least twenty fucking years. Specifically, if you're writing for Bash (and not POSIX shell), you better be using [[ ]] rather than [ ]. This wiki is my holy book I use to keep the demons away when writing Bash, and it does a simply fantastic job of explaining why you should use God damned double square brackets.

ChatGPT writes shitty, horrible, buggy ass Bash. This is relatively decent for ChatGPT (it even makes sure the files are real files and not symlinks), but I've had to fix enough terrible fucking shitty AI Bash to have no tolerance for even the smallest misstep from it.

Sincerely, A senior developer who is known as the Bash wizard at work.

EDIT: Sorry, OP. ChatGPT did not, in fact, write this code, and I am going to leave my comment here as a testament to what a big smelly dick I was here.

2 more...

The other person may have responded with a fair amount of hostility, but they're absolutely correct. I run Kubernetes clusters hosting millions of containers across hundreds of thousands of VMs at my job, and OOMKills are just a fact of life. Apps will leak memory, and you're powerless to fix it unless you're willing to debug the app and fix the leak. It's better for the container to run out of memory and trigger a cgroup-scoped OOM kill. A system-wide OOM kill will murder the things you love, shit in your hat, and lick your face like David Tennant licked Krysten Ritter.

2 more...

I'm fairly certain that they lend to everyone, not just other tribes. The article makes it sound like the tribes out in the boonies need to do something to survive, and the US federal aid mandated in our treaties is hideously insufficient for their needs. Like, I think that what they're doing is bad because you shouldn't harm people, and you especially shouldn't harm people who are struggling. However, I can at least understand why they're doing it. I can also see that the society they're targeting shares responsibility for the situation. If the US had been continuously honoring the letter and spirit of the treaties we signed with the tribes, then the tribes would've have to resort to exploitative shit like casinos and predatory lending to make money. People will do whatever it takes to improve their situation, and it's a shame that the US has failed in this regard.

As an aside and for the sake of clarity, I think casinos are predatory and exploit people who don't understand their odds, but I'm not against their existence in general, or their existence on reservations. Native American folks can do what they want, it's their goddamned land, and the consenting adults who go to casinos have a responsibility to themselves. I only bring up casinos because of my perception of them and their presence on reservations.

(Also, fuck non-tribe people that use reservations as a way to skirt US regulations. I had no idea that non-tribe people used tribes as fronts for shitty lending operations. Again, kinda smells like something that could have been prevented with proper federal aid.)

They need to do what MacOS and Linux have done. There are safer ways to interact with and inspect the running state of the kernel in those operating systems (eBPF for Linux, a bunch of APIs I don't know much about for MacOS). Software needs a way to do the shit it's doing, you can't just turn it off and provide no alternative.

If Microsoft provides a safe API, then Wine can translate calls to that API and approximate the same degree of protection for Linux boxen.

I also agree with the other person, you should still be allowed to fuck around with the kernel on your own box. Major software vendors should be discouraged from writing shit that directly runs in ring 0, but end users should be allowed to do whatever.

As a Utahn, it pisses me off that we still have fucking coal plants here. We have 200-250 days of sun here. Shit, we're at 4-5000 feet of elevation, so the solar flux is fucking intense. Why the fuck haven't we built solar panels and shut these plants down? Why aren't our reservoirs covered in at least some number of panels to cut the evaporation? Rather than fix that, let's scum up the air for us and our neighbors with our shitty 1900s era coal plants and our fucking oil refineries that help contribute to some of the worst air quality in North America when an inversion hits Salt Lake City.

I have nothing but contempt for the basket of cunts our gerrymandered districts keep shitting out. It's amazing how ugly the politics can be in such a beautiful place.

4 more...

Isn't this just a research grant? Plus, it's like, 11 million dollars. That's a shitton of money, but also an inconsequential amount of money when compared to the dogfuck tire fire that is the US healthcare system.

Like, I am regularly filled with rage at the stupid ways the US and various states waste money that could have paid for meals, houses, or hospital beds. I hate how we don't take care of people who need help. I hate that we all have to live in a place where rage like this is normal and accepted and reinforced, because it means we're all suffering under so much shit and all we can do is get angry. This video just makes me feel sad because it looks like a trauma response. I can empathize with and try to understand trauma, but I can't encourage it.

I just don't think a concept study for a train on the moon is the cause for our problems. I don't think it even represents the cause for our problems, because at least it's trying to look forward and consider/solve issues that humans will eventually face.

5 more...

Yeah, I've been wondering how the fuck they pulled this off. If it turns out that the only pagers that exploded belonged to Hezbollah members, then that would signal to me that this was done entirely digitally.

I've heard that batteries (can't remember if it was laptop or phone batteries) contain the energy of a small grenade, but getting it to release that energy all at once without physical access is absolutely fucking wild and has serious fucking implications for device security.

EDIT: To avoid spreading misinformation, I'm providing this edit to say that the batteries absolutely were not the cause of the explosion. This was a supply-chain attack. Explosives were inserted into the pagers. The batteries in these pagers cannot be made to explode like this. I was overly excited when I made this comment.

13 more...

Ditto. Like, I think it'll become iconic in the same way the LLV is ugly-iconic. I just like it when government stuff so obviously prioritizes function over form.

what the fuck

What is it with this fucking man and disgusting dead animals‽ Like, this was before the brain worm started driving ffs! I really thought the brain worm was the reason this dude was so fucking crazy, but apparently not! It must be Rosemary Kennedy's ghost, tormenting the family for what they did.

EDIT: Jesus I just can't get over this. They're dead man you don't have to fuck with them just leave them alone and enjoy your time on the beach with your family or in Central Park throwing dirt clods at the drifters like you want to

just don't fucking touch the dead animals anymore

EDIT: I've done some more research and have learned a few things

  1. the US education system sucks at telling recent history because i just learned about RFK's assassination
  2. maybe he's all crazy and fucked up because his uncle and dad were assassinated when he was 9 and 14
  3. maybe he's all crazy and fucked up because he was doing fucking heroin from the age of 15 (jesus what does that do to a developing brain)
  4. maybe he's all crazy and fucked up because his family was probably neglectful (and possibly abusive) as hell because he certainly acted like a neglected and spoiled teenager (he was suspected of committing a bunch of crimes and shit with other kids)

like, I just want to understand what his fucking problem is. It was easy when it was the brain worm. I view him as a bit dangerous which is probably why I'm latching onto this and trying to understand his motivations. Dangerous people are easier to handle emotionally if you know why they're dangerous and what they want.

You're an absolute hero. I'm easily irritated by ads, and fandom has driven me to genuine rage a couple of times when I'm on mobile and only have DNS-based adblocking some of the time. It's a wiki, for Christ's sake, so why does it need so, so many ads‽ It's just static content most of the time!

edit: to provide more context, this is a frontend for fandom wikis that strips out the bullshit.

8 more...

I wrote a comment about this several months ago on my old kbin.social account. That site is gone and I can't seem to get a link to it, so I'm just going to repost it here since I feel it's relevant. My kbin client doesn't let me copy text posts directly, so I've had to use the Select feature of the android app switcher. Unfortunately, the comment didn't emerge unscathed, and I lack the mental energy to fix it due to covid brain fog (EDIT: it appears that many uses of I were not preserved). The context of the old post was about layoffs, and it can be found here: https://kbin.earth/m/asklemmy@lemmy.ml/t/12147

I want to offer my perspective on the Al thing from the point of view of a senior individual contributor at a larger company. Management loves the idea, but there will be a lot of developers fixing auto-generated code full of bad practices and mysterious bugs at any company that tries to lean on it instead of good devs. A large language model has no concept of good or bad, and it has no logic. happily generate string- templated SQL queries that are ripe for SQL injection. I've had to fix this myself. Things get even worse when you have to deal with a shit language like Bash that is absolutely full of God awful footguns. Sometimes you have to use that wretched piece of trash language, and the scripts generated are horrific. Remember that time when Steam on Linux was effectively running rm -rf /* on people's systems? I've had to fix that same type of issue multiple times at my workplace.

I think LLMs will genuinely transform parts of the software industry, but I absolutely do not think they're going to stand in for competent developers in the near future. Maybe they can help junior developers who don't have a good grasp on syntax and patterns and such. I've personally felt no need to use them, since spend about 95% of my time on architecture, testing, and documentation.

Now, do the higher-ups think the way that do? Absolutely not. I've had senior management ask me about how I'm using Al tooling, and they always seem so disappointed when I explain why I personally don't feel the need for it and what feel its weaknesses are. Bossman sees it as a way to magically multiply IC efficiency for nothing, so absolutely agree that it's likely playing a part in at least some of these layoffs.

Basically, I think LLMs can be helpful for some folks, but my experience is that the use of LLMs by junior developers absolutely increases the workload of senior developers. Senior developers using LLMs can experience a productivity bump, but only if they're very critical of the output generated by the model. I am personally much faster just relying on traditional IDE auto complete, since I don't have to change from "I'm writing code" mode to "I'm reviewing code mode."

3 more...

Wow, I had just assumed that life insurance was included in all of the genetic discrimination laws that were passed after the Human Genome Project got underway. It looks like Australia was ahead of the curve by passing legislation in 1992 (for comparison, the US passed GINA in 2008), but it's very odd to me that both of those laws excluded life insurance. I understand that insurance companies need to be able to mitigate risk, but it's a huge "fuck you" to anyone born with risky genes. It might result in slightly higher premiums for everyone, but it's a good move imo.