

Shellcheck, while good, doesn’t capture all best practices in my opinion. There are many items in that doc which shellcheck would happily allow, worst of all being set -euo pipefail.
Alt account of @Badabinski
Just a sweaty nerd interested in software, home automation, emotional issues, and polite discourse about all of the above.


Shellcheck, while good, doesn’t capture all best practices in my opinion. There are many items in that doc which shellcheck would happily allow, worst of all being set -euo pipefail.


I’ll say that during a recent week where I was forced to use an LLM, I found Claude Opus to be extremely poor at referencing this guide: https://mywiki.wooledge.org/BashPitfalls
it took almost an hour to get Claude to write me a shell script which I considered to be of acceptable quality. It completely hallucinated about several of the points in that guide, requiring me to just go read the guide myself to verify that the language model was falsifying information. That same task would have taken me about 5 minutes.
I believe that GIGO applies here. 99% of shell scripts on the internet are unsafe and terrible (looking at you, set -euo pipefail), and Claude is much more likely to generate god awful garbage because of the inherent bias present in the training data.
And as for unit tests? Imo, anything other than property-based testing is irrelevant. If you’re using something like Pydantic, you can auto-generate a LOT of your tests using the rich type annotations available in that library along with hypothesis. I tend to write a testing framework once, and then special case property tests for things that fall outside of my models. None of this is super helpful for big ugly codebases with a lot of inertia around practices, but that’s not been my environment, thankfully.


Current sodium chemistries have a kinda shitty voltage curve. I expect it will get better, but right now a LOT of the power delivery happens with voltages below 3 volts. LFP batteries deliver most of their power at higher voltages which lets you use thinner conductors and cheaper/more efficient electronics.
Again, not saying that it’s necessarily an inherent flaw in sodium chemistries, just that the current generation that people can access and test right now is unsuitable for some tasks.


set -e: Exit on error. Very useful, but notoriously weird with edge cases (especially inside conditionals like if statements, while loops, and pipelines). Don’t rely on it blindly as it can create false confidence. (Pro-tip: consider set -euo pipefail for a more robust safety net, but learn its caveats first.)
while I appreciate that the author mentions how weird this is, nobody is going to learn all the caveats correctly. Don’t use set -e. Don’t use set -e. Don’t use set -e. It’s a shit ass broken ass fucked feature that half of nobody understands well. Here’s a great wiki page explaining why it’s trash: https://mywiki.wooledge.org/BashFAQ/105
People like Go, and Go requires you to manually and stupidly handle every possible error case. Why not do the same for shell? It’s really quite easy:
#!/usr/bin/env bash
echoerr() { echo "$@" 1>&2; }
die() {
message="$1"; shift
exit_code="${1:-1}"
echoerr "$message"
exit "$exit_code"
}
temp_dir="$HOME/tmp"
mkdir -p "$temp_dir" || die "Failed to make persistent temporary dir $temp_dir"
lc_dir="$(mktemp -d -p "$temp_dir")" || die "Failed to make target dir in $temp_dir"
Look at that, descriptive error messages! And it doesn’t depend on a shell feature that is inconsistent between versions with no good documentation about all of the fucked up caveats.


deleted by creator


So uh, OPNSense?


Sounds like a perfect use-case for some subsonic .300 Blackout rounds.


These other responses are annoying. This looks really cool, and I hope that it works well for you and your friends! We definitely need good discord alternatives ASAP, and more options are better imo.
One cool feature would be some sort of official support for interop/bridging to other services. That might help to boost adoption and would make the “why not just contribute to Y” people be quiet.


If you want extreme flexibility, use Arch Linux, since it makes it trivial to swap out which window manager you’re using. It sounds like you’re familiar with Linux at this point, so you probably have the requisite knowledge to give Arch a spin.
Niri is supposed to be a pretty interesting WM if you’re looking for something new. I’d be interested to hear why i3 was too much, since I found it to be pretty smooth to pick up.


Lethal Company is a fantastic game imo.


As someone posted elsewhere, this is an ultralight aircraft and is therefore forbidden from flying over populated areas.


It’s getting encoded. % is a special character in URIs. Let me try posting it inside of back ticks, as well as triple back ticks:
https://noai.duckduckgo.com/?q=%25s
https://noai.duckduckgo.com/?q=%25s
I’ve noticed that there’s a plague of threadiverse clients which improperly escape/encode URIs. It’s most evident with how they mangle parenthesis in Wikipedia article titles.


Sheesh, it’s 5 GB with pnpm. Isn’t that meant to deduplicate dependencies?
Anywho, it looks like --prod isn’t being set in the Dockerfile, so dev dependencies are being included. I’m no node dev, but I remember this being something that people needed to set to shrink node_modules with npm. That might be an easy win.
You need to read Guns of the Dawn next. It’s SO GOOD. It’s not science fiction, but in my opinion, it’s one of his very best novels.
My public schools had teacher/student ratios up to 35-1. Good old Utah.


Piefed might support what they need at this point. I’ve heard the devs really focused on moderator tooling.


journalctl -b -1 will show you the logs from the previous boot. journalctl -k -b -1 will do the same for the kernel logs. If you’ve rebooted again since, just use -2 instead of -1.
I don’t believe that does the same thing either. What if I lock my computer, sleep it, and step away for the day? I haven’t logged out, but my interactive session has ended.
Uptime shows how long the system has been up, not how long one has been interacting with the system.
I gave it no advice, and all I wanted it to do was generate a script to tell me the file type of the newest file in the current directory. It was a very trivial piece of code. Each time it generated something I disliked, I told it “don’t do this, reference this guide for the correct thing to do,” or “don’t do that, do it in such a way that X happens.” It was like 20 lines of bash in the end.
I was expecting it to write me a bash script because that’s the example that everyone, without fail, says will work well. “I just used Claude to write a little throwaway script to move some files around” were the exact words a colleague used.
Bash is a shitty, unsafe language. I don’t write large programs in it. I expect “throwaway scripts” to still be written in a way that defends against all of the innumerable shitass foot guns present in the language. Claude was incapable of doing this in a reasonable time frame.
I also dislike the Python and Go it generated, while we’re at it. It produces overly verbose, overly documented, poorly performing code. It was also fucking dog shit at referencing runbooks and documentation in a local folder when I was on call and responding to alerts.
It sounds like you’re quite partial to Claude, and I hope it’s been a very good and helpful tool for you. I did not find it to be particularly helpful for me. It was very good at putting me in a sour mood, however.