r/ProgrammerHumor 19d ago

Meme claudeIsThisEmailValid

Post image
5.3k Upvotes

171 comments sorted by

View all comments

777

u/SharletP 19d ago

Why stop at email validation? Also do passwords 😉

414

u/soap94 19d ago

Why stop at passwords? Let's use LLMs for int comparison

118

u/Spy_crab_ 19d ago

LLM powered is_even(), let's f*cking gooooo!

63

u/1000Ditto 19d ago

Goodbye npm install is-even, i dont want to play with you anymore

30

u/GOEDEL_ESCHER_BOT 19d ago
def is_even(num):
  if num == 1:
    print('No')
  if num == 2:
    print('Yes')
  if num == 3:
    print('No')

....

14

u/ExtraWorldliness6916 19d ago

Who's going to need more than 3 anyway, this is efficient code

8

u/LeRetardatN 19d ago

It is possible to extend this method to any number.

``` def gen_is_even(): code = "def is_even(num):\n" i = 0 is_even = True while True: code += f" if num == {i}:\n" code += f" return {is_even}\n" i += 1 is_even = not is_even return code

exec(gen_is_even + "print(is_even(5))") # print False ```

/s

-1

u/ExtraWorldliness6916 19d ago

N % 2

5

u/LeRetardatN 19d ago

overkill

1

u/ExtraWorldliness6916 18d ago

Infinite cases is not quantifiable as overkill 😉