Click here to Skip to main content
15,887,027 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
jmaida21-Mar-24 11:15
jmaida21-Mar-24 11:15 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
jschell21-Mar-24 16:30
jschell21-Mar-24 16:30 
AnswerRe: What's y'all's favorite way of dealing with floating point precision? Pin
Sander Rossel20-Mar-24 22:35
professionalSander Rossel20-Mar-24 22:35 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon21-Mar-24 5:06
professionalJeremy Falcon21-Mar-24 5:06 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Sander Rossel21-Mar-24 5:54
professionalSander Rossel21-Mar-24 5:54 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon21-Mar-24 6:22
professionalJeremy Falcon21-Mar-24 6:22 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Sander Rossel23-Mar-24 1:43
professionalSander Rossel23-Mar-24 1:43 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon23-Mar-24 4:57
professionalJeremy Falcon23-Mar-24 4:57 
Sander Rossel wrote:
You forgot shift, which removes the first element.
Didn't forget it man. It's an Internet post... not a book. I was giving a few examples. Do better than the kiddie crap on CP.
Sander Rossel wrote:
I just want to say array.remove(something); and it should remove something.
Well that's enough reason to hate an entire language. #sarcasm
Sander Rossel wrote:
Everyone who says "splice is JavaScripts remove function" is dead wrong.
Well, what I find with programmers, they lack enough maturity to not be overly emotional about crap. And they love to hate to feel intelligent or superior (usually the opposite). I'm going to give you three examples that don't require much thought, you'll probably not change your mind at all but it doesn't mean I'm wrong... bias and hate by non-experts is bias and hate after all...
JavaScript
// given this
const data = [1, 2, 3, 4, 5];

// method 1, this is where you complain it takes two calls
delete data[2];
console.log(data.filter(x => x));

// method 2, this is where you complain it's not called "remove"
console.log(data.filter((x, i) => x !== 2));

// original method you didn't even bother to try, this mutates
// let me guess, never read the documentation on it?
data.splice(2, 1);
console.log(data);
Also, keep in mind, C# doesn't have a strong sense of immutability, like JavaScript does. Not that you can't mutate, as given in the examples...

I suggest you try running that code before perpetuating the unfounded hate.
Jeremy Falcon

GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon23-Mar-24 5:00
professionalJeremy Falcon23-Mar-24 5:00 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon21-Mar-24 5:24
professionalJeremy Falcon21-Mar-24 5:24 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
englebart23-Mar-24 5:47
professionalenglebart23-Mar-24 5:47 
JokeRe: What's y'all's favorite way of dealing with floating point precision? Pin
Richard Deeming20-Mar-24 23:06
mveRichard Deeming20-Mar-24 23:06 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon21-Mar-24 5:00
professionalJeremy Falcon21-Mar-24 5:00 
AnswerRe: What's y'all's favorite way of dealing with floating point precision? Pin
Gary Wheeler21-Mar-24 1:01
Gary Wheeler21-Mar-24 1:01 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Mark Whybird from Brisbane21-Mar-24 20:10
Mark Whybird from Brisbane21-Mar-24 20:10 
AnswerRe: What's y'all's favorite way of dealing with floating point precision? Pin
Marc Clifton21-Mar-24 2:28
mvaMarc Clifton21-Mar-24 2:28 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon21-Mar-24 4:58
professionalJeremy Falcon21-Mar-24 4:58 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Marc Clifton21-Mar-24 7:10
mvaMarc Clifton21-Mar-24 7:10 
AnswerRe: What's y'all's favorite way of dealing with floating point precision? Pin
den2k8821-Mar-24 23:01
professionalden2k8821-Mar-24 23:01 
AnswerRe: What's y'all's favorite way of dealing with floating point precision? Pin
Lloyd Folden 202422-Mar-24 5:33
Lloyd Folden 202422-Mar-24 5:33 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon23-Mar-24 5:06
professionalJeremy Falcon23-Mar-24 5:06 
AnswerRe: What's y'all's favorite way of dealing with floating point precision? Pin
Matt Bond22-Mar-24 4:45
Matt Bond22-Mar-24 4:45 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon23-Mar-24 5:06
professionalJeremy Falcon23-Mar-24 5:06 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Matt Bond25-Mar-24 2:52
Matt Bond25-Mar-24 2:52 
GeneralRe: What's y'all's favorite way of dealing with floating point precision? Pin
Jeremy Falcon26-Mar-24 10:38
professionalJeremy Falcon26-Mar-24 10:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.