604
submitted 10 months ago by paequ2@lemmy.today to c/programmerhumor@lemmy.ml
top 50 comments
sorted by: hot top controversial new old
[-] AmazingAwesomator@lemmy.world 124 points 10 months ago

another good one to sneak in there... thai zero-width space: U+200B

cant see it, nothing reads it, and it makes everything error. : D

[-] CallMeAnAI@lemmy.world 24 points 10 months ago

Came here to say fuck the zero width space. I spent 90 hours in the depths of solr looking for this fucker who brought down our entire search index.

[-] derfunkatron@lemmy.world 15 points 10 months ago

I deal with shy hyphens a lot. They don’t display unless there’s a line break, so they get copied from various word docs or websites and end up in a database somewhere waiting to piss me off.

load more comments (1 replies)
[-] vk6flab@lemmy.radio 8 points 10 months ago

I'm guessing that they pasted code from inside Microsoft Word.

load more comments (2 replies)
[-] anton@piefed.blahaj.zone 6 points 10 months ago

‏The right to left mark (U+2000F) can also be fun.

load more comments (2 replies)
[-] MyNameIsRichard@lemmy.ml 80 points 10 months ago

Pretty much any ide will spot that. Maybe you can use it to teach your colleagues not to use a plain text editor.

[-] tisktisk@piefed.social 31 points 10 months ago

I'm gonna need the vi guy to teach me how to get this functionality in nvim pls--don't make me leave

[-] ozymandias117@lemmy.world 15 points 10 months ago

The plugin YouCompleteMe would show a warning on that line

[-] tisktisk@piefed.social 4 points 10 months ago

Thank you masterchief Veidt! (I had to do it, best name ever)

load more comments (1 replies)
[-] AmbiguousProps@lemmy.today 14 points 10 months ago

You can pry my vim and nano from my cold, dead hands!

^(I use an ide sometimes)^

[-] saigot@lemmy.ca 13 points 10 months ago* (last edited 10 months ago)

In VSCode (yeah yeah MS bad, I have to use it for work) it puts a yellow box around the charcater, which I don't immediately recognize the meaning of and highlights the line as "identifier "blah;" is undefined". It's not like your gunna spend all day on it, but that could waste a couple minutes if the dev wasn't paying close attention, which is "fun prank" territory.

[-] Cethin@lemmy.zip 15 points 10 months ago

Can you choose to use VSCodium instead? It's practically identical, but isn't controlled by MS.

[-] saigot@lemmy.ca 8 points 10 months ago

The reason it's de facto mandatory is due to some in house extensions, assuming they work with this I could, but I also don't particularly care about my privacy on a work machine. But I will be checking this out for my personal stuff!

load more comments (1 replies)
[-] Soot@hexbear.net 9 points 10 months ago

I mean sure, but it'll still likely leave 'em scratching their heads for a while before they go "I guess I just.. replace the semicolon..?"

load more comments (8 replies)
[-] segfault11@hexbear.net 54 points 10 months ago

fr*cking rust ruining the fun sicko-wistful

[-] somerandomperson@lemmy.dbzer0.com 21 points 10 months ago

You can't err out rust.

[-] KingThrillgore@lemmy.ml 34 points 10 months ago

Okay fuck you op

[-] paequ2@lemmy.today 23 points 10 months ago* (last edited 10 months ago)

IDE users pretending compilers don't exist.

$ guix shell gcc

[env]$ g++ test.cpp 
test.cpp:4:16: warning: `0;' is not in NFC [-Wnormalized=]
    4 |         return 0<U+037E>
      |                ^~~~~~~~~
test.cpp: In function ‘int main()’:
test.cpp:4:16: error: unable to find numeric literal operator ‘operator"";’
test.cpp:4:18: error: expected ‘;’ before ‘}’ token
    4 |         return 0;
      |                  ^
      |                  ;
    5 | }
      | ~

Look ma, no IDE! 😸

[-] scott@lemmy.org 20 points 10 months ago
[-] chortle_tortle@mander.xyz 11 points 10 months ago

Tried to figure out which was which by googling, but it seems they are both read as semi colon, however you can see the difference in the characters. Wild

load more comments (3 replies)
[-] unyons@feddit.org 16 points 10 months ago

This is indeed some next-level fuckery.

load more comments (1 replies)
[-] sovietknuckles@hexbear.net 13 points 10 months ago* (last edited 10 months ago)

I don't see a problem

#include <iostream>

#define ; ;;

int main(){
  std::cout << ";\n";
}
[-] HiddenLayer555@lemmy.ml 8 points 10 months ago

Whoa the font on the Lemmy web UI actually renders them differently!

[-] AddLemmus@lemmy.ml 12 points 10 months ago

With the "wonderful" tooling at work, we use Skype for Business. Naturally, that is not the primary place to send around code and configs, but a 1-liner or 2-liner happens.

You can't believe the nonsense it does when you try to copy & paste it. Spaces get turned into non-breaking spaces etc. Looks completely normal when pasted directly into vim on a console, but will give "odd" error messages.

[-] BananaIsABerry@lemmy.zip 4 points 10 months ago
[-] AddLemmus@lemmy.ml 5 points 10 months ago

At this point, even Microsoft wants them to stop using it, but they are stubborn and try to keep it running until they turn off the lights the hard way.

load more comments (1 replies)
[-] kamen@lemmy.world 11 points 10 months ago

Any half-decent editor/IDE/command line tool will scream at you about this; plus there's version control which should help you spot it as well.

[-] waigl@lemmy.world 10 points 10 months ago

There is no wise way to use that information.

But the foolish ones could be entertaining.

[-] vk6flab@lemmy.radio 7 points 10 months ago* (last edited 10 months ago)

Wow!

This seems to be further evidence that the process for assigning UTF entities has been thoroughly corrupted.

You can (apparently) copy/paste this on mobile:

";" (Greek question mark)

";" (Semicolon)

You can even render it in HTML:

    &#894;
    &#x37E;

And it's included on Wikipedia, because of course it is:

Because I'm not sure what my mobile client will actually do with this comment, here's the link to the HTML entity I used:

Also there's plenty of other character joy to be had:

[-] tisktisk@piefed.social 6 points 10 months ago

If I don't understand what's happening here but want to, should I research Unicode in general or something else?

[-] vk6flab@lemmy.radio 12 points 10 months ago* (last edited 10 months ago)

Unicode is a way to encode the things that humans use to write stuff into a computer.

ASCII is for example another way, as is EBCDIC.

All these methods translate squiggles that we've used for centuries into something that can be represented inside a computer.

For example, the letter "A" is under ASCII represented by the number 65.

This post is pointing out that there are two characters that look identical, but have different numbers, which means that what the user sees is identical, but what the computer sees is different.

This is the basis for much tomfoolery.

[-] Petter1@discuss.tchncs.de 4 points 10 months ago* (last edited 10 months ago)

This fact is actively used for phishing, as you can craft domains looking nearly identical to the original one, but leading to your IP address hosting the phishing mask.

load more comments (1 replies)
[-] scott@lemmy.org 5 points 10 months ago

What exactly do you think you can do with this?

[-] socsa@piefed.social 18 points 10 months ago

Chaotic evil linting rules

[-] argh_another_username@lemmy.ca 11 points 10 months ago

Take someone’s source code, replace all semi colons with Greek question marks and see if they can compile. But as others said, any IDE will help.

[-] HairyHarry@lemmy.world 11 points 10 months ago

Not all! Just one or two per file.

[-] vk6flab@lemmy.radio 4 points 10 months ago

Just the last one, right before the EOF.

Speaking of EOF, I wonder what a heredoc might do with this 😇

load more comments (5 replies)
[-] tisktisk@piefed.social 5 points 10 months ago

mess with whoever has the least modern ide? I'm sure there's something else too hold on

[-] HiddenLayer555@lemmy.ml 10 points 10 months ago

Would probably be more effective to mess with Linux config files that use semicolons. Especially if it's run as a daemon because Systemctl doesn't always return helpful error messages for configuration errors.

load more comments (3 replies)
load more comments
view more: next ›
this post was submitted on 31 Jul 2025
604 points (98.6% liked)

Programmer Humor

42317 readers
181 users here now

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

Rules:

founded 6 years ago
MODERATORS