3 ms·
I’m going to create my magnum opus tonight “isZero” Which checks if a number is 0
by purple-leafy 2y ago
I’m going to create my magnum opus tonight
“isZero”
Which checks if a number is 0
- bhaney 2y agoYou're seven years too late, unfortunately https://www.npmjs.com/package/is-zero https://www.npmjs.com/package/is-zero
- Ekaros 2y agoThankfully https://www.npmjs.com/package/is-not-zero https://www.npmjs.com/package/is-not-zero is free I think? I have no NPM experience apart from wondering why some somewhat modules are not on github anymore...
- purple-leafy 2y agoDamn, in that case I may need to regress to: “is” Which just returns true for truthy values and false for falsely values
- SavageBeast 2y agoOh yeah, Imma do the most Hacker News I can think of and re-impl both packages in Rust. Better yet I might fire up PyTorch and develop some ML solution to recognize even/oddness. There really are more choices for this than I though at first.
- culebron21 2y agoAnd publish some NN solution on public repo like huggingface.co.
- SavageBeast 2y agoIf we're going to build any of these we're going to really need to do some testing too. That means we need a suitably reliable generator of numbers known to be positive or negative.
- asplake 2y agoBy checking that the number is equal to its negative?
- praptak 2y agoI think that isFourtyTwo is free.