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

Didn't see anyone mentioned these two pearls:

C (K&R) program that calculates PI number by measuring circle that is its code: https://en.wikipedia.org/wiki/International_Obfuscated_C_Cod...

Perl one-liner that checks if a number is prime: perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"'



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

Search: