@oblomov@sociale.network avatar

oblomov

@oblomov@sociale.network

logical

This profile is from a federated server and may be incomplete. Browse more on the original instance.

oblomov, to programming
@oblomov@sociale.network avatar

I have a question for people with better theoretical background on and especially for developers.

Is the following pattern known and does it have a name?

I have a number of classes (call them C1, C2, etc) that all derive from the same class B. I have a superclass (template, actually) D that derives from C1, C2 etc. To have a single B, the standard solution is to go with virtual inheritance to close the diamond (so far, so good).

1/n

oblomov,
@oblomov@sociale.network avatar

In this particular case, however, I can do something a bit crazy (it works because of how the classes behave): I can change the diamond inheritance into a “chain” of inheritances, by making the Ci classes into templates whose parent is their template parameter.

So for example, instead of D<C1, C2> that derives virtually from B and then from C1 and C2, I can have D<C1<C2<B>>, and in this chain D derives from C1, that derives from C2, that derives from B.

2/n

oblomov,
@oblomov@sociale.network avatar

(If it helps, these classes are needed to model a pretty sophisticated iterator; B is the base iterator, C1 and C2 are specializations, and D is a class that needs to iterate as C1 up to a certain point, and then as C2. Replacing the diamond inheritance with the chain means that the iterator increment simply falls back to the next iterator in the chain after it has done its job).

3/n

oblomov,
@oblomov@sociale.network avatar

I've honestly never seen this pattern used or documented before, but I'm not exceedingly familiar with the literature, and I don't know how to look for it. Since I've been asked «is this novel?», I'd like to be able to say something more than «to the best of my knowledge, it is».

#fediHelp #askFedi #programming

4/4

oblomov,
@oblomov@sociale.network avatar

@simontoth thank you very much. Does it have a name and/or is there a reference where I can find more information on it (and on the policy-based design you mention)?

oblomov,
@oblomov@sociale.network avatar

@simontoth Thank you very much. Apparently we're actually using policy-based design in much of our code already (without knowing what it was called 8-D), although obviously not for the case I mentioned. I'll see if we can adapt our code to use this same approach. Thanks again!

chjara, to random
@chjara@akko.wtf avatar

>45 percent [of CEOs] admitted they were already making major business decisions with ChatGPT.

:woozy:

oblomov,
@oblomov@sociale.network avatar

@chjara interesting. Time to train ChatGPT on socialist texts and to replace CEOs altogether.

kaia, to random
@kaia@brotka.st avatar

do you know any recent affordable Thinkpad models? a friend wants a laptop and saw mine

oblomov,
@oblomov@sociale.network avatar

@jeder @kaia
confirmed. Worst laptop I've ever had. (Source: it's my current laptop.)

bluberrycookie, to random Italian
@bluberrycookie@mastodon.bida.im avatar

Noi ridiamo e scherziamo, ma là fuori è pieno di adolescenti intrappolati in corpi di adulti ultratrentenni che usano "ritardatə" come insulto. 🤡

oblomov,
@oblomov@sociale.network avatar

@gepi @bluberrycookie

104

ho detto tutto.

oblomov,
@oblomov@sociale.network avatar
oblomov,
@oblomov@sociale.network avatar

@gepi @bluberrycookie secondo me a modo suo è geniale (pur rimanendo stronza). Ma soprattutto è indicativo come tutte le attenzioni al linguaggio sono inutili, perché la gente troverà sempre il modo per esprimere il concetto.

kaia, to random
@kaia@brotka.st avatar

sadly nobody ever dies in a TV duel

oblomov,
@oblomov@sociale.network avatar

@kaia is a TV duel one where people lob TV sets at each other?

juc, to random Italian
@juc@livellosegreto.it avatar

Stavo guardando con l'altro account delle belle foto di "dandelion" che è il termine inglese per "tarassaco" anche detto "dente di leone" - che tutto sommato a "dan-de-lion" ci assomiglia, mi chiedo (ma non ho voglia di cercare) se c'entra il francese...

In ogni caso mi è venuto in mente di rovinarvi tutta la poesia della cosa e informarvi che qua a Verona li chiamiamo "pissacani", che suona esattamente come "pipì di cane" (e forse vuol dire proprio quello). 🤭🤭🤭

oblomov,
@oblomov@sociale.network avatar
tess, to random
@tess@mastodon.social avatar

Jet City vs. Rose City Axles of Annihilation

Or: A Valiant Effort Put Forth Against a Far Superior Foe

(Photos courtesy of Jonathan Works Photography)

image/jpeg
image/jpeg
image/jpeg

oblomov,
@oblomov@sociale.network avatar

@tess these photos tell there's much more using the tip of the skate than I thought there would be, but a fortiori it makes a lot of sense.

18+ Peli117, to random
@Peli117@mastodon.gamedev.place avatar

boobz

careful NSFW!

video/mp4

oblomov,
@oblomov@sociale.network avatar

@Peli117 (I assume «In coming» should be «I'm coming»?)

brewsterkahle, to random
@brewsterkahle@mastodon.archive.org avatar

"Library workers have been subjected to a disturbing surge in bomb threats in Illinois.

Illinois House Bill 4567 would expand protections for libraries and library workers against bomb threats or other threats of violence."

geez.

https://action.everylibrary.org/ilhb4567

oblomov,
@oblomov@sociale.network avatar

@brewsterkahle (hint: add https:// in front of the link so that Mastodon understands that it's a link)

eniko, to random
@eniko@peoplemaking.games avatar

I dont know what Cara is besides some kind of new social network but what I do know is I'm already active on 3 and I am not adding a 4th

oblomov,
@oblomov@sociale.network avatar

@eniko the whole point of the Fediverse is to make this madness unnecessary. At this point in time, any new social network that is born without ActivityPub support built in should be considered a trap.

For a more balanced take,
@davidrevoy has the the most on-point I've seen so far:

https://www.davidrevoy.com/article1032/a-critique-of-caraapp-the-no-ai-instagram-and-artstation-copycat-child

oblomov, to Catroventos Italian
@oblomov@sociale.network avatar

OK, la in di è ora completa al 99%. L'unica cosa che manca per raggiungere il 100% è la traduzione di “gated prism” dove “gated” va inteso nel senso dei circuiti. Un prisma “gated” è “bloccato” nel senso che non lascia passare la luce, ma non ho idea di quale sia il termine tecnico corretto in italiano. Un aiutino è ben gradito.

oblomov,
@oblomov@sociale.network avatar

Ho deciso di usare “interrotto”. 100%.

(Con riserva per Tarstone e i pattern cementizi)

oblomov, to languagelearning
@oblomov@sociale.network avatar

OK, are now at 99% completion. The only thing missing for 100% are three strings pertaining “gated prisms”. Gating here is to be intended in the circuit logic sense (a gated prism is one that doesn't let light through). I'd rather use the proper Italian term here but I have no idea what it is. If anybody know, please do let me know

mcc, to random
@mcc@mastodon.social avatar

Gonna upgrade my laptop to Ubuntu 24.04… expecting that, like everything else I have done on this laptop involving Ubuntu, I am going to regret this

oblomov,
@oblomov@sociale.network avatar

@mcc jokes aside, Cheese is actually one of the GNOME apps I don't hate with a passion. I don't know if it's the best camera GUI on Linux, but it's definitely my go-to solution. I wonder what the alternative is supposed to be.

oblomov,
@oblomov@sociale.network avatar

@mcc TBF if they did communicate the full list of what they bundle, it would be so long that most people wouldn't have any idea either ;-)

GustavinoBevilacqua, to random
@GustavinoBevilacqua@mastodon.cisti.org avatar

Then you want to say to me that NOBODY has ever used an SVG favicon to send some nasty Javascript?

oblomov,
@oblomov@sociale.network avatar

@GustavinoBevilacqua AFAIK the JS in SVG is not run for favicons.

oblomov,
@oblomov@sociale.network avatar

@GustavinoBevilacqua for images in general, actually.

juc, to random Italian
@juc@livellosegreto.it avatar

(riassunto delle puntate precedenti: il downgrade del kernel risolve il problema di avvio, ma...)

...come previsto a rifare l'upgrade si ripresenta il problema questo perché grub per qualche motivo è convinto di dover cercare i moduli del kernel vecchio.

...dopo un paio d'ore di bestemmie sono riuscitə a rompere tutto e rimontare tutto arrivando con soddisfazione a vedere di nuovo il vecchio errore sul modulo vfat.

È tutto meraviglioso.

Torno a rompere tutto di nuovo.

oblomov,
@oblomov@sociale.network avatar

@GustavinoBevilacqua @juc @carlux @marcoboh

comunque per gli amanti dell'ex Windows Commander che ora si chiama Total Commander, sotto Linux con interfaccia grafica posso suggerire Krusader e Double Commander (doublecmd). Quest'ultimo è praticamente un clone di TC.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • InstantRegret
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • ethstaker
  • provamag3
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • modclub
  • megavids
  • normalnudes
  • Leos
  • lostlight
  • All magazines