Cult I Mean Group
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
pastermil@sh.itjust.works to Programmer Humor@lemmy.ml · 2 years ago

they call it gen z c++

sh.itjust.works

message-square
42
fedilink
704

they call it gen z c++

sh.itjust.works

pastermil@sh.itjust.works to Programmer Humor@lemmy.ml · 2 years ago
message-square
42
fedilink
alert-triangle
You must log in or register to comment.
  • InverseParallax@lemmy.world
    link
    fedilink
    arrow-up
    102
    arrow-down
    2
    ·
    2 years ago

    That was so much more fun than it had any right to be.

    • pastermil@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      49
      arrow-down
      2
      ·
      2 years ago

      deadass vibin

      • scarilog@lemmy.world
        link
        fedilink
        arrow-up
        11
        ·
        2 years ago

        syntax error

        • pastermil@sh.itjust.worksOP
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          💀💀💀

    • chillhelm@lemmy.world
      link
      fedilink
      arrow-up
      23
      arrow-down
      3
      ·
      2 years ago

      I love “yeet cap rn”.

      • InverseParallax@lemmy.world
        link
        fedilink
        arrow-up
        12
        ·
        2 years ago

        I was fine till I hit sussin.

  • WhyIDie@lemmy.ml
    link
    fedilink
    arrow-up
    86
    ·
    edit-2
    2 years ago

    “Let’s take a look at the legacy code I’m going to maintain”

    The code:

  • Cool Beance@lemmy.world
    link
    fedilink
    arrow-up
    59
    ·
    2 years ago

    Z++

  • BembelSommelier@feddit.de
    link
    fedilink
    arrow-up
    38
    ·
    2 years ago

    • lelgenio@lemmy.ml
      link
      fedilink
      arrow-up
      30
      ·
      2 years ago

      Reminder that yeet is a keyword in rust

  • TheKarion@lemmy.world
    link
    fedilink
    arrow-up
    32
    arrow-down
    1
    ·
    edit-2
    2 years ago

    deleted by creator

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

      Yeah…

      store this gem on Codeberg instead!

      • MonkCanatella@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        2 years ago

        no cap fr

        • Fonzie!@ttrpg.network
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          !0;

  • moridinbg@lemmy.world
    link
    fedilink
    arrow-up
    27
    ·
    2 years ago

    Gen Z++

    • StarkillerX42@lemmy.ml
      link
      fedilink
      arrow-up
      1
      arrow-down
      5
      ·
      edit-2
      2 years ago
      genz be bouta millenial rn
      
  • Square Singer@feddit.de
    link
    fedilink
    arrow-up
    24
    arrow-down
    1
    ·
    2 years ago

    That’s called a Domain-specific Language.

  • HeavenAndHell@lemmy.world
    link
    fedilink
    arrow-up
    21
    ·
    2 years ago

    Finally, an actual programming language. So long, Fortran.

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

  • Jo Miran@lemmy.ml
    link
    fedilink
    arrow-up
    18
    ·
    2 years ago

    Gen-X here. Is it weird that I found the Z++ version easier to read?

  • red@feddit.de
    link
    fedilink
    arrow-up
    20
    arrow-down
    2
    ·
    2 years ago

    ngl, SQL could use some rejuvenation

    • pastermil@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      18
      arrow-down
      3
      ·
      2 years ago

      fr no cap

  • rockSlayer@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    2 years ago

    I was following along until the bussin loop. What is it trying to yeet?

    • Aa!@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      2 years ago

      I believe it outputs the prime factors of the number you gave it.

      The yeet value is just specifying if the function succeeded or not

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

        I found this amusing enough to try it out. It does actually compile (I used g++ for this). However, the current implementation just goes into an infinite loop if you enter a number >= 2.

        I think the original author meant to do n -= 1 rn in the tweakin loop that is inside the bussin loop. That way, at some point n % i finna cap will be false, and i will bouta. Which then makes the expression i <= n in the bussin loop eventually false, so we stop bussin and yeet cap rn.

        However, that would mean that the intention of the program isn’t to output prime factors, because even with this fix it does not do so. The structure of mf chief() also doesn’t suggest that is the purpose as it is missing another tweakin and sussin like this example of calculating prime factors in C++.

        Example run:

        $ ./zpp.exe
        Enter a number larger than 1: 50
        2
        7
        8
        47
        
        • Aa!@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          2 years ago

          Yeah it definitely looks like a flawed implementation either way. Probably a student got bored of trying to make it work, and went nuts with the #defines for fun

          As a career programmer myself… I can absolutely relate.

    • scutiger@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      yeet cap rn

      It’s right there!

    • LoafyLemon@kbin.social
      link
      fedilink
      arrow-up
      6
      ·
      2 years ago

      Returns a zero, I think.

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

    This feels like those boomer comics about how dumb millennials are

  • Bonehead@kbin.social
    link
    fedilink
    arrow-up
    10
    ·
    2 years ago

    So…you took C++, and turned it into COBOL. I’m not sure if I’m impressed or horrified.

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

    You could do this so much better than this

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.

  • 98 users / day
  • 751 users / week
  • 2.93K users / month
  • 9.62K users / 6 months
  • 1 local subscriber
  • 36.9K subscribers
  • 1.77K Posts
  • 34.8K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org