by novagameco · 2y ago · 0 comments
edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not:
3405691582
https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...
Maybe someone was having too much fun and got carried away, but what an odd sense of humor.
Maybe they just didn't want the checker to flag itself.
I remember there was a similar check inside Google, where any file containing the words "DO NOT SUBMIT" will cause the presubmit check to fail. Naturally the presubmit checker needs to look for that string, but it couldn't trivially include the string as-is because that would prevent the presubmit checker from being submitted.
(Motivation for something like this is that if you inserted some extra logging statements or similar for debugging, you would add "DO NOT SUBMIT" in nearby comments, so that you will remember to remove them later).
It’s religion for the irreligious.
(practically, used only "F0015601D" ... as IPv6 link-local address. No, wasn't a honeypot service)
irb> [184594741, 2880289470, 2881141438, 2965027518, 2976579765, 3203381950, 3405691582, 3405697037, 3735927486, 4027431614, 4276992702].map! { _1.to_s(16) }
=> ["b00b135", "abadbabe", "abbababe", "b0bababe", "b16b00b5", "beefbabe", "cafebabe", "cafed00d", "deadbabe", "f00dbabe", "feedbabe"]
if they instead say 'leslie over in sales is a dood' they're just being explicit about his gender, perhaps because someone thought he was female
i'm not endorsing any value judgments for or against these statements, just explaining what other people's thinking (factually) is which leads to the kind of value judgments that lead to policies against putting b00b135 in your source code
i suspect cafed00d was included as a (possibly counterproductive) gesture to allay equity concerns like yours rather than because of any serious concern that a cafed00d constant would cause anyone any concern on its own
Either way, go big or go home?
(As per the Apollo guidance computer)
Anyway I think they forgot a few, like 173406926 (// Intentionally written in decimal rather than hex). Seems like they just checked https://en.wikipedia.org/wiki/Hexspeak. Kind of a weak effort, overall.
probably some people will think it's encouraging information, and others will think it's discouraging information, but either way it's important information
we must secure the existence of C code and a future for node children
> but sometimes considered offensive if used by a man to a woman he does not know
There are billions of other magic numbers to choose from anyway.
At some point within the past 10 years they started inserting these annoying little sjw asides into the dictionaries
Some people may find it funny, but it mostly gives an image of immaturity.
I was reading them out in hex. As in CA FE BA BE …
Now I feel stupid.
If everyone starts to use the same magic numbers then they are no longer magic and you can end up with strange corner case bugs and holes where a magic number used in one context is mistaken for a magic number in another context.
I think this would more belong into clippy; it'd be easier extensible then, and less "magic". But I'm just a 0xf001 who's intentions are 0x900d ... please don't let me 0xbe misunderst0x0d.