Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could this not also theoretically colide with a string with the same hash and more than 42 occurrences of "gonna"? Better set the flag to `$v==42` just to be safe.


The probability is overwhelmingly against there being another string of the same length and even 10 copies of "gonna".

The odds of another one with under 2k bytes and exactly 42 copies of "gonna" is a lot higher than having one with 43 copies of "gonna".

In a code golf competition, one character matters. Therefore the odds are that you should use "<" not "==" here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: