frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

The probability of a hash collision (2022)

https://kevingal.com/blog/collisions.html
60•subset•3d ago

Comments

rienbdj•4h ago
How many values can a UUID v4 take?

How many do you have to generate before a collision becomes a remote possibility?

masklinn•4h ago
A uuid has 122 bits of payload.

Depends what you consider “a remote possibility” to be (the birthday attack wiki page has a table for various p and powers of 2)

NickHoff•4h ago
A UUID v4 is a 128 bit number, but 4 bits are reserved to specify the version number and 2 more bits are reserved to specify the variant, which leaves 122 bits of randomness. That means it can take on 5 x 10^36 possible values. Following the birthday math, you'd have to generate about 103 trillion UUIDs to have a one-in-a-million chance of having a collision.
toast0•44m ago
The question becomes, how bad is your random.

If your random is not uniformly distributed, you might get duplication from bias.

If your random is setup wrong and you get the same seeding multiple times, you might get duplication from that.

If your random is good, the birthday math should hold.

j-pb•4h ago
The fun part is when you take that approximation and apply it to 2^n.

If you have n bits, your collision probability is 0.5 at generating 2^(n/2) values.

Or put differently: a 128bit uuid gives you a "good enough" 64bit distributed autoincrement.

bravesoul2•3h ago
Good rule of thumb there
racedude•4h ago
Good to know, thanks
spit2wind•3h ago
The author uses writing techniques like those given by Joel Spolsky:

- Rule 1: Be Funny

- Rule 2: Writing a spec is like writing code for a brain to execute

- Rule 3: Write as simply as possible

- Rule 4: Review and reread several times

The author isn't quite as adept at integrating the humor as seemlessly as Joel, yet it's interesting to see how effective the style is, even for someone still learning it. I commend them for making the topic more accessible. It was probably fun to write and was definitely fun to read!

https://www.joelonsoftware.com/2000/10/15/painless-functiona...

dcminter•3h ago
I too thought of it (in a good way) when "and an iron will" raised a chuckle from me.

I second the recommendation and often nudge colleagues towards that article.

perihelions•1h ago
The quickest way to work around the numeric overflow issues is to use the Stirling approximation of the logarithm of the factorial,

https://en.wikipedia.org/wiki/Stirling's_approximation#Speed...

You can build on that to build good, composable approximations of any the standard combinatorial functions, in log-space (and recover the approximations you want by simply exponentiating back). For example, if you've implemented an approximate ln-fac(n) ~ ln(fac(n)), you immediately get ln-choose, the logarithm of (n!)/(k!(n-k)!), as simply ln-fac(n) - ln-fac(k) - ln-fac(n-k). Fully composable: if ln-fac() is a numerically good approximation, then is so any reasonable sum or difference.

Or: the log of the binomial distribution PDF is simply ln-choose(n,k) + k*ln(p) + (n-k)*ln(1-p).

permalac•58m ago
Honest question.

How does one write something like this?

I get the interest, and the review process. What I mean is, is this a hobby where someone is passionate about soothing, or does some employers allow people to work on side projects?

I feel my life is mostly about direct value, and I don't really understand where I went wrong in the path for meaningful knowledge.

Any philosophical help will be very welcome, as you correctly guest I'm a bit lost.

richardwhiuk•51m ago
Almost certainly a hobby. Employer would probably want something like this on a employer blog so that they get the benefits.

A new PNG spec

https://www.programmax.net/articles/png-is-back/
414•tbillington•7h ago•156 comments

Lyon Drops Microsoft to Boost Digital Sovereignty

https://digitrendz.blog/newswire/business/19813/lyon-drops-microsoft-office-to-boost-digital-sovereignty/
61•hermanzegerman•1h ago•23 comments

Reading NFC Passport Chips in Linux

https://shkspr.mobi/blog/2025/06/reading-nfc-passport-chips-in-linux/
85•robin_reala•3h ago•23 comments

Microsoft Edit

https://github.com/microsoft/edit
261•ethanpil•10h ago•135 comments

Fun with uv and PEP 723

https://www.cottongeeks.com/articles/2025-06-24-fun-with-uv-and-pep-723
479•deepakjois•16h ago•166 comments

Thnickels

https://thick-coins.net/?_bhlid=8a5736885893b7837e681aa73f890b9805a4673e
196•jxmorris12•10h ago•45 comments

Battery-electric "Infinity Train" will charge itself using gravity

https://newatlas.com/transport/fortescue-wae-infinity-train-electric/
29•croes•2d ago•33 comments

Writing toy software is a joy

https://blog.jsbarretto.com/post/software-is-joy
666•bundie•19h ago•264 comments

The Fairphone (Gen. 6)

https://shop.fairphone.com/the-fairphone-gen-6
36•DavideNL•1h ago•11 comments

The probability of a hash collision (2022)

https://kevingal.com/blog/collisions.html
60•subset•3d ago•12 comments

Sourcehut Moving to Europe

27•wooptoo•29m ago•2 comments

Thoughts on Asunción, Paraguay

https://cpsi.media/p/thoughts-on-asuncion-paraguay
38•Michelangelo11•2d ago•5 comments

ChatGPT's enterprise success against Copilot fuels OpenAI/Microsoft rivalry

https://www.bloomberg.com/news/articles/2025-06-24/chatgpt-vs-copilot-inside-the-openai-and-microsoft-rivalry
235•mastermaq•18h ago•236 comments

PlasticList – Plastic Levels in Foods

https://www.plasticlist.org/
388•homebrewer•20h ago•161 comments

Managing time when time doesn't exist

https://multiverseemployeehandbook.com/blog/temporal-resources-managing-time-when-time-doesnt-exist/
107•TMEHpodcast•10h ago•53 comments

Finding a 27-year-old easter egg in the Power Mac G3 ROM

https://www.downtowndougbrown.com/2025/06/finding-a-27-year-old-easter-egg-in-the-power-mac-g3-rom/
357•zdw•21h ago•107 comments

XBOW, an autonomous penetration tester, has reached the top spot on HackerOne

https://xbow.com/blog/top-1-how-xbow-did-it/
232•summarity•19h ago•99 comments

Ancient X11 scaling technology

https://flak.tedunangst.com/post/forbidden-secrets-of-ancient-X11-scaling-technology-revealed
240•todsacerdoti•16h ago•187 comments

MCP is eating the world

https://www.stainless.com/blog/mcp-is-eating-the-world--and-its-here-to-stay
271•emschwartz•3d ago•168 comments

Bill Atkinson: Polaroids Showing the Evolution of the Lisa GUI [video]

https://www.youtube.com/watch?v=Qg0mHFcB510
12•zdw•3d ago•2 comments

Subsecond: A runtime hotpatching engine for Rust hot-reloading

https://docs.rs/subsecond/0.7.0-alpha.1/subsecond/index.html
157•varbhat•16h ago•25 comments

How to Think About Time in Programming

https://shanrauf.com/archive/how-to-think-about-time-in-programming
136•rmason•14h ago•51 comments

Web Translator API

https://developer.mozilla.org/en-US/docs/Web/API/Translator
10•kozika•2h ago•7 comments

Bunker Busters probably failed to penetrate Iranian concrete

https://www.popularmechanics.com/military/weapons/a65172594/ultra-strong-concrete-stops-bunker-busting-bombs/
10•myflash13•57m ago•2 comments

The bitter lesson is coming for tokenization

https://lucalp.dev/bitter-lesson-tokenization-and-blt/
267•todsacerdoti•20h ago•117 comments

Show HN: Windowfied

10•mnky9800n•2d ago•8 comments

Canal Boat Simulator

https://jacobfilipp.com/boat/
88•surprisetalk•2d ago•27 comments

Basic Facts about GPUs

https://damek.github.io/random/basic-facts-about-gpus/
291•ibobev•22h ago•63 comments

Playing First Contact in Eclipse, a 3-Day Sci-Fi Larp

https://mssv.net/2025/06/15/playing-first-contact-in-eclipse-a-spectacular-3-day-sci-fi-larp/
40•adrianhon•2d ago•1 comments

Assembly Theory of Time

https://faculty.ucr.edu/~legneref/Assembly%20Theory.htm
18•andsoitis•5h ago•3 comments