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 年前

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

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

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

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

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

  • SzethFriendOfNimi@lemmy.world
    link
    fedilink
    arrow-up
    58
    ·
    2 年前

    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 年前

      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() == "🇪🇬"
      
      • Cricket4Canada@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 年前

        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 年前

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

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

      Then we need reverseX and reverseY

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

        🙂.reverseX = 🙂

  • ABluManOnLemmy@feddit.nl
    link
    fedilink
    arrow-up
    15
    ·
    2 年前

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

  • RVGamer06@sh.itjust.works
    link
    fedilink
    arrow-up
    12
    ·
    2 年前

    Has someone made a library for that?

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      44
      ·
      edit-2
      7 个月前

      deleted by creator

      • petey@aussie.zone
        link
        fedilink
        arrow-up
        27
        ·
        2 年前

        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 年前

          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
            ·
            2 年前
            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 年前

        Lua could possibly do this

  • lad@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 年前

    Yet we live in a world where

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

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

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

      • MrLLM@ani.social
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 年前

        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 年前

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

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      edit-2
      7 个月前

      deleted by creator

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

    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
      7 个月前

      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
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

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

  • 1.38K users / day
  • 4.9K users / week
  • 9.15K users / month
  • 16.3K users / 6 months
  • 1 local subscriber
  • 34.2K subscribers
  • 2.69K Posts
  • 107K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.20
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org