@toolbear@mlncn It is harder for people to instigate new social norms. Rules help with that. E.g. smoking in public places. I mean, tech blogs on here keep posting AI images and nobody's telling them to quit it.
#Steam has a tag for retro-styled #FPS games 'boomer shooters', and WHAT?? Do they mean boomers as in the generation? Boomers were not playing #Doom, etc. It was GenX gamers! I know, I was there!
@supergarv I wrote a typed data system where getters will autovivify internal objects. But the state as the outside world sees it remains the same. Does that count as changing state or not?
@supergarv It shouldn't. Though it did cause me some headscratching one time when I was debugging, but that was a) because I hadn't documented my code well enough 🙄 and b) there is an actual bug in there that I don't know how to resolve from a conceptual POV.
@supergarv Yup! It's a case I hadn't considered properly when I designed the system and I can't see any behaviour which would be 'correct'. I need to have a big rethink and do a 2.0 one day.
I've just seen a #programming pattern in #PHP where a method could return two lists of things. Instead of doing that, it takes as a parameter a callable, and passes the two lists to the callable. Instead of:
[$a, $b] = getLists($param);
// Act on both lists.
we have:
$callable = function($a, $b) {
// Act on both lists
}
actOnLists($param, $callable);
@das_g Thanks for the analysis! actOnLists() isn't lazy, but it does need to make queries. Further complexity is that it actually retrieves more than one pair of lists. I imagine the higher-order function pattern was written here to avoid returning an array of arrays, or writing a value object class for just this one purpose. I'm not sure how much of a gain I consider that though, as I find the current pattern hard to get my head round.
In the same way most of us say “goodbye” without realising it derives from “god be with ye”, maybe one day people will end conversations with “likensubscribe”
Why you should never fill in the backstory from @pluralistic The best case for me was when the Doctor Who writers finally succumbed to the temptation to show the Time Lords on Gallifrey, who turned out to be about as exciting as the UK House of Lords
@johnquiggin@pluralistic This is why I think the timeless child is a good thing, even if its execution was a bit rubbish - we once again have a mysterious backstory for the Doctor.
I really hate haddocks' eyes in code #documentation 'Defines the Foo class', 'Provides an implementation of the foo plugin'. No. It IS the Foo class. It IS the foo plugin.
@ekes That rendering was available as a layer on the OSM site for a while, and then removed. No idea why! It's definitely better, though the shades of blue for tram and metro are far too alike.
Is there a concept in #programming for whether an #API is inward or outward? For example, suppose I have an interface whose intention is that other code can implement it, but it's only supposed to be called by the internals of my code: it's public for implementation, but internal for callers.
@jbutz Yes, Drupal plugins is where I've encountered this. My module consumes the plugins, but other modules can implement further plugins to extend functionality.
@aaronfc APIs can go in both directions as well though - for example, a service that you can call and whose class you can replace is an API that's both inward and outward. You can call it and you can implement it.
@rupertj@internal is the total opposite of API though - it means the whole thing can change at any time. A plugin interface isn't internal, it's a one-sided API.
@aaronfc Some interfaces are meant to be called and implemented. Some are only meant to be implemented and not called. There might be cases (I can't think of any) that are only meant to be called and not implemented.
The thing is, if I wanted my computer to record me, I'd want it to record the three sentences I typed without noticing that my app had crashed and whose text has vanished because I was typing into an unresponsive window. How the fuck is a screen recording going to get me those back, huh Microsoft? #Recall
@marcprecipice@KidicalMass Two requisites of any #KidicalMass ride: a kid with toy baby carrier on their bike containing their teddy, and an old dude riding a recumbent come to support and show solidarity!