this post was submitted on 28 Oct 2023
287 points (98.0% liked)

Programmer Humor

32375 readers
265 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
all 24 comments
sorted by: hot top controversial new old
[–] mvirts@lemmy.world 96 points 1 year ago

πŸ™ƒ compression algorithms hate this one simple trick!!

[–] whileloop@lemmy.world 69 points 1 year ago (1 children)

This is a joke, right? This feels like a very dumb solution. I don't know much about UTF-8 encoding, but it sounds like Roman characters can be encoded shorter than most or all others because of a shorthand that assumes Roman characters. In that case, why not take that functionality and let a UTF-8 block specify which language makes up most of the text so that you can have that savings almost every time? I don't see why one would want it to be random.

[–] simplify@lemm.ee 20 points 1 year ago (1 children)

I immediately thought of Leeroy Jenkins in the last sentence.

https://youtu.be/mLyOj_QD4a4?si=6RhZzj8LO3tr80cT

[–] Shhalahr@beehaw.org 2 points 1 year ago (1 children)

Pretty certain it's an intentional reference.

[–] simplify@lemm.ee 2 points 1 year ago (1 children)

You're right, and someone else might be a part of the lucky 10,000 today.

[–] Shhalahr@beehaw.org 1 points 1 year ago (1 children)

And now we have the obligatory xkcd reference. 😁

[–] apotheotic@beehaw.org 19 points 1 year ago (1 children)

I can't read "what a time to be alive" without hearing Two Minute Papers in my head

hold onto your papers

[–] lowleveldata@programming.dev 8 points 1 year ago (1 children)

longer than necessary

It's as long as it needs to be unique

[–] palordrolap@kbin.social 4 points 1 year ago* (last edited 1 year ago) (2 children)

Sure. OK. How about we put the Greek alphabet at the lower code points and the Latin alphabet higher up, and now you might argue that Latin takes up more space than necessary.

Potential counterpoint: "This is stupid. Latin goes in the lower code points, it always has, it always will. Who's putting Greek down there??"

Well, if Greece had invented computing as well as, let's say, democracy that's very likely how things would be.

In that timeline, someone is using exactly the same line on you "[The representation of Latin text in memory i]s as long as it needs to be unique." and you're annoyed because your short letter to Grandma is using far too much space on your hard drive.

[–] Theharpyeagle@lemmy.world 4 points 1 year ago* (last edited 1 year ago)

Genuine question, how many applications are bottlenecked by the size of text files? I understand your analogy, but even a doubling in size of all your utf-8 encoded files would likely be dwarfed by all the other binary data on your machine, right?

Oh true. I'd be so annoyed because I somehow wrote a whole letter to Grandma in English which she couldn't read.

[–] dukk@programming.dev 2 points 1 year ago

And it has 333 upvotes! We must maintain this at all costs…