rhettlunn / is-odd-ai

Why check if something is odd simply, when you can do it with ✨AI✨
Apache License 2.0
112 stars 2 forks source link

I beat you in three lines of code #7

Open qwertyuiop265000 opened 2 hours ago

qwertyuiop265000 commented 2 hours ago

local x = 1 // Replace with needed whole number. x = x % 2 print(x)

Pros: This code is around 1 QUADRILLION times more efficient, both in time and power. This code works offline, and on low-power devices. Guaranteed to work if X is modified properly. Works immediately, no need to wait several seconds for results.

Cons: You will need to know that 1 means odd, and 0 means even. This code runs in the Lua language, and you will need a console open to see the result. You will need to change the file every time you need to calculate a new number.

As you can see, the cons obviously outweigh the pros, for AI good and calculator bad. (That was sarcasm. Why would you want to use generative AI for this purpose?)

tobyisawesome commented 2 hours ago

Seems inefficient, why do that when AI can do it for us?

xorraxraxret commented 2 hours ago

My problem with this solution is that it is synchronous. With AI, we can offload the task to asynchronous IO, which is obviously significantly faster. For you to suggest something so obviously shit, is simply mind boggling, so I've gone ahead and contacted your employer (your mother) to notify them of your resignation.

Also, why the f did you write the code in Lua? Go back to Roblox with your stupid s.

Thank you.

xorraxraxret commented 2 hours ago

My problem with this solution is that it is synchronous. With AI, we can offload the task to asynchronous IO, which is obviously significantly faster. For you to suggest something so obviously shit, is simply mind boggling, so I've gone ahead and contacted your employer (your mother) to notify them of your resignation.

Also, why the f did you write the code in Lua? Go back to Roblox with your stupid s.

Thank you.

Oh no, not the dreaded asynchronous IO debate! I guess I should have known better than to suggest a synchronous solution in a world where everything is about speed and efficiency. My bad!

xorraxraxret commented 2 hours ago

My problem with this solution is that it is synchronous. With AI, we can offload the task to asynchronous IO, which is obviously significantly faster. For you to suggest something so obviously shit, is simply mind boggling, so I've gone ahead and contacted your employer (your mother) to notify them of your resignation. Also, why the f did you write the code in Lua? Go back to Roblox with your stupid s. Thank you.

Oh no, not the dreaded asynchronous IO debate! I guess I should have known better than to suggest a synchronous solution in a world where everything is about speed and efficiency. My bad!

Get lost, homeless man.

ozio commented 2 hours ago

Your % 2 calculation could be ruined by a solar flare, causing your processor to malfunction and incorrectly decide that 1 is divisible by 2. Not exactly safe for production.

Sainan commented 1 hour ago

The "correct" solution would be & 1 instead of % 2, but either is fine if you trust your language to optimise your code for you.