There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

lemmy.ml

ivanafterall , to memes in Planet NOOB
@ivanafterall@kbin.social avatar

There's Planet N00B!

massive_bereavement ,
@massive_bereavement@kbin.social avatar

I see you've found home.

ivanafterall ,
@ivanafterall@kbin.social avatar

You're thinking of Planet Moob. Common mistake. We're a friendly bunch, but not much to look at.

meekah , to memes in there was no prank
@meekah@lemmy.world avatar

Oh man, I fell for it even though my client doesn’t support in app video…

OldManBOMBIN , to memes in there was no prank

Just sent this to my son, my brother, and my ex wife. Tee-hee.

RIP_Cheems , to memes in there was no prank
@RIP_Cheems@lemmy.world avatar

Fuck you.

Fargeol , to programmerhumor in the hardest exam question

1 - Easiest way to run a script in your browser
2 - Always finds its way if inputs are bad
Nan - undefined

Skullgrid ,
@Skullgrid@lemmy.world avatar

NaN is of type number. because fuck me.

zea_64 ,

IEEE-754

kevincox ,
@kevincox@lemmy.ml avatar

To be fair, this is actually reasonable. But it does look stupid on the face of it.

joneskind ,
@joneskind@lemmy.world avatar

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.

Skullgrid ,
@Skullgrid@lemmy.world avatar

Falsy zero? What’s wrong with that, 1 is true and 0 is false. I thought that was standard logic?

joneskind ,
@joneskind@lemmy.world avatar

in javascript a property is truthy if it exists


<span style="color:#323232;">myThing.property = "some string"
</span><span style="color:#323232;">
</span><span style="color:#323232;">if (myThing.property) { // true
</span><span style="color:#323232;">  // do something
</span><span style="color:#323232;">}
</span>

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.

Skullgrid ,
@Skullgrid@lemmy.world avatar

ah ok , I think I write this a bit more verbose when using other languages, instead of


<span style="color:#323232;">if(thing)
</span><span style="color:#323232;">{
</span><span style="color:#323232;">   stuff;
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span>

I do


<span style="color:#323232;">
</span><span style="color:#323232;">if(thing != null)
</span><span style="color:#323232;">{
</span><span style="color:#323232;">   stuff;
</span><span style="color:#323232;">}
</span>

so checking for numbers being truthy & existing didn’t seem like an issue

joneskind , (edited )
@joneskind@lemmy.world avatar

In the case of a non-existing property, the value would be undefined rather than null.

And while == and != exist in JavaScript, most linters will throw an error and require a === and !== instead as they should be avoided.


<span style="color:#323232;">null == undefined // true
</span><span style="color:#323232;">null === undefined // false
</span>

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>
space ,

Easiest? More like… The only way.

manucode , to memes in Planet NOOB
@manucode@infosec.pub avatar

Don’t open dead inside

Mio , to memes in It's that easy!

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…

Twelve20two ,

It’s because oily boiz don’t want to give up their power and wealth. They seem to enjoy LARPing as dragons

Mio ,

Well, it is the many against the few rich. It is everyones planet.

the_artic_one ,

I actually dont understand why we not do something drastic. I mean like ban cars and planes.

Talk so some other people about your idea and you’ll understand why we don’t.

CaptainBlagbird , (edited ) to memes in Planet NOOB
@CaptainBlagbird@lemmy.world avatar

don’t dead
open inside

breakcore , to memes in there was no prank

Haha super neat

lemmyvore , to linux in Flathub new home page

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.

naptera ,

What about the search bar at the top? It has category filters as well.

lemmyvore , (edited )

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.

naptera ,

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)

helenslunch ,
@helenslunch@feddit.nl avatar

The search bar is not for browsing.

sirico , to programmerhumor in the hardest exam question
@sirico@feddit.uk avatar

It leads to typescript

You get surprises from npm

ByteJunk ,
@ByteJunk@lemmy.world avatar

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.

fxdave ,

That’s fair. Typescript has to cook with the existing js ecosystem.

mynameisigglepiggle , (edited )

If isWeekend doesn’t exist, then the weekend doesn’t exist, so it’s naturally false.

That’s why JavaScript gets pushed so hard - it’s part of the capitalist agenda to keep us working 7 days a week

kamen ,

Weren’t you getting runtime errors for the function not being found?

humbletightband ,

No, they were probably getting false every time

shasta ,

Falsy* because it was undefined

However, their IDE should have highlighted it as an unknown property. Guess this guy is coding in notepad or vi.

humbletightband ,

Yep, thanks for correcting me. In fact, if they write something like


<span style="color:#323232;">if (day.isWeekend) {...}
</span>

The block will never be executed with the old version of library

shasta ,

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.

ByteJunk ,
@ByteJunk@lemmy.world avatar

My dude, you need to understand that all that anger and resentment, it is not you. It’s the years of JavaScript poisoning your mind.

In any case, that goes to my point. I would have to be saved by my IDE, when any sane language will blow up in your face as soon as you try to run it.

owsei ,

I don’t know how luxon works, but isWeekend could be a property instead of a function

ByteJunk ,
@ByteJunk@lemmy.world avatar

It is. It also happens to be undefined, and checking that for truth is how I was bitten.

Thcdenton ,
Anamana , to memes in there was no prank

Stupid monkey no catch

Juice , to memes in no comment

The feminization of masculinity will be the fall of Western Civilization…and I’m so here for it

Sabre363 ,

About damn time

LittleBorat2 ,

It starts at the top of the meme again… So have fun with that whatever your deal is

Juice ,

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.

bquintb , to memes in there was no prank
@bquintb@midwest.social avatar

We were the monkeys all along.

avidamoeba , to programmerhumor in Junior vs senior
@avidamoeba@lemmy.ca avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines