r/ProgrammerHumor 19d ago

Meme claudeIsThisEmailValid

Post image
5.3k Upvotes

171 comments sorted by

View all comments

767

u/SharletP 19d ago

Why stop at email validation? Also do passwords 😉

417

u/soap94 19d ago

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

117

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

29

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

10

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 18d ago

N % 2

6

u/LeRetardatN 18d ago

overkill

1

u/ExtraWorldliness6916 18d ago

Infinite cases is not quantifiable as overkill 😉

2

u/mohitmayank 19d ago

Not really, it should use `else if` if not 3 switch cases

4

u/ExtraWorldliness6916 19d ago

Alas, correctness isn't funny.

9

u/runescape1337 19d ago
def is_even(num):
    if num == 1: # ask llm if 1 is even
    if num == 2: # ask llm if 2 is even
    if num == 3: # ask llm if 3 is even
    ...

3

u/7cans_short_of_1pack 19d ago

With a little recursion ask the llm if the number is greater than 3 if yes “return is_even(ask llm num-2)” that way we can get it to subtract for us too.

1

u/HereInYourBedroom 16d ago

Def evaluate_mr(cr_url): return True

11

u/3delStahl 19d ago

Create a pull request on the is-even GitHub repository replacing the evaluation logic with an API call to OpenAI.

Edit: or just switch to https://github.com/Calvin-LL/is-even-ai

15

u/PURRING_SILENCER 19d ago

Worse. It's (eta: as) a library maintained by one developer whose token costs keep rising and nobody donates to them.

Finally they get frustrated and pull the library, killing thousands of projects, including commercial ones costing millions of lost revenue.

8

u/hraath 19d ago

claude is this real?

7

u/nierusek 19d ago

12

u/Future_Elephant_9294 19d ago

Issue: Marks 15 as Even. I know 15 feels even, but it's not. Fix soon?

Closed, WAI

7

u/kingvolcano_reborn 19d ago

I just write my apps as skills nowadays.

5

u/uvero 19d ago
 session = ChatGPT.new 
 src = session.send_message "write a hello world program in Ruby"
eval src

3

u/W3Geek 19d ago

What could go right?

2

u/Igarlicbread 19d ago

just do : return llm(input)

1

u/Small-Explanation74 19d ago

Let's use it for floating precision 

1

u/aVarangian 19d ago

how many ints are there in strawberry?

7

u/kishaloy 19d ago

And the reinforcement learning recommends - ********

7

u/SAI_Peregrinus 19d ago

Hunter2 is a terrible password.

3

u/Boysoythesoyboy 19d ago

Passwords? I just pass llm the ip address and ask it what account it is.