- 6 Posts
- 84 Comments
esa@discuss.tchncs.deOPto
Programming@programming.dev•Brendan Gregg's special collection of freeware tools for system administration
6·6 months agoBe kind, rewind.
esa@discuss.tchncs.deto
Programming@programming.dev•Scripts I wrote that I use all the time
1·6 months agore:
mkshI have snippets in my editor for shebangs++. E.g.#!<tab><enter>nets me#!/bin/bash set -euo pipefailor
#!/usr/bin/env python3 # pyright: strictetc
esa@discuss.tchncs.deto
Programming@programming.dev•I am sorry, but everyone is getting syntax highlighting wrong
27·6 months agoThe stance coupled with the garish background colour reminds me of how Pike also had a very dismissive view of using colours for syntax highlighting, and then later opened up about having a kind of colourblindness.
Both of them also seem to mean colour when they write syntax highlighting. That’s just one typographic tool among many. We also use bold, italics, underline, and even whitespace to highlight programming syntax. We could write a lot of programming languages as if they were prose, but we don’t. People hate that and call it “minified code”.
Humans also have a great capacity for colour vision, much better than most mammals. Some of us are even tetrachromats. Our colour vision is basically a free channel of information: It’s always on; we don’t have to concentrate to be able to discern most colours. When things in nature are more colourful than usual, like leaves in fall or a colourful sunset, we don’t find it tiresome; we find it refreshing and seek it out. But when our built environment becomes all shades of grey, we tend to find it depressing.
But humans are also different in many ways here. Better or worse colour vision is one thing, but some are also prone to getting overstimulated; others require more than average stimuli. We have great selective attention as a species, but again, individuals vary. There’s no one syntax highlighting that works for everyone.
Ultimately we should just find some syntax highlighting that we find generally pleasant, and then stick with it until we reflexively use the information carried in those colours. Use habit formation for our benefit.
Tonsky may enjoy his garish background colour and have found a mushy colourscheme that works for him, but he’s also way off base in his assessment of colourschemes in general.
Distribution usually isn’t considered a strong point for Python, though.
For other languages that build a static executable, the more expected method of distribution would be some automated workflow that builds artifacts for various os/architecture-triplets, that you can then just download off the project page.
esa@discuss.tchncs.deto
Comic Strips@lemmy.world•Superpowers or Now You're Breathing Consciously
51·7 months agoPeople with aphantasia: You have no power here!
esa@discuss.tchncs.deOPto
Programming@programming.dev•The challenge of maintaining curl
5·7 months agoIsn’t that just nitpicking?
No, because the definitions are phrased very differently. Software doesn’t have to be copyleft to be considered FOSS either, as is the case with tons of BSD and MIT and whatnot code that’s used in proprietary programs—all they have to do is make it clear that they’re using their software (and even that’s not a given).
Even with copyleft licenses like the GPL, as long as they never distribute their software to anyone they don’t have to offer them the source code either, as with so many backends. The AGPL gives consumers of distributed systems some more rights.
Free software is mostly about providing you rights when you encounter the source code, meaning that you’re allowed to modify it and share it. This is as opposed to stuff like “source available” licenses that permit you to read the source code, but not modify or share it.
esa@discuss.tchncs.deOPto
Programming@programming.dev•The challenge of maintaining curl
11·7 months agoSuch a license would neither be regarded as free software nor open source.
Some other alternative could be making
GPL-3.0-or-later+ a Contributor License Agreement a more common option, so that it is possible to tell companies that if they want to use the library in some closed-source application, they need to work out a license deal.CLAs are frequently involved in turning software proprietary though, so it isn’t exactly held in the highest esteem in the FOSS community.
And without a CLA you essentially get the Linux kernel situation, which will be stuck on GPL2 forever, since they can’t reasonably get everyone to agree to switch to GPL3, especially since some copyright holders are not just unwilling, but unreachable or dead (and in several jurisdictions copyright lasts for decades after death).
Personally I suspect public funding, similar to science, education and libraries, is a more likely option, though that’ll be an uphill political struggle a lot of places.
esa@discuss.tchncs.deOPto
Programming@programming.dev•The challenge of maintaining curl
6·7 months agoYep. I wonder if that CRA compliance stuff won’t change that. Industries with strict demands on safety should be putting in work and resources to ensure that those demands are actually met, but how the CRA deals with FOSS took a bit of work to not be a complete disaster, and I can’t imagine it’s easy for FOSS projects to work out the details there.
As in:
- The automotive industry absolutely should be CRA compliant,
- it’d be nice for everyone if cURL was known to be CRA compliant,
- compliance doesn’t appear by magic, someone has to put in work,
- companies that should be CRA compliant should help with that work.
In the case where they don’t want to pitch in, well, something cURL-equivalent but known CRA-compliant won’t just fall off the back of a wagon, which means the companies that need compliance have a problem.
Then again, apparently the HPE Nonstop ecosystem has
gitavailable on their platform all through the spare-time efforts of all of one dude, which absolutely shows that critical systems are willing to rely on precarious software, so I’m not gonna hold my breath.
esa@discuss.tchncs.deOPto
Programming@programming.dev•The challenge of maintaining curl
13·7 months agoYeah, it’s once again a case of a central piece of software in a very precarious situation, and businesses that aren’t … quite mindful of the fact that they’re making demands from someone they’re not paying.
Why is this linking to what appears to be another link aggregator, rather than what appears to be the original blog post?
Well,
bash should show up quickly enough. But yeah.I’m also no longer much of a bash guy. Back when I was my scripts were a lot simpler, and broke in weird ways a lot more. And every time I picked up a new defensive habit, my bash became a little bit uglier, and I thought to myself “maybe I should just do this in Python”.
But this script would be a lot longer in Python.
IME I’ll rather find some openapi docs for Google than their actual product docs. As in, I’ll start out trying to read their kubernetes docs, then shortly after it’s “fuck it, I’m going to docs.rs/k8s-openapi”.
My actual worst case are Elastic’s docs, though. Somehow they have plenty of stuff in there, just never the stuff I’m trying to figure out.
For those who want to give it a go:
#!/bin/bash set -euo pipefail while read -rd ":" path do for bin in "$path"/* do # don't error out if there's no manpage set +e man "$(basename "$bin")" set -e done done < <(printf '%s%s' "$PATH" ":")when you get sick of it, hit
^Z(ctrl-z) and gokill %1. Then you get to start all over from the start next time!Bonus points for starting a tracker so you can count how long it takes to go from “eugh, what’s with that overwrought and excessively defensive bash script” to “fuck, now I’m doing it too”
esa@discuss.tchncs.deto
Programming@programming.dev•Explaining Why Devs Burn Out So Often
15·9 months agoHumans also frequently need to try a wrong approach first to get the idea of a better approach, no matter if we’re rested or not. Which is why it’s important to be able to throw away prototypes rather than push an “it seemed like a good idea at the time” to prod.
But having a good sleep, walk in a park, shower, etc lets us think better than if we’re just banging our heads in the same corner all day long. Breaks are important. General health, too.
The fourth … appendage on the left hand is being used like a thumb, and doesn’t have any indication of knuckle even though it’d be the most bent finger if it was one. I’d say we can see four fingers on the right hand, while the left is in an indeterminate slop state where it’s only partially a comic/Disney three-finger hand, with one extra slop appendage that’s not clearly either thumb or finger.
Same reason as the vampire has one hand with four fingers and fingernails, and one hand with three fingers and no nail: LLM slop
Kinda. At the last strand I expect them to switch to length.
But yeah, at some point should be good enough
We could probably stand to have some organisation standards in repo roots, but I tend to agree that dotfiles aren’t the way to go there. The project root is similar to
~/.configand the like: When you’re there you should not be subjected to further hidden levels. Those config files are a significant part of the project.State files however, like all the stuff in .git, lockfiles and the like are generally¹ fine to hide away. Those are side effects of running other tools, not ordinary editable configuration. Same goes for cache—and both cache and runtime files should likely go in the ordinary XDG dirs rather than be something every project has to set up a
gitignorefor.If anything I’m more frustrated with the C projects that just plop every source file in the root directory.
¹ Just don’t make it too easy to sneak unexpected crap in there. We don’t need to make the next Jia Tan’s job easier.
There’s wasm if you need to target browsers.

Not that big on ligatures in monospace, really. I think I just go with what seems to look kinda nice and has a big enough amount of symbols to not look weird once a few of them are needed.
Also generally prefer dotted zero, or an inverse Ø. Fonts that make 0 and Ø look the same might as well just drop the slash altogether.
In spite of that I’ve been using Fantasque Sans Mono for years. At least the slash in its 0 doesn’t extend beyond the circle like in an Ø.