Yeah agreed on the 100 lines, or some other heuristic in the direction of "this script will likely continue to grow in complexity and I should switch to a language that's better suited to handle that complexity".
syklemil
They shouldn't know directly, but they can still be informed by public discourse whether it seems like they have a majority normal users with some creeps thrown in, or if the only circles discussing and promoting their services are nazis, or etc.
So yeah, it's not a 100% identity between the two, but the point remains that the actions of the owners / operators will influence whether they'll be interpreted as openly running a nazi bar, or trying to run a normal bar but struggling to keep cryptofascists out, or something on that scale.
Privacy focused services will generally be sought after by nazis, illegal arms dealers, CSAM dealers (but I repeat myself). But like with the nazi bar analogy, they need to handle it properly and take certain stances to avoid that group becoming their only customers—and the rest of us blocking it.
I think I mentioned it, but inverse: The only data type I'm comfortable with in bash are simple string scalars; plus some simple integer handling I suppose. Once I have to think about stuff like "${foo[@]}"
and the like I feel like I should've switched languages already.
Plus I rarely actually want arrays, it's way more likely I want something in the shape of
@dataclass(frozen=True)
class Foo:
# …
foos: set[Foo] = …
-e is great until there’s a command that you want to allow to fail in some scenario.
Yeah, I sometimes do
set +e
do_stuff
set -e
It's sort of the bash equivalent of a
try {
do_stuff()
}
catch {
/* intentionally bare catch for any exception and error */
/* usually a noop, but you could try some stuff with if and $? */
}
I know OP is talking about bash specifically but pipefail isn’t portable and I’m not always on a system with bash installed.
Yeah, I'm happy I don't really have to deal with that. My worst-case is having to ship to some developer machines running macos which has bash from the stone ages, but I can still do stuff like rely on [[
rather than have to deal with [
. I don't have a particular fondness for using bash
as anything but a sort of config file (with export SETTING1=...
etc) and some light handling of other applications, but I have even less fondness for POSIX sh
. At that point I'm liable to rewrite it in Python, or if that's not availaible in a user-friendly manner either, build a small static binary.
The logs are handled, but I mostly use it for command separation and control, including killing unruly child processes.
At the level you're describing it's fine. Preferably use shellcheck and set -euo pipefail
to make it more normal.
But once I have any of:
- nested control structures, or
- multiple functions, or
- have to think about handling anything else than simple strings that other programs manipulate (including thinking about bash arrays or IFS), or
- bash scoping,
- producing my own formatted logs at different log levels,
I'm on to Python or something else. It's better to get off bash before you have to juggle complexity in it.
Yeah, Rust is ultimately a different project than Go, and I suspect much of the success of Go is down to stuff like good tooling, default GC, native static binaries, generally easy concurrency, rather than stuff like having as bare-bones a language as otherwise possible. I'd suspect having a focus on fast compilation also helps draw in people from interpreted languages.
It's easy to write a Kubernetes microservice that performs adequately with Go, and that's all a lot of people & teams need.
Yeah, the Go creators seem to generally mean "resembles C" when they use words like "simple", which could explain stuff like going "why do you need generics when you can just cast?" for, what, ten years?
I remember trying some Plan9 stuff and bouncing off it, including acme. I guess it's the kind of thing that makes sense to Pike but not to me. Not sure what gophers in general think of it (but wikipedia lists at least Russ Cox as a user).
I suspect my habit of having an alias userctl="systemctl --user"
is slightly unusual, as is running Firefox, Steam, and some other graphical programs as systemd units is somewhat unusual (e.g. mod4-enter
runs systemd-run --user alacritty
)
But what I'm actually pretty sure is unique is my keyboard layout. I taught myself dvorak a summer some decades ago, but the norwegian dvorak layout has some annoyances, so I've made some tweaks. Used to be a Xmodmap
file, but with the switch to wayland I turned it into a file in /usr/share/X11/xkb/symbols/
.
Part of what I did to teach myself dvorak and touch-typing at the same time was randomize the placement of the keycaps too. It has a side effect of being a kind of security by obscurity layer: I type quickly and confidently, but others who want to use my machines have an "uhh …" reaction.
This comes off as a weird mash of ideas, and it's not clear what they mean by "traditional programming languages"—the link seems to include Typescript, which is younger than Rust, which is _not_presented as a "traditional" programming language.
The whole thing comes off as … something a Murdoch-owned site would dream up, maybe?
This runs into a part of the unix philosophy about doing one thing and doing it well: Extending programs to have more (absolutely useful) functionality winds up becoming a security risk. The shell is generally geared towards being a collection of shortcuts rather than a normal, predictable but tedious API.
For a script like that you'd generally want to validate that the input is actually what you expect if it needs to handle hostile users, though. It'll likely help the sleepy users too.