No stream today. However, I will be looking into Bittorrent's DHT protocol tomorrow! Hope to see you then. 0530 MDT.
Interested in Free and Open Source Software (FOSS), proponent of making computers easier to use by expanding the operations an operator can use. Users should have a pipeline towards being able to operate a computer instead of simply using it. I like looking at obscure and rare software technologies, I feel there are too many projects that died due to capitalism rather than failing due to merit. Big fan of 9p as an inter-process communication channel.
No stream today. However, I will be looking into Bittorrent's DHT protocol tomorrow! Hope to see you then. 0530 MDT.
Some thoughts from my self-reflection today. Maybe this helps someone.
I had to deal with a bunch of broken things today. Normally that greatly bothers me, but these were things I broke, and I broke them long ago. I have a lot of anger due to the circumstances around why I was never able to fix them. But that's not helpful. I could spend my hours in rage, or I could keep in mind that I can't undo the reasons for my anger. I can work towards fixing them, or documenting the problems (so I can actually get around to fixing them later), or I can actually spend the time fixing them. There's only so much time, only so much energy. One can't always control their emotions, but they can control if they accept and understand the state of things. They can control how they see the situation. They can control if they can see a way out, a way forward. Build a path forward. I don't want to stew in all my negative emotions anymore.
If you can move forward, you can progress. You need to progress to heal (though not all progression is healing). Take the path that makes things better.
Everyone deserves a good life. You deserve a good life.
A while back I discovered that ttyper (a typing test program for the terminal) can use a custom wordlist. I decided to create one entirely out of words I always misspell. I don't think my WPM will ever recover TT
Blocks are what Smalltalk calls closures (a lot of other languages call them lambdas). They're functions that can capture some state from the surrounding environments.
C originally had a qsort
function, with this signature:
void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
This takes a comparison function as a callback. It's fine if that function is stateless, but what if it needs to mutate some state along the way? Now that state goes in a global that the function refers to. But now your calls to qsort
with that function are not thread-safe so you need some locking.
BSD UNIX (I think?) introduced qsort_r
that looks like this instead:
void qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *thunk);
Now the function takes an extra void*
argument. You can create an on-stack structure and then pass a pointer to it in as the thunk
parameter. In the implementation of the compare function, you then cast it back. This works fine but is not the easiest API to use.
Apple introduced a version that takes a block instead:
void qsort_b(void *base, size_t nmemb, size_t size, int (^compar)(const void *, const void *));
This is functionally equivalent to qsort_r
but now the compiler is responsible for managing the thunk. You can declare a block inline and use it like this:
__block int calls = 0;
qsort_b(someArray, someArraySize, ^(const void* l, const void *r) {
calls++;
return someSensibleComparison(l, r);
});
Now the function for the callback is entirely local to the function that calls qsort and the captured state is tracked automatically (if you don't write __block, it's copied, if you do then it's shared).
@david_chisnall Ah neat. I'll have to look more into this. Thank you very much for the thorough reply :D
@david_chisnall That sounds interesting. I'm having some trouble looking for "block callback" as a term. Do you have any resources of what the usage looks like?
I’ve been thinking of making some short form videos about historical #Unix versus current releases of #FreeBSD, #illumos, #Linux and macOS, occasionally 9front if I find way more time than I expect.
I’m leaning toward preferring v6 due to its preceding BSD1 & PWB, the Lions book, MIT’s xv6 (and modern projects like rust rewrites).
I’m planning to start with straightforward userland experience first: sh, cc, ed & basic file operations. Anyone got topics they’d like to see?
@cpt Oh that's neat. I'll have to try that out, see if it's better than my current hacky solution
@javalps Those are read errors, not corruption. The drive is failing. The entire drive will stop working soon enitrely
Please boost for reach:
Assistive Technology Training for the Blind & Visually Impaired
Are you or someone you know blind or visually impaired and looking to get the most out of assistive technology? I offer personalized training to help you navigate your devices with confidence—whether at home, school, or work.
I provide expert training on:
✅ Screen Readers – VoiceOver (iOS, iPadOS, macOS), JAWS & NVDA (Windows), TalkBack (Android)
✅ Braille Devices – BrailleSense 6, BrailleNote (HumanWare), BT Speak, and other Braille displays
✅ Technology Integration – Connecting Braille displays to computers & smartphones
Training is available remotely via Zoom, Microsoft Teams, or other platforms. In-person sessions may also be arranged.
📍 Rate: £15/hr
📞 Contact: 07447931232
Empower yourself with the right tools for independence. Get in touch today!
Cool. So now that AI is going to replace all the people who do the work, and those people all worked so they could afford the products that companies produced, we're moving to a post-money society, right? ..right?
Because the (il)logical end of this path is that we all have no money or food, but a lot of "spare" time to sharpen old pitchforks and a burning desire to eat the rich.
@javalps dmesg is probably going to contain the reason why when that happens. I strongly suspect your drive is failing, you can look at the SMART information to confirm this.
Oh yeah, while I was waiting at the Apple Store, I had to be in the same room where one of the Apple Schmucks was demoing "Apple Intelligence" to the captive audience of people just wanting to get their screens fixed. His big pitch was, "Hey Siri, write a resignation letter as a poem in the style of Robert Frost." It was excruciating.
Is there any app or command-line tool on #Linux that could help organise and clean up a ton of photos/videos?
Maybe something that could recognise duplicates (bonus if not simply relying on checksums like I'm currently doing on my own) and sort them into folders based on dates so they don't get too huge to load all at once.
@somebody Were you quoting something?
@Li @somebody @simple_sabotage I hope friendships were made
@Li @somebody @simple_sabotage That's how I parsed your story at first too. Their brains are clearly the source of that initial study that gave us the "you only use 1% of your brain" myth