News for hackers. Stuff that matters.
Re:Do binary files contain more 1s or 0s? by isoprophlex on Tuesday November 12, 2019 @03:30PM (#21517808)
Jesus this is some dumb shit.

In python, the string returned by

    bin(decimal)
drops the leading zeros

    >>> bin(3)
    '0b11'
    >>> bin(513)
    '0b1000000001'
    >>> bin(1024)
    '0b10000000000'
I don't want to turn this into a personal attack or an overly snarky comment but it's really something to try and implement a bit counting algo by hand and then fail to observe the way bin() behaves
Re:Do binary files contain more 1s or 0s? by dang on Wednesday November 13, 2019 @01:18PM (#21527432)
> I don't want to turn this into a personal attack or an overly snarky comment

That's a fine intention, but then you shouldn't lead with "Jesus this is some dumb shit" or end with "it's really something to try and [...] fail." Doing it that way breaks the site guidelines. Would you mind reviewing them? https://news.ycombinator.com/newsguidelines.html

Note that the leading guideline in the "comments" section is Be kind.

Re:Do binary files contain more 1s or 0s? by isoprophlex on Sunday November 24, 2019 @01:14AM (#21618741)
Belated, but, yeah. You're right. I blew my top a bit there...