Mac@programming.dev to Programmer Humor@programming.dev · 9 months agoGoOnprogramming.devimagemessage-square105fedilinkarrow-up11.06Karrow-down148
arrow-up11.01Karrow-down1imageGoOnprogramming.devMac@programming.dev to Programmer Humor@programming.dev · 9 months agomessage-square105fedilink
minus-squareazertyfun@sh.itjust.workslinkfedilinkarrow-up6·9 months agoFuck that, if for whatever reason I’m writing an IP validator by hand I’m disallowing leading zeros. Parsers are very inconsistent, some will parse 010 as 10, others as 0o10 == 8 (you can try that right now with a POSIX ping). Talk about a footgun.
minus-squarestringere@reddthat.comlinkfedilinkarrow-up6·9 months ago some will parse 010 as 10, others as 0o10 == 8 …and that’s me in the fetal position, thanks.
Fuck that, if for whatever reason I’m writing an IP validator by hand I’m disallowing leading zeros. Parsers are very inconsistent, some will parse 010 as 10, others as 0o10 == 8 (you can try that right now with a POSIX
ping
). Talk about a footgun.…and that’s me in the fetal position, thanks.