toast.ooo
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
paequ2@lemmy.today to Programmer Humor@lemmy.mlEnglish · 13 天前

Use this information wisely

lemmy.ml

message-square
83
link
fedilink
596

Use this information wisely

lemmy.ml

paequ2@lemmy.today to Programmer Humor@lemmy.mlEnglish · 13 天前
message-square
83
link
fedilink
alert-triangle
You must log in or register to comment.
  • AmazingAwesomator@lemmy.world
    link
    fedilink
    arrow-up
    124
    ·
    13 天前

    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

    • Onno (VK6FLAB)@lemmy.radio
      link
      fedilink
      arrow-up
      34
      ·
      13 天前

      Hmm … we should start collecting these.

      Anyone know of an existing list?

      • floquant@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        95
        ·
        13 天前

        https://github.com/minimaxir/big-list-of-naughty-strings/

      • ∞🏳️‍⚧️Edie [it/its, she/her, fae/faer, love/loves, null/void, des/pair, none/use name]@lemmy.ml
        link
        fedilink
        arrow-up
        39
        ·
        13 天前

        https://invisible-characters.com/

        • AmbiguousProps@lemmy.today
          link
          fedilink
          English
          arrow-up
          10
          ·
          13 天前

          ᅠ

          • JohnnyCanuck@lemmy.ca
            link
            fedilink
            arrow-up
            3
            ·
            13 天前

            Oh ho! I 󠁤󠁯󠁮󠀧󠁴 see what you did there!

          • CanadaPlus@lemmy.sdf.org
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            11 天前

            It’s the first one, the ㅤU+3164 Hangul filler, to save everyone else a comment source+browser console+copy-paste+hex editor/search.

        • PartyAt15thAndSummit@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          12 天前

          I’m not an expert in Glagolitic, but I have a feeling that next-to-none of its letters are supposed to be invisible.

    • CallMeAnAI@lemmy.world
      link
      fedilink
      arrow-up
      24
      ·
      13 天前

      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
        link
        fedilink
        English
        arrow-up
        15
        ·
        13 天前

        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.

        • CallMeAnAI@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          13 天前

          Yup

      • Onno (VK6FLAB)@lemmy.radio
        link
        fedilink
        arrow-up
        8
        ·
        13 天前

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

        • CallMeAnAI@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          13 天前

          No. CMS updated to support new character set while solr did not. Not enough sanitization.

          • Onno (VK6FLAB)@lemmy.radio
            link
            fedilink
            arrow-up
            3
            ·
            13 天前

            I’ve had similar “fun” with the character defaults on MySQL, from memory for a time it was Swedish by default, rather than UTF.

    • anton@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      6
      ·
      12 天前

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

    • S_H_K@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      3
      ·
      12 天前

      Before I went to the comments I wished no one mentioned that. As a DBA I fucking hate you…

      • AmazingAwesomator@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        12 天前

        i am an SDET. this character destroys DBs… i am sorry :(

  • MyNameIsRichard@lemmy.ml
    link
    fedilink
    arrow-up
    82
    arrow-down
    2
    ·
    13 天前

    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
      link
      fedilink
      English
      arrow-up
      30
      ·
      13 天前

      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
        link
        fedilink
        English
        arrow-up
        15
        ·
        13 天前

        The plugin YouCompleteMe would show a warning on that line

        • tisktisk@piefed.social
          link
          fedilink
          English
          arrow-up
          5
          ·
          13 天前

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

      • chortle_tortle@mander.xyz
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        13 天前

        deleted by creator

    • AmbiguousProps@lemmy.today
      link
      fedilink
      English
      arrow-up
      13
      ·
      13 天前

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

      ^(I use an ide sometimes)^

    • saigot@lemmy.ca
      link
      fedilink
      arrow-up
      13
      ·
      edit-2
      13 天前

      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
        link
        fedilink
        English
        arrow-up
        15
        ·
        13 天前

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

        • saigot@lemmy.ca
          link
          fedilink
          arrow-up
          8
          ·
          13 天前

          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!

          • Cethin@lemmy.zip
            link
            fedilink
            English
            arrow-up
            4
            ·
            13 天前

            The extensions should work still. It even still integrates with the same extention marketplace. It’s the same software, just the open source part without the MS stuff —which honestly, I have and do use both and I don’t know what the difference is.

            It’s definitely worth checking out. If it doesn’t work for you then still nothing is lost except a small amount of time, but I’m willing to bet it does.

    • Soot [none/use name]@hexbear.net
      link
      fedilink
      English
      arrow-up
      8
      ·
      13 天前

      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…?”

    • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      2
      ·
      13 天前

      That’s the plain text editor Helix. In a terminal. Over ssh. On my phone. Which I can do because I’m not using a dumb IDE.

      • MyNameIsRichard@lemmy.ml
        link
        fedilink
        arrow-up
        7
        ·
        13 天前

        Developing on a phone sounds like one of the most unpleasant experiences I can imagine. And I include dinner with my ex.

        • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
          link
          fedilink
          English
          arrow-up
          4
          ·
          13 天前

          It absolutely would be. It is, on the other hand, occasionly useful to be able to pop in and change a config file, many of which are actually Turing complete languages. What I do far more often, though, is SSH into remote, headless servers and write code there, which is exactly the same as doing it from a phone, only much more comfortable.

        • hakunawazo@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          13 天前

          With screen mirroring and USB OTG mouse /keyboard it’s totally possible.

          • MyNameIsRichard@lemmy.ml
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            13 天前

            So not really on a phone, using a phone as a CPU. You may as well get yourself a computer and work in a proper IDE. You’ll be just as mobile and more productive!

            • Oriel Jutty :hhHHHAAAH:@infosec.exchange
              link
              fedilink
              arrow-up
              3
              ·
              13 天前

              CPU? It’s called a modem!!

              • AlsaValderaan@lemmy.blahaj.zone
                link
                fedilink
                arrow-up
                2
                ·
                12 天前

                Why yes my phone has both a CPU and a modem.

        • RizzRustbolt@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          12 天前

          Maybe they’ve got tiny thumbs.

  • segfault11 [she/her, any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    54
    ·
    13 天前

    fr*cking rust ruining the fun sicko-wistful

    • somerandomperson@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      20
      ·
      13 天前

      You can’t err out rust.

  • kingthrillgore@lemmy.ml
    link
    fedilink
    arrow-up
    33
    ·
    13 天前

    Okay fuck you op

  • paequ2@lemmy.todayOP
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    13 天前

    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
    link
    fedilink
    English
    arrow-up
    20
    ·
    13 天前
    ;
    ;
    
    • chortle_tortle@mander.xyz
      link
      fedilink
      arrow-up
      11
      ·
      13 天前

      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

      • scott@lemmy.org
        link
        fedilink
        English
        arrow-up
        4
        ·
        13 天前

        I wrote the semicolon after the weird one

        • Onno (VK6FLAB)@lemmy.radio
          link
          fedilink
          arrow-up
          5
          ·
          13 天前

          If you look at the UTF definition, it seems that there are at least four of them. The weird one in your comment might actually be one of the other two because as far as I can tell, the “Greek Question Mark” looks identical to the “semicolon”.

          • scott@lemmy.org
            link
            fedilink
            English
            arrow-up
            2
            ·
            13 天前

            I used python -c 'print(chr(0x37e))' | termux-clipboard-set

  • ☂️-@lemmy.ml
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    9 小时前

    deleted by creator

  • unyons@feddit.org
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    1
    ·
    13 天前

    This is indeed some next-level fuckery.

    • argh_another_username@lemmy.ca
      link
      fedilink
      arrow-up
      2
      ·
      13 天前

      deleted by creator

  • sovietknuckles [she/her]@hexbear.net
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    13 天前

    I don’t see a problem

    #include <iostream>
    
    #define ; ;;
    
    int main(){
      std::cout << ";\n";
    }
    
    • HiddenLayer555@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      13 天前

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

  • kamen@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    13 天前

    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
    link
    fedilink
    arrow-up
    10
    ·
    13 天前

    There is no wise way to use that information.

    But the foolish ones could be entertaining.

  • AddLemmus@lemmy.ml
    link
    fedilink
    English
    arrow-up
    10
    ·
    12 天前

    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
      link
      fedilink
      arrow-up
      4
      ·
      12 天前

      Skype still exists?

      • AddLemmus@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        12 天前

        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.

      • Bassman1805@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        12 天前

        Officially, no.

  • Onno (VK6FLAB)@lemmy.radio
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    13 天前

    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:

    • https://en.wikipedia.org/wiki/Question_mark

    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:

    • https://www.compart.com/en/unicode/U+037E

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

    • https://web.archive.org/web/20150118083005/http://www.tlg.uci.edu/~opoudjis/unicode/punctuation.html
    • tisktisk@piefed.social
      link
      fedilink
      English
      arrow-up
      6
      ·
      13 天前

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

      • Onno (VK6FLAB)@lemmy.radio
        link
        fedilink
        arrow-up
        11
        ·
        edit-2
        13 天前

        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
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          13 天前

          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.

          • Nasan@sopuli.xyz
            link
            fedilink
            arrow-up
            2
            ·
            13 天前

            One of my favorites was using Japanese full stop (U+3002) in place of periods in a bare IP or anywhere you would use a period in a FQDN (fully qualified domain name). Only tested in Chrome at the time, but the browser would “correct” it for you and take you to the intended page.

  • scott@lemmy.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    13 天前

    What exactly do you think you can do with this?

    • socsa@piefed.social
      link
      fedilink
      English
      arrow-up
      18
      ·
      13 天前

      Chaotic evil linting rules

    • argh_another_username@lemmy.ca
      link
      fedilink
      arrow-up
      11
      ·
      13 天前

      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
        link
        fedilink
        arrow-up
        11
        ·
        13 天前

        Not all! Just one or two per file.

        • Onno (VK6FLAB)@lemmy.radio
          link
          fedilink
          arrow-up
          4
          ·
          13 天前

          Just the last one, right before the EOF.

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

      • Onno (VK6FLAB)@lemmy.radio
        link
        fedilink
        arrow-up
        2
        ·
        13 天前

        Hmm … bash.

      • scott@lemmy.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        13 天前

        You’re just going to get syntax errors though

        • Petter1@discuss.tchncs.de
          link
          fedilink
          arrow-up
          6
          ·
          13 天前

          Not if you choose to replace the correct ones at the correct place and it is a compiler which automatically ignores this wrong semicolon.

          You could connect two lines, which may still “work” if not split using a semicolon and are then interpreted as one single line.

        • Onno (VK6FLAB)@lemmy.radio
          link
          fedilink
          arrow-up
          4
          ·
          13 天前

          You are right … but, you’re not thinking big enough.

          Think … sticky tape on the bottom of a mouse.

          • scott@lemmy.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            13 天前

            What the fuck is that supposed to do?

    • tisktisk@piefed.social
      link
      fedilink
      English
      arrow-up
      5
      ·
      13 天前

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

      • HiddenLayer555@lemmy.ml
        link
        fedilink
        English
        arrow-up
        10
        ·
        13 天前

        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.

        • tisktisk@piefed.social
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 天前

          would you say openRC or rc-service returns better or more helpful error messages with these kinds of things?

        • communism@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          13 天前

          I think most daemons would log a helpful enough error message regarding incorrect syntax e.g. if it’s a config file of variable=value; format then it wouldn’t expect two equals signs on the same line.

          • tisktisk@piefed.social
            link
            fedilink
            English
            arrow-up
            2
            ·
            13 天前

            I too wish to see these not-so-helpful error messages (not denying just new)

  • Onno (VK6FLAB)@lemmy.radio
    link
    fedilink
    arrow-up
    4
    ·
    13 天前

    Remember … with great power comes … something.

    • arsCynic@beehaw.org
      link
      fedilink
      arrow-up
      2
      ·
      13 天前

      Remember … with great power comes … something.

      Hemorrhoids.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 753 users / day
  • 1.74K users / week
  • 3.9K users / month
  • 8.88K users / 6 months
  • 20 local subscribers
  • 37.7K subscribers
  • 1.84K Posts
  • 40.1K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org