Christian Lawson-Perfect is a user on You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Christian Lawson-Perfect @christianp

Thanks to @petrilaarne, BigQuery tells me that there are 49329 commits on GitHub with hashes beginning 'abc', and none starting 'abcd'. Assuming hashes are distributed uniformly, this implies there are around 49239 × 16³ ≈ 202 million commits in the dataset. In fact there are 203 million. It's nice when maths works!

· Web · 3 · 3

Whoops, there are 3072 starting 'abcd' - I forgot to change the length of my substr :blush:
There are 15 starting 'abcdef', and none starting 'abcdefg'!
If you don't think too hard, that means we're due one!

@christianp @petrilaarne Hm, there's no need to account for Benford's law, right?

@JordiGH @petrilaarne no, hashes should be effectively uniformly random