Normal vs Python devs Checking Primes...

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

when the python code looks more like nonsense than c

rowandevving
Автор

I know that regex is powerful, but today I learned there's a regex to determine if a number is prime, dear lord that's needlessly clever

csolisr
Автор

a c dev would never do it so inefficiently

martingeorgiev
Автор

In the C version, you don’t have to check up to n/2. You only have to check up to sqrt(n), or the last integer number of sqrt(n) (floor).

Edouard.Choiniere
Автор

nodejs: proceeds to install whole universe before doing anything

azeek
Автор

Now check how fast both are and how much memory they use.

norielgames
Автор

I thought the joke was having the Python version importing C one

kienha
Автор

And here I thought python was supposed to be MORE readable than C. I guess C chads can't stop winning

ENNEN
Автор

There’s regex for telling if a number is Prime? That’s news to me.

xWatexx
Автор

I thought my world broke on "check divisibility by 7" with regex.
Now my world is falling apart with "check if prime with regex".

slava
Автор

it's not specifically python, you could to this in any language with builtin regex support
BUT WHAT THE HELL? A regex to match prime numbers? How?

cover
Автор

I was flabbergasted, but then I remembered, regular expression have a complexity of O(n) where n is the length of the string they're analyzing.
Sadly, even if you used a regular expression in C, the first program would have been more efficient nonetheless, since it has to iterate just sqrt(n) times (not n/2)

diobrando
Автор

regex in python looks more dangerous than c.🤣

squid
Автор

Awesomee video, Virbox! ^_^

C is best programming language ever 😎

blaze_arch
Автор

Really cool video, I like the style! :D

SuperQuwertz
Автор

Never ever saw this type of python code

nevokrien
Автор

clearly a fake comparison, C program should've ended with SegFault










- average Python dev copium

flamakespark
Автор

Just write a regex that covers all composite numbers... I see no problem with that

brawldude
Автор

I love how the title clarifies that Python users aren't normal programmers

EntityPlantt
Автор

As a person who is learning Python at the moment, this made no fucking sense

bundzsi
join shbcf.ru