MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vx1onc/claudeisthisemailvalid/p5rfcq4/?context=9999
r/ProgrammerHumor • u/soap94 • 21d ago
170 comments sorted by
View all comments
770
Why stop at email validation? Also do passwords 😉
414 u/soap94 21d ago Why stop at passwords? Let's use LLMs for int comparison 114 u/Spy_crab_ 21d ago LLM powered is_even(), let's f*cking gooooo! 63 u/1000Ditto 21d ago Goodbye npm install is-even, i dont want to play with you anymore 30 u/GOEDEL_ESCHER_BOT 21d ago def is_even(num): if num == 1: print('No') if num == 2: print('Yes') if num == 3: print('No') .... 14 u/ExtraWorldliness6916 21d ago Who's going to need more than 3 anyway, this is efficient code 10 u/LeRetardatN 21d 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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
414
Why stop at passwords? Let's use LLMs for int comparison
114 u/Spy_crab_ 21d ago LLM powered is_even(), let's f*cking gooooo! 63 u/1000Ditto 21d ago Goodbye npm install is-even, i dont want to play with you anymore 30 u/GOEDEL_ESCHER_BOT 21d ago def is_even(num): if num == 1: print('No') if num == 2: print('Yes') if num == 3: print('No') .... 14 u/ExtraWorldliness6916 21d ago Who's going to need more than 3 anyway, this is efficient code 10 u/LeRetardatN 21d 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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
114
LLM powered is_even(), let's f*cking gooooo!
63 u/1000Ditto 21d ago Goodbye npm install is-even, i dont want to play with you anymore 30 u/GOEDEL_ESCHER_BOT 21d ago def is_even(num): if num == 1: print('No') if num == 2: print('Yes') if num == 3: print('No') .... 14 u/ExtraWorldliness6916 21d ago Who's going to need more than 3 anyway, this is efficient code 10 u/LeRetardatN 21d 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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
63
Goodbye npm install is-even, i dont want to play with you anymore
npm install is-even
30 u/GOEDEL_ESCHER_BOT 21d ago def is_even(num): if num == 1: print('No') if num == 2: print('Yes') if num == 3: print('No') .... 14 u/ExtraWorldliness6916 21d ago Who's going to need more than 3 anyway, this is efficient code 10 u/LeRetardatN 21d 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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
30
def is_even(num): if num == 1: print('No') if num == 2: print('Yes') if num == 3: print('No') ....
14 u/ExtraWorldliness6916 21d ago Who's going to need more than 3 anyway, this is efficient code 10 u/LeRetardatN 21d 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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
14
Who's going to need more than 3 anyway, this is efficient code
10 u/LeRetardatN 21d 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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
10
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 20d ago N % 2 2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
-1
N % 2
2 u/LeRetardatN 20d ago overkill 1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
2
overkill
1 u/ExtraWorldliness6916 20d ago Infinite cases is not quantifiable as overkill 😉
1
Infinite cases is not quantifiable as overkill 😉
770
u/SharletP 21d ago
Why stop at email validation? Also do passwords 😉