lemmy.onlylans.io
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
hydroptic@sopuli.xyz to Programmer Humor@programming.dev · 2 years ago

"☹️".reverse() == "🙂"

message-square
message-square
19
fedilink
302
message-square

"☹️".reverse() == "🙂"

hydroptic@sopuli.xyz to Programmer Humor@programming.dev · 2 years ago
message-square
19
fedilink
alert-triangle
You must log in or register to comment.
  • sus@programming.dev
    link
    fedilink
    arrow-up
    65
    ·
    edit-2
    2 years ago

    but sometimes “👍🏽”.reverse() == “🏽👍”

  • SzethFriendOfNimi@lemmy.world
    link
    fedilink
    arrow-up
    58
    ·
    2 years ago

    Imagine, if you will. A world where string reverse changes the character codes of the string.

    What beauty, what wonder would such a world have?

    Destruction and despair. Developers unsure why their programs don’t respond correctly. Ships run aground on islands already overcrowded with those who were shipwrecked before. Signal antennas pointed towards the sun with it’s constant noise. Spacecraft whose exhaust melt to slag populated cities as people briefly scream their final terrors of pain and suffering.

    This, is a world we should not want to live in. A world you can only find, in the Twilight Zone.

    • lad@programming.dev
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      Nah, this could’ve been possible with some clever fuckery in defining those emojis’ unicode content, like with flags that are not a single point but three independent ones, allowing you to do this:

      "🇧🇬".reverse() == "🇬🇧"
      "🇬🇪".reverse() == "🇪🇬"
      
      • n7gifmdn@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        THANKS. I didn’t get the flag joke at first @[email protected]

  • i_love_FFT@lemmy.ml
    link
    fedilink
    arrow-up
    41
    arrow-down
    1
    ·
    2 years ago

    “🙂”.reverse() == “🙃”

    • jol@discuss.tchncs.de
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      2 years ago

      Then we need reverseX and reverseY

      • Randelung@lemmy.world
        link
        fedilink
        arrow-up
        10
        arrow-down
        1
        ·
        2 years ago

        🙂.reverseX = 🙂

  • ABluManOnLemmy@feddit.nl
    link
    fedilink
    arrow-up
    15
    ·
    2 years ago

    “🇮🇪”.reverse() = “🇨🇮”

  • RVGamer06@sh.itjust.works
    link
    fedilink
    arrow-up
    12
    ·
    2 years ago

    Has someone made a library for that?

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      44
      ·
      edit-2
      22 days ago

      deleted by creator

      • petey@aussie.zone
        link
        fedilink
        arrow-up
        27
        ·
        2 years ago

        I’m tempted to publish an NPM package to do so as a joke, but I fear that it’d get used seriously

        • RonSijm@programming.dev
          link
          fedilink
          arrow-up
          7
          ·
          2 years ago

          Where does it end though? It’s a bit like infinite craft - but instead of combining resources you’d have to find an inverse for every emoji

          • Feathercrown@lemmy.world
            link
            fedilink
            English
            arrow-up
            6
            ·
            edit-2
            2 years ago
            async function reverse(str){
                return ChatGPT.ask(`Please reverse the string ${str}. Reply only with the answer, without other words or symbols.`);
            }
            
      • RVGamer06@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        2 years ago

        Lua could possibly do this

  • lad@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 years ago

    Yet we live in a world where

    "🇧🇬".reverse() == "🇬🇧" and "🇬🇪".reverse() == "🇪🇬"

  • MrLLM@ani.social
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 years ago
    File "<stdin>", line 1
        "👉".reverse() = "👈"
        ^
    SyntaxError: cannot assign to function call
    
    • Derpgon@programming.dev
      link
      fedilink
      arrow-up
      15
      ·
      2 years ago

      It is a font that changes == to one long equals sign.

      • MrLLM@ani.social
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        Oh my bad, that idea didn’t cross my mind.

        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        AttributeError: 'str' object has no attribute 'reverse'
        
  • Lifter@discuss.tchncs.de
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    “A”.reverse() === “A”

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      edit-2
      22 days ago

      deleted by creator

  • Brahvim@lemmy.kde.social
    link
    fedilink
    isiZulu
    arrow-up
    1
    ·
    2 years ago

    What’s with the lines of both equals symbols being combined together haha?

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      22 days ago

      deleted by creator

Programmer Humor@programming.dev

programmer_humor@programming.dev

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: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 2.36K users / day
  • 4.81K users / week
  • 7.9K users / month
  • 17.7K users / 6 months
  • 1 local subscriber
  • 31.2K subscribers
  • 2.3K Posts
  • 89.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org