Unryzer.eu
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Buage_@piefed.social to Programmer Humor@programming.devEnglish · 19 hours ago

Expressions

message-square
15
link
fedilink
367

Expressions

Buage_@piefed.social to Programmer Humor@programming.devEnglish · 19 hours ago
message-square
15
link
fedilink

cross-posted from: https://lemmy.world/post/52447554

alert-triangle
You must log in or register to comment.
  • rockSlayer@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    24
    ·
    16 hours ago

  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    28
    ·
    18 hours ago

    NHVJZ5nGtsRSDaD.jpg

  • Aatube@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    15
    ·
    17 hours ago

    none of the meat of the regex shown, 0/10

    • PumaStoleMyBluff@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      14 hours ago

      Probably because showing your email regex publicly is a great way to get 1000 messages about obscure edge cases you’re not handling 😛

    • whats_a_lemmy@midwest.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      16 hours ago

      One star. Too readable, would not write again

  • aMockTie@piefed.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    18 hours ago

    Why waste time doing any matching if wantarray == false? Just do:

    if(!wantarray) { return 1; }

    Before any matching happens, or if you only want one return statement set the value of a variable in if(!wantarray)/elsif(regex) and return that variable at the end.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      17 hours ago

      That Perl. You never know if return doesn’t have some kind of hidden behavior that uses the local variables…

      Well, you could read the perldoc page on it. But you can’t just assume it.

  • naeap@sopuli.xyz
    link
    fedilink
    arrow-up
    4
    ·
    16 hours ago

    At least the cat is happy again now after getting adopted

    I’ll forever be sad trying to understand the regex I’ve written myself…

  • MaggiWuerze@feddit.org
    link
    fedilink
    arrow-up
    4
    ·
    16 hours ago

    That’s just sad expression with extra steps

  • death_to_carrots@feddit.org
    link
    fedilink
    arrow-up
    5
    ·
    17 hours ago

    If regular expressions are your solution, than your problem is wrong.

    • themaninblack@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Should be at the top.

    • 🌞 Alexander Daychilde 🌞@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      12 hours ago

      Some people, when confronted with a problem, think, “I know, I’ll use regular expressions.”

      Now they have two problems.

      • jjj@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        4
        ·
        10 hours ago

        Counterargument: ctrl+f is a great place for regex. Write once read never problems are a great application for unreadable languages. Imagine if people wrote scripts in the language vi uses for editnig<escape>bceediting, which mostly isn’t even displayed as it’s typed! <escape>

        But yeah, it’s kind of terrible for anything else.

  • sit@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    16 hours ago

    Doggy is not smiling but trying to lose heat. Doggy is the real regular expression

    • spicy pancake@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      similarly, cats don’t usually express emotions with their face (and often don’t express them at all)

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: !programmer_humor@programming.dev

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.43K users / day
  • 3.35K users / week
  • 7K users / month
  • 16K users / 6 months
  • 1 local subscriber
  • 33.4K subscribers
  • 2.29K Posts
  • 76.3K 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