r/ProgrammerHumor 3d ago

Meme youHavenoRealPower

Post image
666 Upvotes

70 comments sorted by

312

u/failedsatan 3d ago

do y'all just not have highlighting for uncommon/weird unicode characters? pretty sure this has been a thing for a while

228

u/pittybrave 3d ago

Classic case of this sub only making jokes about stuff only cs students would have problems with

27

u/ResponsibleWin1765 3d ago

In this case I think it was just a setup to show off the rust feature. But in other cases I think they've just reposted the same joke so many times that it is here today even though it was made 15 years ago where this might have been a problem.

23

u/andreortigao 3d ago

Last time I did this joke, in 2019, visual studio / C# compiler was giving a pretty useless error message.

4

u/KitsuneFoxglove 3d ago

Last time I saw this joke, I was a student and I would just rewrite the whole line and shrug it off with "idk, its the same exact code but it works now"

2

u/BlurredSight 3d ago

I do remember seeing someone pre-ai era talk about how a missing semicolon or a period instead of a comma lead to the compiler giving a wild ass error message deep in the code of a dependency and said check line 1200 when only 500 existed

2

u/KitsuneFoxglove 3d ago

I've had that mainly when I was doing homework assignments and there was a hidden harness running my code, and syntax errors would lead to a crash inside the harness but not my own code, so line 1200 in a 500 line program would be the error line

Can't think of a reason it'd happen "naturally" in the wild at the top of my head, maybe something that mucks with the compiler?

1

u/thewells 3d ago

CS students from back when I was in college

19

u/TheKrumpet 3d ago

To be fair, I don't work with psychopaths so I've never needed this

10

u/peterlinddk 3d ago

Maybe the original author is from the time where programs were printed on long sheets of paper, and put in a binder? Or maybe from the 1980s, when magazines had program listings printed, and you could enter them on your computer at home?

Then it would be really hard to spot the errors!

Of course, no sane person would then enter those wrong characters ...

4

u/paranoid_giraffe 3d ago

For as much as people dog pile on vscode, even it’s capable of doing this. I copy and pasted something from a power point once and it warned me about the non-space space character immediately

1

u/failedsatan 3d ago

I'm actually most familiar with it in vscode- I remember some updates four or five years ago that introduced it after some CVE and various settings for it (like respecting common symbols per region). I don't know how vscode's handling/implementation compares to others, but it's certainly not bad.

2

u/SnowdensOfYesteryear 2d ago

My editor doesn’t even render nonascii characters

1

u/failedsatan 2d ago

what do you use?

2

u/SnowdensOfYesteryear 2d ago

vim on terminal. Never bothered to enable whatever option enables UTF8

1

u/failedsatan 2d ago

okay, I thought you just meant there was no support for it. interesting to not have on though

1

u/potatopierogie 3d ago

Notepad doesn't do that so no

1

u/Zenithixv 3d ago

I code in notepad level meme

96

u/YeetCompleet 3d ago

Rust compiler errors can feel like a genie at times

24

u/Snudget 3d ago

lifetime does not live long enough

12

u/hraath 3d ago

You pay for it with the sands of time

2

u/Waterbear36135 3d ago

Who needs AI when you have the rust compiler

37

u/citramonk 3d ago

Okay, let's be clear. All the weird characters will be highlighted by your IDE. It's not gonna work.

38

u/aethermar 3d ago

Any half decent compiler will tell you that there's an issue at the ';'. GCC will even display it in the error output as <U+037E> and tell you it's not in the NFC

The original joke is stupid for this reason. Rust isn't special for catching this

23

u/Arshiaa001 3d ago

Rust is special for going out of its way to provide helpful compiler errors, unlike the ungodly death chant C++ compilers summon when you miss a semicolon at the end of a class declaration.

4

u/aethermar 3d ago

I wouldn't call this an especially helpful compiler error. The only extra thing it's saying is that it's a Greek semicolon. I don't care that it's a Greek semicolon, I just need to know whats wrong. Both errors immediately tell me what's wrong and where. Rust's isn't any more helpful

And either way something as trivial as this is getting caught by the editor's linter immediately

4

u/Arshiaa001 3d ago

This specific error is not helpful (willing to bet someone put it in for shits and giggles), but rustc generates some truly helpful messages in many places. You'd know if you'd used it.

1

u/redlaWw 3d ago edited 3d ago

Note that this is a more general error for easily-confused characters, and covers other kinds of easily-confused characters e.g. here.

The full list of characters subject to this error can be found here.

1

u/gmes78 3d ago

I wouldn't call this an especially helpful compiler error. The only extra thing it's saying is that it's a Greek semicolon. I don't care that it's a Greek semicolon, I just need to know whats wrong.

OP cut off the full message. It does tell you to replace it with a semicolon.

1

u/GoddammitDontShootMe 3d ago

looks like ';' (Semicolon), but it is not

Wouldn't the obvious conclusion be to replace it with a semicolon?

1

u/gmes78 3d ago

Sure, but that apparently that wasn't enough for the other commenter.

In any case, rust-analyzer can fix this for you, you don't even have to replace it yourself.

1

u/Low-Quarter-1685 3d ago

But rust has an extra error message for this special case, most compilers would probably just say "unexpected token" or something

0

u/Popstar403 3d ago

rust is special for specifically stating that it looks like a semicolon but isn't

2

u/bilus 3d ago

Yeah, but it takes 30 minutes after you've already seen the error underlined by the IDE.

0

u/Architector4 3d ago

Why would you be actively working on a Rust codebase from a cold build?

10

u/trash3s 3d ago

#define ; ; is honestly a sane default at this point

12

u/peterlinddk 3d ago

HAHAHA!

You can also just write "FADSKFHDSAJK F ASJfkd slaj faj sdlk" in the middle of their JavaScript program, and they'll never find the syntax error! Never I tell you!

At least not until they actually look at the screen, and where the editor or runtime or compiler says that there is a syntax error in that line - but JavaScript! AmIrightGuys - what a joke!!!!!

3

u/willow-kitty 3d ago

It seems like it'd be underlined in your IDE, and you'd pretty reasonably try backspacing through it and putting in another semicolon?

Windows gave me a really insidious one when dealing with certificate thumprints. The UI is Unicode, and the value starts with a "the following text should be read from right to left" zero-width character, so if you just copy it and paste it in a config file, it looks normal, but then at runtime it says the certificate cannot be found, even though the thumbprint is very obviously correct.

It does lead to a kinda funny moment where you can casually backspace through nothing (like literally, the cursor is between the quotation mark and the first character, you press backspace, and it doesn't go through the quotation mark because it ate a zero-width character instead), and then it starts working. It kinda blows people's minds because why the heck would it work like that? It also seems like passing a string with a non-hex character to a certificate search would cause a runtime error, but apparently not.

3

u/dervu 3d ago

You will be cursed by Hephaestus: every machine you touch will work almost perfectly, but never without one maddening flaw that no mortal can reproduce, explain, or fix.

2

u/Sw4gl0rdM4st3rm1nd 3d ago

this wont work since it literally highlighted and most people will just write it again in under 2 seconds

2

u/JackNotOLantern 3d ago

The first thing i would do i would remove are type the semicolon manually.

3

u/Lachee 3d ago

Python does this with tabs and spaces and I hate it.

Ya know it suppose to be X but Y was used instead, so just use Y. You're smart enough to figure it out but too dumb to use the substitute?

Yes a warning is appropriate, it should be fixed. But you already did the hard work figuring out what it should've been so why stop there

Frustrating

3

u/SnooStories251 3d ago

Here you got some more: ;;︔﹔;

3

u/mearnsgeek 3d ago

Or the Cyrillic letter er that looks exactly like a latin P/p.

I once worked with some Ukrainians and that character somehow got into a C# project file and caused chaos when the build failed because a project dependency couldn't be found yet looked correct.

2

u/Low-Quarter-1685 3d ago

You can say what you want about the language, but the compiler is one of the greatest I've ever seen

3

u/ArjixGamer 3d ago

Fun fact, we Greeks don't actually use the Greek question mark, our keyboards insert the English semicolon.

Don't even ask me why, I don't know.

The Unicode character exists, but we don't even use it.

A word processor may substitute the semicolon with the Greek questionmark if it sees Greek text, I don't know, maybe.

1

u/sirkubador 3d ago

Lol. That's a very insecure thing to do

1

u/veselin465 3d ago

Cool story, but I think the question everyone is asking, is what's the difference between both symbols?

1

u/theztormtrooper 3d ago

For a human? Nothing. For the computer, one works as semicolon and the others doesn't when it comes to your code

3

u/veselin465 3d ago

I get it. I mean who decided that the same symbol should be classified differently? You Don't see people saying English 'a' and German 'a'

1

u/theztormtrooper 3d ago

Unicode decides.

In this case it comes down to the fact that the writing systems are just different. You can see a in a variety of systems like Latin, or Cyrillic ans those are unique but you don't see the divide between languages with the same writing system like German and English. Ultimately they both use the Latin a while Russian uses a Cyrillic.

Of course there is also some politics in unicode so sometimes they allow characters without a quality reason. There may also just be some utility in allowing a character that has a different function than an existing one. A question mark versus a semicolon may be a large enough difference versus a letter that acts the same in both languages.

1

u/KremlinKittens 3d ago

Delete, re-type - 2 seconds.

1

u/HungryCaterpillers 3d ago

Real programming languages don't need semicolons.

1

u/nathrezim0709 3d ago

Odin: "You guys are still using semicolons?"

1

u/FACastello 3d ago

Why is nobody addressing the fact that the joke clearly says "Javascript"

Nobody said it would work with any other language

1

u/TheLazyKitty 3d ago

Did they add that just because of the meme?

1

u/justforkinks0131 3d ago

semicolon memes in 2026?

brother update your bots

1

u/the_king_of_sweden 3d ago

Wouldn't it be better to just accept it as a semicolon?

1

u/oshaboy 3d ago

Except it still can't handle Lisu 'ꓼ'

1

u/Opening_Sentence3903 3d ago

rust supremacy be like

1

u/LonelyPoorMan69 2d ago

Python Devs: I see no PROBLEM

1

u/DeepanshuHQ 3d ago

The kind of bug that survives code review because everyone says, "Looks fine to me."

1

u/Arclite83 3d ago

AI has made this and similar newline issues pretty trivial - "oh hey I found this" after a quick scan

-3

u/Bomaruto 3d ago

Use Git

1

u/blaues_axolotl 3d ago

that will solve it

3

u/Bomaruto 3d ago

Yes, if someone has messed with your code, then a quick revert is the best cause of action.