Top all-time · #10505
Andrei Zmievski
Personal blog · zmievski.orgprogrammingdata
Andrei Zmievski's personal blog at zmievski.org covers programming and data. Since 2010, 7 different Hacker News readers have linked it 7 times, most often “The Prime That Wasn't ”. The last post was in 2011, but the archive is still widely read.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
HN readers link Andrei Zmievski's post on a Perl regex that matches prime numbers and how it can wrongly report non-primes once backtracking limits are hit. Comments cite it as the source for that caveat.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Life, technology, and other good things
Most-linked posts?
- The Prime That Wasn't 4 people · 4 mentions · first linked 2010-08-03
What Hacker News says?
I guess you mean "For real?" as in "Is this really a primality test?" Yes, it is, and Krumins describes how it works in the post that I linked ( http://www.catonmat.net/blog/perl-regex-that-matches-prime-n... ). Essentially, although it looks complicated, it's the simplest possible idea: it's just trying factorisations, with the `(11+?)` part being the factor, and the `\1+` part insisting that we repeat that factor.…
Comment linking /2010/08/the-prime-that-wasnt
on “Useful Perl one-liners (2013)”Submitted The Prime That Wasn’t as a story · 176 points
HN discussionBeware: Depending on your backtracking limits, at some point the regex will start deciding numbers are prime that aren't. http://zmievski.org/2010/08/the-prime-that-wasnt
Comment linking /2010/08/the-prime-that-wasnt
on “A Perl Regular Expression That Matches Prime Numbers”Submitted The Prime That Wasn't as a story · 112 points
HN discussionThe composite (or prime) filter regexp is brilliant. $^(11+)(\1)+$ see OPs linked article http://zmievski.org/2010/08/the-prime-that-wasnt for details
Comment linking /2010/08/the-prime-that-wasnt
on “Sculpting text with regex, grep, sed, awk, emacs and vim (2012)”Submitted Vim for Programmers as a story · 2 points
HN discussionSubmitted Duplicates detection with ElasticSearch as a story · 2 points
HN discussion