Blåhaj Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
hydroptic@sopuli.xyz to Programmer Humor@lemmy.ml · 11 months ago

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

sopuli.xyz

external-link
message-square
19
link
fedilink
  • cross-posted to:
  • programmer_humor@programming.dev
222
external-link

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

sopuli.xyz

hydroptic@sopuli.xyz to Programmer Humor@lemmy.ml · 11 months ago
message-square
19
link
fedilink
  • cross-posted to:
  • programmer_humor@programming.dev
alert-triangle
You must log in or register to comment.
  • lelgenio@lemmy.ml
    link
    fedilink
    arrow-up
    51
    ·
    11 months ago
    [🌽].pop() == 🍿
    
    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      29
      ·
      edit-2
      11 months ago
      "🚴".push() = "🚲🤸"
      
  • BaumGeist@lemmy.ml
    link
    fedilink
    arrow-up
    40
    ·
    edit-2
    2 months ago

    deleted by creator

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      15
      ·
      11 months ago

      You’re no fun

      • BaumGeist@lemmy.ml
        link
        fedilink
        arrow-up
        12
        ·
        edit-2
        2 months ago

        deleted by creator

    • Boomkop3@reddthat.comBanned
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      11 months ago

      wasn’t it
      🙁
      .
      r
      e
      v
      e
      r
      s
      e
      ()

      • Rain World: Slugcat Game@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 months ago

        "
        🙂
        "
        .
        r
        e
        v
        e
        r
        s
        e
        (
        )
        =
        "
        🙃
        "

      • Rain World: Slugcat Game@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 months ago

        deleted by creator

  • AllNewTypeFace@leminal.space
    link
    fedilink
    arrow-up
    29
    ·
    11 months ago

    Then “b” backwards would have to be “d”

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      30
      ·
      11 months ago

      "E".reverse() == "∃"

  • socsa@piefed.social
    link
    fedilink
    English
    arrow-up
    26
    ·
    11 months ago

    Be the operator overload you wish to see in the world

  • deathmetal27@lemmy.world
    link
    fedilink
    arrow-up
    25
    ·
    11 months ago

    “:-)”.reverse() == “)-:”

    Close enough

  • CanadaPlus@lemmy.sdf.org
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    11 months ago

    Also, it should turn an error into an empty but successful call. /s

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      13
      ·
      11 months ago

      Calling reverse() on a function should return its inverse

      • tetris11@lemmy.ml
        link
        fedilink
        arrow-up
        9
        ·
        11 months ago
        isprime.reverse(True)
        // outputs 19 billion prime numbers. Checkmate, atheists.
        
        • CanadaPlus@lemmy.sdf.org
          link
          fedilink
          arrow-up
          2
          ·
          11 months ago

          It’s a just a joke, but I feel like that actually says something pretty profound about duck typing, and how computable it actually is.

  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    14
    ·
    11 months ago
    "🐈".concat() = "😼"
    
  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    10 months ago

    deleted by creator

  • RiceMunk@sopuli.xyz
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    11 months ago

    but

    "🙂".reverse() == "🙃"

  • 418teapot@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    10 months ago

    Best I can do is

    "\ude41🙂".split("").reverse().join("")
    

    returns "\ude42🙁"

  • MultipleAnimals@sopuli.xyz
    link
    fedilink
    arrow-up
    9
    ·
    11 months ago

    JavaScript taking notes

  • Boomkop3@reddthat.comBanned
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    You could implement that on a chat, but I wouldn’t do that on a string

    • hydroptic@sopuli.xyzOP
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      Where’s your sense of adventure?!

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.

  • 73 users / day
  • 810 users / week
  • 2.45K users / month
  • 8.97K users / 6 months
  • 626 local subscribers
  • 37.1K subscribers
  • 1.77K Posts
  • 35.2K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org