3 ms·
This has been mentioned here before: http://news.ycombinator.com/item?id=230292 http://news.ycombinator.com/item?id=230292 If your browser has Java applet sup
by gojomo 17y ago
This has been mentioned here before:
http://news.ycombinator.com/item?id=230292 http://news.ycombinator.com/item?id=230292
If your browser has Java applet support, here you can watch the regex succeed (demonstrating a number is composite) or fail (prime):
49: http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24/&syn=perlSyntax&anim=1&rep=&in=1111111111111111111111111111111111111111111111111 http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24...
47: http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24/&syn=perlSyntax&anim=1&rep=&in=11111111111111111111111111111111111111111111111 http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24...
- davidw 17y agoYeah, it's a pretty old trick. I recall someone showing it off on #perl in about 1997.
- berntb 17y agoSearch for "Prime" on this insanely fun page, to see where it came from: http://www.cpan.org/misc/japh http://www.cpan.org/misc/japh (Hmm... I'll use that as a fortune file. Just need to remove extra '%', if fortune barfs on them. Ah, haven't had fortune in my login since the 90s.)
- davidw 17y agoAbigail! Bingo, that's who I recall posting it.