(me): so we bundle instructions and data together into “cache lines” to improve efficiency
(medieval peasant): wouldst thou not fear false idols when fetching from yon predictive oracle?
(me): well, yeah. that’s why we invented “speculative execution”
(peasant, trembling): and when this prophecy fails?
(me): then we must perform “branch misprediction recovery,” restoring the righteous state
(peasant, grimly): truly, thou art plagued by thy hubris, courting divine retribution with each cycle
(Me): so, we create this "virtual memory" to trick processes into thinking they have a contiguous address layout
(Medieval peasant): Would not thy abstraction swell the tally of mem'ry lookups?
(Me): well, yes. to deal with that we created the "translation lookaside buffer"
@HSVSphere considering my development is mostly powered by anime tits, if I ever get a gf with big honkers, we might get a hyprkernel from the energy overload
So... swapping two variables.
xor swap?
temporary variable?
No, here we play a bit.
... Actually, this would indeed create a variable, but instead of it being an integer, it is an anonymous array. Compound literals moment.
this is how i handle errors in C
this is the cleanest error handling pattern
you call 10 functions and handle all errors in one place
the Linux kernel uses this pattern throughout its drivers and subsystems because it stays readable even when error paths get complicated
"Aunque es una exagerada generalización decir que los economistas del siglo XIX fueron incondicionales defensores del laissez-faire, sí es cierto que la teoría económica producto del método deductivo demostró ser un poderoso baluarte contra la intervención del gobierno. Esa teoría económica mostró la eficacia y virtud inherentes al libre mercado, así como las contraproducentes distorsiones y los lastres económicos fruto de la intervención estatal. Para que el estatismo dominase la profesión económica, entonces, era importante desacreditar el método deductivo. Una de las formas más importantes de hacerlo fue hacer avanzar la noción de que para ser 'verdaderamente científica', la economía tenía que evitar la generalización y las leyes deductivas, y simplemente trabajar sobre investigaciones empíricas, sobre los hechos de la historia y las instituciones históricas, esperando que, de alguna manera, las leyes emergerían de estas investigaciones."
—Murray N. Rothbard
I was giving my girl a C masterclass (she is non-technical, but she made the mistake to ask me about C)
This is where we got before she got tired of competters'