Upvote!
  • 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
60
fedilink
1.06K

they call it gen z c++

sh.itjust.works

pastermil@sh.itjust.works to Programmer Humor@lemmy.ml · 2 years ago
message-square
60
fedilink
alert-triangle
You must log in or # to comment.
  • InverseParallax@lemmy.world
    link
    fedilink
    arrow-up
    158
    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
      69
      arrow-down
      2
      ·
      2 years ago

      deadass vibin

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

        syntax error

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

          💀💀💀

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

      I love “yeet cap rn”.

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

        I was fine till I hit sussin.

  • WhyIDie@lemmy.ml
    link
    fedilink
    arrow-up
    136
    ·
    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
    95
    ·
    2 years ago

    Z++

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

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

      Reminder that yeet is a keyword in rust

      • Carlos Solís@communities.azkware.net
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        Is it synonymous with eject?

  • kinttach@lemm.ee
    link
    fedilink
    arrow-up
    64
    ·
    2 years ago

    How regular C++ feels if English isn’t your first language

  • 👁️👄👁️@lemm.ee
    link
    fedilink
    arrow-up
    56
    arrow-down
    3
    ·
    2 years ago

    this had me deadass laughin fr fr no cap

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

      you can use emojis in your username? that’s lit fam

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

        fr mf be bussin

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

    Gen Z++

    • runner_g@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      yeetZ++

    • StarkillerX42@lemmy.ml
      link
      fedilink
      arrow-up
      1
      arrow-down
      5
      ·
      edit-2
      2 years ago
      genz be bouta millenial rn
      
  • TheKarion@lemmy.world
    link
    fedilink
    arrow-up
    44
    arrow-down
    1
    ·
    2 years ago

    Delete your GitHub account

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

      Yeah…

      store this gem on Codeberg instead!

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

        no cap fr

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

          !0;

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

  • Square Singer@feddit.de
    link
    fedilink
    arrow-up
    35
    arrow-down
    1
    ·
    2 years ago

    That’s called a Domain-specific Language.

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

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

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

      yeet cap rn

      It’s right there!

    • Aa!@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      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
        14
        ·
        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
          7
          ·
          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.

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

      Returns a zero, I think.

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

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

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

    ngl, SQL could use some rejuvenation

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

      fr no cap

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

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

    • swab148@lemm.ee
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      Millennial here, this is unironically way better, I wanna code in slang from now on.

  • VicFic!@iusearchlinux.fyi
    link
    fedilink
    arrow-up
    23
    ·
    2 years ago

    fr, I didn’t know dat macros could be used to make nu programming languages.

    • Dogeek@sh.itjust.works
      link
      fedilink
      arrow-up
      9
      ·
      2 years ago

      #define is nothing but a search and replace from the preprocessor.

      I’ve been burned one too many times with #include which replaces the directive with the contents of the included headers file (I think that if you’re truly evil you can even include straight .c files and forgo headers entirely)

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.

  • 240 users / day
  • 569 users / week
  • 1.82K users / month
  • 10.5K users / 6 months
  • 1 local subscriber
  • 35.6K subscribers
  • 1.71K Posts
  • 37.5K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org