![](https://lemmy.sdf.org/pictrs/image/c059e003-4dff-4329-aaef-f75c7466c87b.png)
![](https://lemmy.world/pictrs/image/44bf11eb-4336-40eb-9778-e96fc5223124.png)
1·
10 months agoNothing followed by the sound of a lot of cars leaving the Facility very fast.
Nothing followed by the sound of a lot of cars leaving the Facility very fast.
TDD
const max12 = (x, y) => {
if (x === 1 && y === 2) {
return 2;
} else if (x === 7 && y === 4) {
return 7;
} else {
return x;
}
};
It’s even cooler than lightbulbs, though (assuming we’re talking about incandescents) - you send electricity back and forth into a wire that’s just the right length, and (RF) light leaks out without it getting hot!
Um, actually… A signed 32-bit counter would loop back to December 1901, so the calendar is presumably 31-bit unsigned. (Sorry)
There’s always the classic C strcpy :)
char *strcpy(char *dest, char *src) {
char *p = dest;
while (*p++ = *src++);
return dest;
}
Most people would use “word”, “half-word”, “quarter-word” etc, but the Anglophiles insist on “tuppit”, “ternary piece”, “span” and “chunk” (that’s 5 bits, or 12 old bits).