by s1mplicissimus on 5/20/25, 1:10 AM
This package has saved me so many hours of tedious gruntwork. It's like a junior developer - you still have to manually check their work, but when it's correct, it's a great productivity improvement.
And don't forget where this will go in a couple years with improved models and more computing power, it's gonna be awesome!
[/i]
by iamthemonster on 5/20/25, 1:48 AM
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.
by bosky101 on 5/20/25, 4:54 AM
Sorry for the offtopic post, but I am looking to hire someone with 10 years of experience with is-even-ai. Urgent. Your first unpaid assignment will be to help load balance a bunch of MCP servers to add and THEN check if it's even. So much to go from here! We're a single threaded GPU first identity operator company with a lot history of returning the same thing. We're now expanding to combine and add multiple things. In 6 months of SOTA fine tuning we can already add upto 3 numbers. An MCP first. With temperature 1 we even add random numbers. An industry first. And we're just getting started. Join us. We're adding to our team!
by parpfish on 5/20/25, 12:52 AM
Use this to add AI to your product to appease management.
Next week, “refactor” it out and brag to manager about cost savings and performance boosts, don’t mention “removing the AI”.
by mitthrowaway2 on 5/20/25, 2:04 AM
Is there a version I can run locally? I don't want OpenAI training on my integers.
by thiht on 5/20/25, 8:41 AM
I have a few qualms with this library:
1. For an AI engineer, you can already build such a system yourself quite trivially by fine-tuning a lightweight inference model, deploying it behind a FastAPI endpoint, and orchestrating requests with a custom prompt pipeline. If you want to go further, you could even ensemble multiple LLMs for higher evenness accuracy.
2. It doesn't actually replace the modulo operator. Most people I know just use `n % 2 === 0` to check if a number is even, and they still keep that knowledge handy in case the AI service is down. This does not solve the reliability issue.
3. It does not seem very "viral" or income-generating. I know this is premature at this point, but without charging users for the library, is it reasonable to expect to make money off of this?
by jasonjmcghee on 5/20/25, 1:15 AM
You might be able to optimize this by using embeddings. Store all the numbers and search "odd" and "even" until you find your number.
by ukuina on 5/20/25, 1:06 AM
This doesn't work if I use a reasoning model like o3, which does not allow setting max_tokens.
Without reasoning, how can I be SURE a number is even?
by ashton314 on 5/20/25, 1:58 AM
…but there’s only one dependency!! This goes against the NPM ethos of importing anything and everything that you might be tempted to just handle yourself. I’ll be waiting for the Enterprise Version that uses the appropriate number of dependencies.
by kevinventullo on 5/20/25, 2:23 AM
This is never going to scale. Eventually we’re going to run out of numbers which have been manually checked for evenness by a human, and instead the training data for the checks will be polluted by numbers which have only been verified by computers.
by alexitosrv on 5/20/25, 2:15 AM
This is the best chain of comments in a HN thread in a long time. Happy to see the hacker spirit strong!
by joshka on 5/20/25, 12:52 AM
Can we get a leftpad-ai please?
by crazysim on 5/20/25, 1:20 AM
How reliable is this? I'm half joking too but I wouldn't mind reading a report comparing this on OpenAI and various other LLMs.
Somehow I doubt it'll be 100%... right?
by jaza on 5/20/25, 2:02 AM
Great that this is a library. Really need this as a SaaS too. iseven.ai anyone?
by joshdavham on 5/20/25, 1:28 AM
I’m glad you included an isOdd() method. I was about to ask how you’d check for that.
by jeron on 5/20/25, 12:57 AM
why stop there? let's get an is-true-ai that checks if a boolean is true using AI
by azhenley on 5/20/25, 3:49 AM
You should try Mirror. The LLM-powered programming-by-example programming language I made:
signature is_even(x: number) -> bool
example is_even(0) -> true
example is_even(1) -> false
example is_even(222) -> true
example is_even(-99) -> false
It will take your examples and "compile" to a callable function. You can read more or try it out: https://austinhenley.com/blog/mirrorlang.html
by atum47 on 5/20/25, 12:57 AM
I remember when the whole isEven package was ridiculed for the first time a while ago, back then I thought about training a NN to predict the odds of a number being even, as a joke. I don't actually remember if I actually wrote code for it, but in the end I thought no one would laugh and gave up
by willmarquis on 5/20/25, 4:19 AM
Finally, someone had the courage to disrupt the tyranny of the modulo operator. Who needs n % 2 === 0 when you can invoke a large language model and incur network latency, token limits, and API costs to answer the age-old question: is this number even? Truly, we’re living in the future.
by leshokunin on 5/20/25, 2:29 AM
Does it also check types to make sure I typed 5 as an int and not a string? Hopefully the ai can solve that
by yalogin on 5/20/25, 2:09 AM
On a similar note, I was testing LLM's code writing ability and asked Qwen to write me a model to reverse a numerical string. It gave me code and instructions to compile and run. However it had errors in it and after few attempts asking it to fix it, I was able to compile and run. But, alas, the code just kept failing and generated hubris. I gave up. Not to pick on Qwen. I actually like it much better than chatGPT. I have seen Qwen give correct responses when chatGPT lied and gave me wrong information for the exact same question.
by jgalt212 on 5/20/25, 12:35 PM
The other joke package is-even has 179K weekly downloads. Is an LLM making up these numbers as well, or is this the Dead Internet at work? And if it's the Dead Internet, has the Dead Internet ever heard of caching? Maybe the Dead Internet gets a kickback from S3 egress fees.
https://www.npmjs.com/package/is-even
by vunderba on 5/20/25, 1:03 AM
Perhaps I should file an issue to increase the accuracy by including a RAG database in LanceDB with embeddings for the set of even numbers up to 32-bits.
by bigbuppo on 5/20/25, 1:37 AM
Finally, a reason to use AI.
by ivape on 5/20/25, 4:12 AM
I don't understand why everyone is making fun of this. This is how math is seriously going to be done soon enough.
by mrits on 5/20/25, 12:54 AM
This works great for situations where you can’t trust traditional intelligence. Thank you for your contribution
by downboots on 5/20/25, 4:54 AM
by moritzwarhier on 5/20/25, 8:18 PM
I don't think this isEven AI.
It's a remote server running assembler, C and and CGI code, it sends your OpenAI key to the Super Intelligence to make paperclips and reaps the benefit of all the productivity increase by AI for the creator.
Who of course is made from paperclips.
by the_af on 5/20/25, 11:32 AM
Where I work, they are laying off all even parity engineers, to be replaced with this. They are keeping the odd parity engineers.
This will achieve their goal of replacing half the staff with AI... at least I think so, I should check with is-half-ai.
by riwsky on 5/20/25, 4:21 AM
by spacechild1 on 5/20/25, 2:32 AM
by alluro2 on 5/20/25, 2:46 AM
It would be great if it could also save results to a blockchain. Immutability. IYKYK.
With a layer of smart contracts, dApp on top, this thing could be mooning. When Lambo? In days.
by snorkel on 5/20/25, 1:17 AM
Lacks an isVeryEven() method, otherwise looks feature complete.
by io84 on 5/20/25, 3:34 AM
Kudos to the open source contributors but honestly this is the kind of area where the big commercial players need to step up and help with the heavy lifting.
by ChocolateGod on 5/20/25, 7:07 AM
Thanks, I can now use this to claim my application that has absolutely nothing to do with AI is now AI powered
by lrvick on 5/20/25, 2:14 AM
The sad reality is every large production NPM codebase will rely on this within 5 years, just like is-even.
by fred_is_fred on 5/20/25, 2:37 AM
I saw a Grok fork of this but it's using 88 and 14 as the only examples for some reason.
by rixed on 5/20/25, 2:58 AM
it doesn't say if it's implemented in rust i had to click on the link to find out please future hn posters start every submission also with an exemple so i can see if i like the syntax
by Asilvorcarp on 5/20/25, 2:05 AM
Boss: replace all ancient assembly opcodes with AI-powered ones!
by xarope on 5/20/25, 3:05 AM
software engineering at its finest, using the power of 10,000* GPU cycles to determine one of mankind's toughest questions.
* I might be off by several magnitudes too low
by cobbzilla on 5/20/25, 2:14 AM
This still does actual work. Where are echo-ai and cat-ai?
by asdefghyk on 5/20/25, 4:13 AM
IF number ends in 2,4,6,8,0 and >0 its even .....
by adzm on 5/20/25, 1:12 AM
Honestly this should take string input as well. Finally I could find out if a Unicode duck or the word "syzygy" are even!
by HocusLocus on 5/20/25, 3:40 AM
f(): To test if n is even return the value of f(n-2).
Special cases for zero and one.
Recursion for the win.
by jameslk on 5/20/25, 1:26 AM
60% of the time, it works every time
by lucaspfeifer on 5/20/25, 2:23 AM
Great, now can you make an AI-powered type checker? I wish to expel those pesky types, which too often seem to exist only to clutter my otherwise pristine code. :)
by rapnie on 5/20/25, 7:25 AM
First we invented fire. Then along came the wheel. Countless inventions followed. Today, using the most brilliant minds of our time, the technology of billionaires, and hubris that runs thickly through our veins.. we made not just another step. We leapt head on into uncertain future. It feels odd. Are we even there?
by brundolf on 5/20/25, 3:51 AM
Amazing, no notes
by squillion on 5/20/25, 5:18 AM
I can’t even.
by mmustapic on 5/20/25, 8:02 AM
This is so stupid, we know LLMs are not good enough for deterministic calculations. Just by running it I sometimes get that 31232198731 is even.
This is why I rolled out my own version that uses my own MCP server to call bc.
by daft_pink on 5/20/25, 1:35 AM
Venture capitalist here… how can I invest?
by debaserab2 on 5/20/25, 5:21 AM
do leftPad next!
by dmos62 on 5/20/25, 5:33 AM
Am I the only one that read this as "are you even using ai for this number?".
by jsomedon on 5/21/25, 5:16 AM
uh.. Are these comments in this thread even serious? Because they surely feel odd to read.
by sodra9000 on 5/20/25, 12:58 AM
This package should be updated to use the newer gpt-4o-mini model, rather than gpt-3.5-turbo.
Its 3x cheaper, twice as fast, and supports cached input just in case you need to double check if the last number you entered was even. It also has a knowledge cutoff of September 30 2023, which helps for any newly discovered even numbers since gpt-3.5s launch!