0xCAFEBABE & 0xFEEDFACE (2003)
61–70 of 126 posts
Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#62Rust will yell at you if you use specific magic numbers like these edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not: 3405691582 https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...
Kind of low-key hilarious that someone thought this was a serious enough issue to actually submit that code. I wonder if there is a written spec that helps to judge which integers should be considered "problematic" and which ones aren't.
Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#63Earlier quoted context omitted.
But why?
https://www.oxfordlearnersdictionaries.com/definition/englis... > 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.
Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#64Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#65Earlier quoted context omitted.
Reformatted: 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"]
I wonder why are many many "babe" constants included, but only a single "d00d" constant.
Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#66Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#67Earlier quoted context omitted.
Not just that, but they also wrote the numbers in decimal - they didn't even want them in the code as an example of what not to do. Maybe someone was having too much fun and got carried away, but what an odd sense of humor.
> wrote the numbers in decimal 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. (Mot…
Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#68Rust will yell at you if you use specific magic numbers like these edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not: 3405691582 https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...
Kind of low-key hilarious that someone thought this was a serious enough issue to actually submit that code. I wonder if there is a written spec that helps to judge which integers should be considered "problematic" and which ones aren't.
(practically, used only "F0015601D" ... as IPv6 link-local address. No, wasn't a honeypot service)
Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#69Re: 0xCAFEBABE & 0xFEEDFACE (2003)
#70a long time a go I wrote a script that spit out random phrases in hex that would work as a mac address. I used to do this to mess with my coworkers in networking , and previous coworkers at the ISP I was still using. My HN username is the only one i remember though.