When my console throws a NaN I kinda think of it as an Halloween kid receiving a fruit instead of a candy. They won’t say “That’s a fruit”. They’ll say “That’s not a treat”.
I’m personally pissed more often by a falsy 0.
Did you know that early analog computers would literally explode when asked to divide by 0?
Now computers just say “Hey stupid, that shit is not even a Number in a mathematical sense, but sure I’ll add one to it.” instead of “Why would you kill me like this?”
You can’t really define Infinity as a number, yet it is part of their world.
So typeof NaN === ‘number’ totally makes sense in that regard.
If you ever worked with arrays of dates, don’t judge NaN too harshly.
It works with everything except of course for falsy values
<span style="color:#323232;">myThing.number = someNumberThatShouldNotBeEqualToZero
</span><span style="color:#323232;">
</span><span style="color:#323232;">if (myThing.number) {
</span><span style="color:#323232;"> // do something very important with that number that should not be equal to zero
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">// This can fail at anytime without warning
</span>
So you’ve got to be extra careful with that logic when you’re dealing with numbers.
I am not saying it’s wrong though. I’m saying it’s often annoying.
Besides, null is a perfectly valid value for a property, just as 0. Working with API Platform, I couldn’t tell the number of times I used this kind of statement:
<span style="color:#323232;">if (property || property === null) {
</span><span style="color:#323232;"> // do some stuff
</span><span style="color:#323232;">}
</span>
Probably just as much as
<span style="color:#323232;">if (property || property === 0) {
</span><span style="color:#323232;"> // do some stuff
</span><span style="color:#323232;">}
</span>
I actually dont understand why we not do something drastic. I mean like ban cars and planes. We can still get around. Just not at the same speed at the moment. Someone will come up with a better idea then gas cars.
We also need to think about computers. Why throw them away? We could just make better software and keep the devices for a very, very long time. Heck, very bad computer could land on the moon…
Lol how the fuck do you browse packages? Did they forget to add a link to “apps” or something to the top menu?
You have to keep scrolling down the front page and look at categories and maybe press “More Productivity” and you get to see the packages in that category. But you can’t browse all packages and you can’t get a list of all categories.
I’m not seeing any filters? If I press the search field I just get a prompt.
I saw there’s a slash sign in a square but I can’t figure out what it’s for. If I click it it dissapears, if I type “/” in the bar I get nothing.
Edit: so if you press the search button with nothing written you get to flathub.org/apps/search which is a somewhat more useful page. The default listing there is still garbage because it’s hard-limited to 1000 apps for some reason but there’s no pagination and no sorting(?). But at least you get a filter bar on the left so there’s that.
Also if you scroll aaaall the way down to the footer of the page there are some links to “collections” such as “trending” and shit. Which has pagination but no filters and no sorting. 😆 And the distinction between the “trending” and “popular” collections is left as an exercise for the user, I suppose.
It’s like it was designed by someone who’s never seen or used a package repository in their life.
Yeah, it really is more like google play store or shopping websites and similiar apps/websites (although there are some that have a better design I guess). I’m not really a fan of it either, but I guess people being used to those (which is probably the majority of the userbase of flatpak) feel more comfortable with it.
My guess with the difference between “trending” and “popular” is that the former means lots of recent downloads and the latter a lot of downloads in a longer timespan (e.g. a year or so)
I spent way too long today figuring out why my app was doing something that it’s NOT supposed to do on weekends.
I read Luxon’s docs (pretty cool lib tbh) again and again, and tried everything I could think of to get isWeekend to return a sane result.
Turns out I was pulling a somewhat older version of Luxon, where isWeekend didn’t exist. In any sane language, I expect I’d get a huge warning about a property that doesn’t exist, but alas…
Typescript helps me keep my sanity, but juuuuust barely.
Yeah that’s exactly what I think happened to him. He needs a better IDE and/or needs to stop copy/pasting code from stackoverflow or documentation that doesn’t match his library version.
It was more a comment about people who tend to post this meme as if it were true, who constantly wail and moan about Western civilization. But thanks for checking in, jokes are funnier when I have to explain them.
lemmy.ml
Active