News for hackers. Stuff that matters.
Re:GitHub Copilot available for JetBrains and Neovim by jmnicolas on Wednesday October 27, 2021 @04:19PM (#29018592)
I don't think there's Infinity in my language, what do you use it for except maths?
Re:GitHub Copilot available for JetBrains and Neovim by dpryden on Wednesday October 27, 2021 @05:54PM (#29019594)
If you are using floating point numbers implemented in hardware, then infinity is absolutely a valid value and one that your code will encounter. This is true regardless of language, as long as the language requires or allows IEEE-754 semantics.

I am not aware of any language (outside of intentionally-minimalist esolangs) that doesn't support floating point numbers. In some languages (like JavaScript) that's the only kind of number you get.

Re:GitHub Copilot available for JetBrains and Neovim by jmnicolas on Thursday October 28, 2021 @04:41AM (#29023796)
You're right, there's double.PositiveInfinity and double.NegativeInfinity in C#.

Never encountered it before (and I'm ashamed to say C# is my main language since 2009).

Re:GitHub Copilot available for JetBrains and Neovim by eloisius on Wednesday October 27, 2021 @06:22PM (#29019817)
If you are seeking a minimum value within some complicated iteration, it’s easier to start your min accumulator as Inf than null with extra null checks.