this post was submitted on 21 Jul 2023
661 points (100.0% liked)

Programmer Humor

852 readers
4 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 25 comments
sorted by: hot top controversial new old
[–] TheSaneWriter@lemmy.thesanewriter.com 46 points 1 year ago (2 children)

This is a really good way of explaining the difference.

[–] 0ops@lemm.ee 61 points 1 year ago* (last edited 1 year ago)

Nah, tcp still yeats the baby, it just verifies that it was caught unbruised, or at all. If it wasn't that's ok. Try again. Yeet the baby's little sister

[–] becool@kbin.social 10 points 1 year ago (6 children)

So, UDP just sends it out there and anyone can intercept it?

[–] r00ty@kbin.life 26 points 1 year ago (1 children)

No. Both UDP and TCP can be intercepted the same. The difference is that UDP sends a packet to an address. But doesn't have any in built system to check that it arrived, that it arrived intact or to resend if it didn't. There's also no built in way to protect against spoofing or out of order packet delivery. But generally implementations will handle the ones that are important of those themselves.

TCP establishes a circuit, packets are sent, verified and resent if required until the original data, in the correct order is delivered to the application. Also there is some protection against spoofing with sequence numbering. The downside is that time sensitive data might be delayed because of the retransmission and re-assembling. Which is why time sensitive streams like VoIP are usually sent over UDP.

[–] Celivalg@iusearchlinux.fyi 7 points 1 year ago (1 children)

Btw, on my device you sent the message -110min ago, not 110, -110

Welcome, traveler from the future

[–] r00ty@kbin.life 16 points 1 year ago

Yeah, this is a known interoperability thing between kbin and lemmy. So, I'm afraid I can't give you this week's lottery numbers ahead of time.

[–] thisbenzingring@lemmy.sdf.org 6 points 1 year ago

It's not so much that anyone can intercept it, it's more that the sender just blasts it and no acknowledgement so there's lots of potential for loss

[–] Lith@lemmy.sdf.org 4 points 1 year ago

The benefit is that you don't need to wait for verification from the user that they got the packet before you can send the next group of packets. If you're, say, watching a stream, it's not important that you received the packets because that's just a few skipped frames or a second of lag, whereas the tradeoff on overhead is pretty big.

TCP is more important with like file downloads where it's okay if it takes a couple hours to get a really big file as long as that file isn't corrupted or missing any data.

[–] TheSaneWriter@lemmy.thesanewriter.com 4 points 1 year ago* (last edited 1 year ago) (2 children)

From what I can tell yes. There's no established connection, the data is sort of just broadcasted.

Edit: I was operating under a misunderstanding, please refer to andrew's response.

[–] andrew@lemmy.stuart.fun 6 points 1 year ago

Broadcast would mean it's sent to anyone. UDP packets still usually have a unicast address and thus are routed by routers and switches to specific machines, but as a connectionless protocol, UDP never validates which, if any, packets are received by the recipient like TCP does. If any verification is needed that needs to be handled higher in the OSI stack. E.g. by the application layer.

[–] exscape@kbin.social 5 points 1 year ago

No no, it's not "broadcasted". It still has a fixed sender and receiver IP address, but UDP doesn't verify whether the receiver got the data or not. You can implement that over UDP, but you have to do it yourself.

With TCP, the packet will retransmitted automatically if the receiver didn't tell the sender "yep, I got it".

[–] Parallax@kbin.social 3 points 1 year ago

You'd have to be somewhere in the route from A to B to intercept it. But TCP is no different in that regard.

TCP is connection based so both sides need to agree to connect before data is exchanged. UDP is connectionless, so it will send data from A to B (and vice versa) regardless of if the other side is available.

[–] UnverifiedAPK@lemmy.ml 2 points 1 year ago

No, instead of using TLS for encryption (like most TCP traffic) UDP will use things like DTLS and SIP

Or if you're asking about the actual transport it's more like TCP is going to your friend's house and calling your mom to let her know you're there vs UDP is going to their house and not calling.

[–] Parallax@kbin.social 24 points 1 year ago

Wanna hear a UDP joke?

Nevermind, you wouldn't get it.

[–] kira_ananta@lemmy.blahaj.zone 20 points 1 year ago (3 children)

Yeahhhh I get the joke but I wish the meme didn't do it in a racist way. Why is the TCP baby white and the UDP baby not?

[–] bloodfart@lemmy.ml 18 points 1 year ago

Because udp packets are targeted for harassment by border devices like firewalls more often.

[–] Psionicsickness@reddthat.com 14 points 1 year ago (1 children)

Please stop. It's not intentional. Stop basing your judgment on people and actions with an acute view of their skin color. Just see two sets of people. Thanks.

[–] igorkraw@lemmy.ml 7 points 1 year ago (2 children)

Please stop.

In a world where there is racism, acting like racist themes don't exist only helps prolong it.

One set of of people here was drawn white (and responsible with a child), the other was drawn black (and irresponsible). That's worth critiquing, intentional or not.

Acting racist doesn't mean you are literally Satan, it means you are acting racist. Not stopping after people point it out and acting defensive and in denial is worse than thoughtlessly doing something racist, being told off and then correcting

[–] Llewellyn@lemmy.ml 11 points 1 year ago

You're the part of the problem.

[–] AnarchoYeasty 1 points 1 year ago (1 children)

Would you feel better about this if it was a stock photo of a white woman yeeting their baby rather than using a comic? A comic that the meme maker didn't create? Should the meme maker recolor the baby and woman white to make things better for you? This isn't racist because one of the meme images happens to be of black people.

[–] igorkraw@lemmy.ml 2 points 1 year ago
  1. Yes
  2. I don't care about who created it, the composition was done by the creator
  3. What is the line of "racist" for you? Before we argue this further, let's establish what is racist and what isn't
[–] randint@feddit.nl 4 points 1 year ago* (last edited 1 year ago)

I get your concern about this meme being racist, but not everything is about race. The stock photo of two adults passing a baby and the picture from a cartoon depicting a woman throwing a baby just so happened to be of different races. IMO that's not racist.

[–] vanZuider@feddit.de 14 points 1 year ago

Old but gold.

[–] Dominic8999@lemm.ee 4 points 1 year ago

Made me kinda chuckle ngl

[–] epenance@lemmy.dosh.dk 2 points 1 year ago

Haha giggled not gonna lie