4 ms·
Also check the Matt Parker video for a more entertaining explanation: https://www.youtube.com/watch?v=5vbk0TwkokM https://www.youtube.com/watch?v=5vbk0TwkokM
by aquir 2y ago
Also check the Matt Parker video for a more entertaining explanation: https://www.youtube.com/watch?v=5vbk0TwkokM https://www.youtube.com/watch?v=5vbk0TwkokM
- sbuttgereit 2y agoI appreciate that he picks a subject dealing with regexes for his Halloween video. I can think of few things more frightening or appropriate.
- wodenokoto 2y agoMaybe I wasn't paying close enough attention, but didn't he forget to mention that numbers must be displayed in unary form and just jumps right into checking "111", as if one hundred and eleven is prime, when he is actually checking if 3 is a prime.
- david-gpu 2y agoYeah, that is the very first thing he did when he showed his python code.
- jhardy54 2y agoI don’t think he drew attention to it, because a few minutes later he highlights that it isn’t actually as simple as he first expressed, and shows the “1” * n.
- Suppafly 2y agoHe covered it, but I don't think he explained what was going on particularly well. I'm surprised by all of the people claiming it was a good explanation. I think if he had picked a few numbers and actually worked them through the algorithm completely it would have been much more of a useful explanation.
- wvbdmp 2y agoI agree. I’m not familiar with Python and figured the '1'*n was just a quirk to convert the int to a string, not an integral part of the process. Kind of a weird way to repeat a string, tbh, but I guess the concision is appreciated in typical Python applications like computer linguistics or something.
- yen223 2y agoI wish someone explained regexes to me as concisely as Matt Parker did in that video, it would have saved me so much trouble.