News for hackers. Stuff that matters.

throwaway073123

Re:Iterators are (maybe) coming to Go on Monday August 14, 2023 @03:24PM (#37125621)
Absolutely. If I see a one method interface, I generally assume that there's a ThingDoerFunc type that implements the interface.

Likewise, (ThingDoerImplemetation{}).DoThing is a valid func reference

Hence I say there's not really a one size fits all, there are a options for different circumstances.

Re:Iterators are (maybe) coming to Go on Sunday August 13, 2023 @12:07PM (#37111194)
> particularly in Go where everyone crams everything into single-func interfaces which are almost exclusively far worse

Depending on scope, I've grown to prefer the single func interface.

For a smaller scope use, say filepath.Walk, absolutely, pass in a closure, good stuff.

For larger stuff, like say a chain of http middleware and handlers, I think it can be very limiting.

you get a big benefit from using the interface over a function: the underlying type _can_ have more methods and implement.

this gives room to implement a parallel interface, for example, to collect all possible routes, or to trace what handlers a request would pass through.

I don't think there's a one-size-fits all approach, use whatever gives the effort:utility tradeoff you're looking for.

Re:Self-modifying code using GCC (2011) on Monday August 07, 2023 @10:57AM (#37035360)
- JIT / optimizing for the host device

- hot patching

- making sure sysadmins have healthy sense of panic available to them at all times

amd needs to make itself a first class citizen
Re:Systemd auto-restarts of units can hide problems from you on Tuesday August 01, 2023 @12:31PM (#36958321)
Auto restarting is actually intended to hide problems! ...from the user. The user, who probably isn't you if you're developing or administrating a service.

Any supervisory process, systemd, supervisord, kubernetes, etc should absolutely be making those restarts visible to the administrator so that they can resolve it.

The restart is just in hopes to keep the service available (symptoms in check) until the problem is actually fixed (disease is cured).

Re:Temple OS Theme for Arch Linux on Monday July 31, 2023 @10:07PM (#36951488)
My father had schizophrenia, and my wife has tourettes.

It's a completely different scenario. Someone with tourrettes knows what just happened. They're probably deathly embarrassed and apologetic.

In the schizophrenic case, they're being aggressive, hurtful, belligerent -- no one is obligated to sit through that. There's no reasoning with them, there's not even a discussion happening.