top | item 44036975

(no title)

iamthemonster | 9 months ago

This is pretty useless to be honest. It's good for telling whether a number is even, but in our industry we need more powerful functionality. We also need to know whether a number is odd.

discuss

order

charles_f|9 months ago

RTFM, it's not only implementing isOdd but also a large set of rarely used advance operations such as isEqual, or isGreaterThan

Trully AI is astonishing

whynotmaybe|9 months ago

Why a specific function ?

With a few lines of code, you can just create a list with all the numbers that are even and when you need to check if a number is odd, you simply have to check if it's in the list.

turnsout|9 months ago

Yes, this is what we do as a RAG workflow. We created a list of all 32bit unsigned integers and whether they were even or odd, and we pass that into the context. The future is amazing!

sureIy|9 months ago

Do we have enough spaces in the ALL_NUMBERS array or do we want to group them by thousands?

ALL_NUMBERS_00001

ALL_NUMBERS_00002

iamthemonster|9 months ago

we fired all our junior devs so we can't write code any more

briansm|9 months ago

"This is pretty useless to be honest."

I remember saying that about Bitcoin 15 years ago.

crubier|9 months ago

You can achieve this super simply this by prompting the OpenAI API to call this tool and reverse the output.

SamBam|9 months ago

I tried that, but I kept getting "eurt" and "eslaf" and I'm not sure what to do with those. Do I need to send it back to the AI?

YokoZar|9 months ago

Great news! The package includes an isOdd function as well!

nbittich|9 months ago

isn't it breaking the one package one responsibility principle?uncle bob wouldn't be happy, it doesn't seem clean

Cerium|9 months ago

Simply add one to the number and then test it again.

avandekleut|9 months ago

Someone should implement this using tool calls.