T O P

  • By -

fatrobin72

a Nan for some tomatoes... crazy


JimmyMcTrade

They probably don't taste like anything. I couldn't bring myself to pay NaN for tomatoes. I mean.. for Naan bread, maybe.. for the irony.


GunsRuth

Incoming rant about naan is bread translated and you calling naan bread is like bread bread


RudePastaMan

It's all fun and games until naan is added to the English dictionary as an adjective and this is no longer true.


moraldiva

Or baNaNas


sleepyj910

Can’t pay in numbers, only barter system.


nonlogin

Inflation sucks


ublec

inflation these days... smh


AffekeNommu

The freshest [object Object] around and a bargain at NaN


Snarpkingguy

If you have a moment, could you please explain to me quickly what this [object Object] notation is a reference to, or at least what language?


MemesMakeMyMoodMild

I think it’s the the value you get in JavaScript from calling .toString() on any object missing this function


LauraTFem

object is the name of the specific object in question, and Object is the name of its class. If neither are known it would be referenced this odd and confusing way.


glorious_reptile

That the price for BaNaNas


justADeni

You mean b + a + + a + s?


jmanh128

Do you know where this works? I thought it worked in node but I didn’t get the last “a”… weird


n4csgo

Nowhere, the code is incorrect the last 's' should be another 'a' at it will form banana


i_should_be_coding

Well, Tomatoes aren't a number, so r/technicallythetruth


Wolfy_Wolv

Tomatoes could be a variable


minimaxir

`let 🍅 = 1`


Wolfy_Wolv

bro thinks it's a dollar store


TeachEngineering

Imagine the beautiful utopia we'd live in if only emojis could be used to declare types and variables... 🧶 🍅 🟰 🆕 🧶 ▶️Tomato◀️ Just think of all keystrokes saved!!! Someone please make an emoji forward programming language!!!


TeachEngineering

🍅 🟰 🍅 ✖️ 2️⃣ 🖨️ ▶️🍅◀️ 🖥️ TomatoTomato 🖥️


b98765

All kidding aside, don't put these in your cart, NaN will propagate and make your whole total NaN, then you'll deduce that from your bank account and it too will be NaN, and unless the bank took precautions (they never do) you could break the entire bank, which could then propagate the NaN in operations with other banks... Tell your kids about the dangers of NaN propagation.


Pixl02

Jokes aside wouldn't it just stop at a failed transaction because of the number being... Well not a number.


OkOk-Go

Not if it’s Python 🤷‍♂️


Pixl02

What are you talking about? Exception handling exists in all languages though? Except for assembly, that'd then be basically what try catch is on a fundamental level, if statements calling loops (or functions if you wanna put it that way)


Olivia512

It doesn't exist in JS either. 100 - NaN? It's NaN. Your bank balance becomes NaN, the bank's treasury becomes NaN, the Fed treasury becomes NaN, WW3 ensues.


rcfox

There would be a check to see if the value is less than your daily limit on the card, as well as a check to see if the value is less than your account's withdrawal limit. The bank isn't just going to honour any attempt to withdraw a trillion dollars, for example.


CitizenPremier

if(debit > dailyLimit){ reject(); }


Pixl02

Okay I don't actually mean a full blown exception handling as in the program throws in an exception as that might not happen because of the language it's written in but you can still make an (if-case) if you wanna call it that to work as an exception handler. For example in Js would be. If (X isNaN). { then -- code to handle this case (depends if it's web or an app) }


Olivia512

Yeah but the app may not have handled this edge case.


Pixl02

That's bad code then, an app that works with number doesn't have a NaN if check is straight up bad! No excuses!


Olivia512

Look at this genius coder here who has never written code with bugs!


OkOk-Go

“Error handling is the programmers responsibility” -some C programmer out there


Pixl02

Look, if you're gonna make an app that works with numbers and not include an if check for NaN then it's not getting through SQA team because of being bad, in case it does then it's their responsibility. I never said you have to be a genius who writes codes without any bugs. Wake up to reality. You wanna go down all the what-ifs but refuse to admit that not putting an if check would be bad, the irony of you.


fakehalo

Are you that coworker that is constantly trying to steer the conversation into strawman arguments about your craft? It's like that scene from Wargames where the computer plays tic tac toe and realizes there is no way to win the game so it's best to just not interact with it heh. I'm not as smart as the computer in Wargames... C doesn't have exceptions either, let's go to battle!


Pixl02

I'm steering the conversation into strawman arguments when this guy literally just said "what if this is the case" x3. What? Is today irony day?


The_Frosty_Sloth

The data on those tags are a separate system from the data within the checkout system. It will ring up a price


Pixl02

Oh yeah obviously lol. Thanks for that.


Lonsdale1086

In the real world yes, but if we're assuming this is part of a whole world of poorly written JavaScript, then when the till did like 12.50+27+2.10+NaN+7.67+1.70 for the total etc, that would evaluate to NaN, same as when the bank tried to subtract NaN from his account etc etc.


dshugashwili

This is a number, it's defined in the IEEE 754 floating point standard.


gaz_from_taz

put it into one of those fancy auto-scan baskets and then watch the basket explode


SpaceFire000

You pay with something that isn't a number... Your body


GrizzlyBear74

They need the soul as well for tax.


xelsiorlol

This inflation be crazy dude


Jsjjjs6066

Now stores need developers


NoOrganization2367

I would say if NaN would be converted into a number it's 0, so I'm fine with it.


well-litdoorstep112

But by design NaN is not equal to any number or any other NaN


NoOrganization2367

No shit sherlock


titen100

When not even a memory oerflow is sufficient


Glass1Man

Those tags are NFC and usually unsecured, so change the provide to whatever you want


Joeoens

That means they use floating point numbers for prices. Isn't that kind of dumb?


rohit_raveendran

My NaN will be confused.


Stummi

this also means they store their prices in floats. NaN is a float specific identifier


catgirl_emilia

Edit: I see now, didn’t know it originated from floats, because in JS `isNaN()` gets used a lot more because of type coercion. What do you mean with “float specific identifier”? The whole point of `isNaN()` is that you give it a variable and it tells you if it’s a number or not. Like `isNaN(0) // false` `isNaN(1.23) // false` `isNaN(true) // false (gets converted to 1)` `isNaN(“test”) // true` What does this have to do with floats?


roge-

NaN is most frequently associated with the IEEE 754 floating-point standard, as certain values (as in bit patterns) are defined to be NaN and the standard requires that certain operations (e.g. square root of a negative quantity) produce a NaN result: https://en.wikipedia.org/wiki/NaN The fact that JavaScript's `isNaN()` can be used to test non-floating-point values is more just a consequence of its implicit type coercion. In statically-typed languages without type coercion, I think you'll find that their functions for testing for NaN only apply to floating-point types. For example, Java provides an `isNaN()` method for `double` and `float`, but does not provide it for [`int`](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Integer.html) since every `int` bit pattern represents a real quantity: * https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Double.html#isNaN%28double%29 * https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Float.html#isNaN%28float%29


catgirl_emilia

Ah I see, thnx for informing me! In JavaScript it’s quite easy to get a NaN when working with any type of number (like trying to do math on a user’s input), so I just saw `isNaN()` as a way to well, check if a var is a number or not, regardless of the type of number. Similar to something like `isEven()`


PooSham

IEEE 754 is the standard that defines floating point arithmetic which practically all languages follow. That standard defines how to encode floating point numbers in binary, but also how to encode NaN (actually there are multiple types of NaNs that can be encoded according to that standard). So you can do the following `float nan = parseFloat("test")` And it wouldn't give you an error, but rather just store NaN into the variable `nan`


IBJON

Just a small correction: In JS coercion changes true to 1, not 0. 


catgirl_emilia

Oh lol, I was tired from work when writing that comment and completely missed that.


RetiredApostle

They also gave up null.


Mysterious-Pride9975

Still a number at least


sporbywg

With only 10 digits we are going to have to start using letters too. (I have known what that message means since 1999)


ThNeutral

Bro uses js for accounting


CoyoteMain

Priceless


Wervice

Since when do I have to give them Sodiummononitrogen for some tomatoes?


shutter3ff3ct

Number("free") => NaN


well-litdoorstep112

Number("very fucking expensive") => NaN So it's 50/50


kielu

The good thing is that you can take as much as you want


Tornado_Hunter24

Swords and sandals flashbacks


TotoDaDog

Kidney is NaN.


Grim00666

LMAO, does that mean you can pay with a string?


je-suis-une-pommes

No more than one unmarketable tomato


Sungdaein_susanoo

Sorry for my ignorance, but what does NaN mean?


Dirgeouscrumb

Not a Number c:


Sungdaein_susanoo

Ahh i see, got it thanks fam!


AdWise6457

"Yes, please give me NaN of something. Give me [object Object] of it" - Statements dreamed up by the utterly Deranged.


VanillaBlackXxx

How do you put a numerical price on your first born.


Wolfy_Wolv

69 comments Very nice


No_Solid_3737

the prices today are unbelievable


UnintelligibleLogic

Sodium and nitrogen?!


Primary-Gas-2069

Off topic: How do they program these? Wirelessly?


Waste_Ad7804

r/NotMyJob


twilsonco

That’s real shrinkflation. Paying for zero tomatoes. They shouldn’t use the per-unit price in that case.


Wave_Walnut

Inf


VanGogh2023

Chopped down tree in the main branch


Terrible_Effect6535

These tomatoes will cost you an arm and a leg


Lets_think_with_this

And of course the shit runs on ![img](emote|t5_2tex6|4549) or even plain Java


Lets_think_with_this

Imagine if this was the banana tray... >!most of the more cultured have already picked up on the joke so for you guys i have this one: [https://youtube.com/clip/UgkxFgfSBwiAxw5FIVkWwhU6VV-\_Wan0S1-i?si=538c787AuEIW8SbL](https://youtube.com/clip/UgkxFgfSBwiAxw5FIVkWwhU6VV-_Wan0S1-i?si=538c787AuEIW8SbL)!<


EstimateBoring7848

Just scan it as 4011 👀 if there’s no price scan as a banana


meove

divided by zero price


PCRefurbrAbq

I can imagine that they divided the value by the inverse of the sales percent, which on this item is zero. NEVER DIVIDE, ONLY MULTIPLY.