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.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

frank , in How big is your desk?

I have a KVM switch so I can control my array of computers with one monitor setup. I have a normal desk and a big closet to house all the computers.

PlexSheep ,

We just have a warehouse with a few big computers. We just use our desks to access them.

1rre , in How big is your desk?

Docker fan mindset

veganpizza69 , in JavaScript
@veganpizza69@lemmy.world avatar

Who would use that kind of type coercion? Who? I want to see his face.

dejected_warp_core ,

I take this as less of a “I can’t use this intuitive feature reliably” thing and more of a “the truth table will bite you in the ass when you least expect it and/or make a mistake” thing.

flying_sheep ,
@flying_sheep@lemmy.ml avatar

Just use a formatter. It’ll show you that the second one is two statements:

  1. {} (the empty block)
  2. +[] coerce an empty array to a number: new Number(new Array())
dejected_warp_core ,

I totally get that: use the right tools and you’ll be okay. This applies to many technologies in this space.

With respect, I still take this advice like hearing “look out for rattlesnakes if you’re hiking there.” It might be safer to just hike where there are no rattlesnakes, instead.

flying_sheep ,
@flying_sheep@lemmy.ml avatar

You’re right, of you have compete freedom, do that. If the place you want or need to go to is most comfortably reachable via rattlesnake road, bring boots.

In other words, if you don’t think the wasm landscape is mature enough to build a web thing with it, you are stuck with JavaScript, but you don’t have to rawdog it. I haven’t run in a single weird thing like this in years of writing typescript with the help of its type system, ESLint and a formatter.

marcos ,

It’s not even the coercion that is the problem here. The types are already bad by themselves.

orangeboats , in JavaScript

This is why I try my damnedest not to write in weakly typed languages.

string + object makes no logical sense, but the language will be like “'no biggie, you probably meant string + string so let’s convert the object to string”! And so all hell breaks loose when the language’s assumption is wrong.

zalgotext ,

You don’t necessarily need types for that kind of thing though, a strict linter that flags that code works just as well

Blackmist ,

Some automatic conversion is fine.

a=3+0.2

print(“Hello {name}. You are {age} years old”)

That kind of thing. But the principle of least surprise definitely applies. If you get to the point where you’re adding two booleans and a string, I feel like the language should at least say something. At least until the technology exists for it to physically reach out of your screen and slap you.

RavenLuni , in How big is your desk?
@RavenLuni@furry.engineer avatar

@ZeroCool my desk is currently 52,572,500 miles long but I need a bigger one.

pewgar_seemsimandroid , in I'll have you know, my fork of a github repo has 3 stars 😎

4 follower’s on mastodon

itsraining , in JavaScript

<span style="color:#323232;">{} + 0
</span><span style="color:#323232;">>> 0
</span><span style="color:#323232;">
</span><span style="color:#323232;">0 + {}
</span><span style="color:#323232;">>> "0[object Object]"
</span>

I’m going home.

Blackmist ,

<span style="color:#323232;">0 == []
</span><span style="color:#323232;">>> true
</span><span style="color:#323232;">
</span><span style="color:#323232;">"0" == []
</span><span style="color:#323232;">>> false
</span><span style="color:#323232;">
</span><span style="color:#323232;">0 == "0"
</span><span style="color:#323232;">>> true
</span>
renzev , in How big is your desk?
Aceticon ,

An this was back in the 80s where there were only 8 programming languages…

Classy ,

Rocking those classic 990s

Scoopta , in Basically the extent of my IPv6 knowledge
@Scoopta@programming.dev avatar

Should probably fix that given we’ve been out of IPv4 for over a decade now and v6 is only becoming more widely deployed

vk6flab ,
@vk6flab@lemmy.radio avatar

It’s not real.

renzev OP ,

Agreed. Though I wonder if ipv6 will ever displace ipv4 in things like virtual networks (docker, vpn, etc.) where there’s no need for a bigger address space

captainjaneway ,
@captainjaneway@lemmy.world avatar

I hope so. I don’t want to manage two different address spaces in my head. I prefer if one standard is just the standard.

domi ,
@domi@lemmy.secnd.me avatar

Yes, because Docker becomes significantly more powerful once every container has a different publicly addressable IP.

Altough IPv6 support in Docker is still lacking in some areas right now, so add that to the long list of IPv6 migration todos.

30p87 ,

I wish everything would just default to a unix socket in /run, with only nginx managing http and stream reverse sockets.

verstra ,

Wait, but if you have, for example an HTTP API and you listen on a unix socket in for incoming requests, this is quite a lot of overhead in parsing HTTP headers. It is not much, but also cannot be the recommended solution on how to do network applications.

Omgboom ,

Then why does it still break everything lol

al4s ,

Skill issue

0x0 ,

we’ve been out of IPv4 for over a decade now

Really? Haven’t had trouble allocating new VPSs with IPv4 as of late…

frezik ,

You’re probably in a country that got a ton of allocations in the 90s. If you came from a country that was a little late to build out their infrastructure, or even tried to setup a new ISP in just about any country, you would have a much harder time.

Holzkohlen , in JavaScript

It’s best not to touch anything web related, lest you want to go mad. It’s like the elder scrolls or laying eyes on some cosmic horror creature. Tbf this also goes for C++

MonkderDritte ,

Keep to sane environments to keep sane.

Buttons ,
@Buttons@programming.dev avatar

At least C++ build tools are easier than modern JS.

marcos ,

I don’t think “easier” is the right way to compare here. The C++ build tools will absolutely rewrite your code into something you can’t expect to guess, but it doesn’t make them hard to “use”.

Ticklemytip , in JavaScript

I love inside jokes. I hope you be apart of one someday

southernwolf , in How big is your desk?
@southernwolf@pawb.social avatar

This is why we need 3, 4, or even 5 monitors at a time.

Varven ,
@Varven@lemmy.world avatar

More monitors the better

briggsyj , in JavaScript
Rai , in How big is your desk?

Reminds me of a scam call center person telling Kitboga “your IP address is tied to your house address. You don’t get a new one unless you move houses”

MaggiWuerze ,

I wish

iAvicenna , in It's called attaining divinity
@iAvicenna@lemmy.world avatar

I guess this is what gen z programmers making memes look like

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines