VA-11 Hall-A Bar
  • 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
53
1.09K

they call it gen z c++

sh.itjust.works

@pastermil@sh.itjust.works to Programmer Humor@lemmy.ml • 2 years ago
message-square
53
alert-triangle
You must log in or register to comment.
  • @InverseParallax@lemmy.world
    link
    fedilink
    157•2 years ago

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

    • @pastermil@sh.itjust.worksOP
      link
      fedilink
      69•2 years ago

      deadass vibin

      • @scarilog@lemmy.world
        link
        fedilink
        14•2 years ago

        syntax error

        • @pastermil@sh.itjust.worksOP
          link
          fedilink
          2•2 years ago

          💀💀💀

    • @chillhelm@lemmy.world
      link
      fedilink
      40•2 years ago

      I love “yeet cap rn”.

      • @InverseParallax@lemmy.world
        link
        fedilink
        16•2 years ago

        I was fine till I hit sussin.

  • @WhyIDie@lemmy.ml
    link
    fedilink
    136•
    edit-2
    2 years ago

    deleted by creator

  • Cool Beance
    link
    fedilink
    95•2 years ago

    Z++

  • @kinttach@lemm.ee
    link
    fedilink
    64•2 years ago

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

  • @BembelSommelier@feddit.de
    link
    fedilink
    62•2 years ago

    • @lelgenio@lemmy.ml
      link
      fedilink
      42•2 years ago

      Reminder that yeet is a keyword in rust

      • Carlos Solís
        link
        fedilink
        4•2 years ago

        Is it synonymous with eject?

  • 👁️👄👁️
    link
    fedilink
    56•2 years ago

    this had me deadass laughin fr fr no cap

    • KptnAutismus
      link
      fedilink
      25•2 years ago

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

      • @pastermil@sh.itjust.worksOP
        link
        fedilink
        10•2 years ago

        fr mf be bussin

  • @TheKarion@lemmy.world
    link
    fedilink
    44•
    edit-2
    2 years ago

    deleted by creator

    • @QuazarOmega@lemmy.world
      link
      fedilink
      25•2 years ago

      Yeah…

      store this gem on Codeberg instead!

      • @MonkCanatella@sh.itjust.works
        link
        fedilink
        7•2 years ago

        no cap fr

        • The Ramen Dutchman
          link
          fedilink
          2•2 years ago

          !0;

  • @moridinbg@lemmy.world
    link
    fedilink
    44•2 years ago

    Gen Z++

    • @runner_g@lemmy.blahaj.zone
      link
      fedilink
      5•2 years ago

      yeetZ++

    • @StarkillerX42@lemmy.ml
      link
      fedilink
      1•
      edit-2
      2 years ago
      genz be bouta millenial rn
      
  • @Dasnap@lemmy.world
    link
    fedilink
    40•2 years ago

  • Square Singer
    link
    fedilink
    35•2 years ago

    That’s called a Domain-specific Language.

  • @red@feddit.de
    link
    fedilink
    32•2 years ago

    ngl, SQL could use some rejuvenation

    • @pastermil@sh.itjust.worksOP
      link
      fedilink
      24•2 years ago

      fr no cap

  • @rockSlayer@lemmy.world
    link
    fedilink
    31•2 years ago

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

    • @scutiger@lemmy.world
      link
      fedilink
      15•2 years ago

      yeet cap rn

      It’s right there!

    • Aa!
      link
      fedilink
      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
        link
        fedilink
        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!
          link
          fedilink
          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
      link
      fedilink
      6•2 years ago

      Returns a zero, I think.

  • @HeavenAndHell@lemmy.world
    link
    fedilink
    29•2 years ago

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

  • Jo Miran
    link
    fedilink
    26•2 years ago

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

    • swab148
      link
      fedilink
      5•2 years ago

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

  • VicFic!
    link
    fedilink
    23•2 years ago

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

    • Dogeek
      link
      fedilink
      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.
  • 483 users / day
  • 1.3K users / week
  • 3.22K users / month
  • 8.32K users / 6 months
  • 37K subscribers
  • 1.76K Posts
  • 34.9K Comments
  • Modlog
  • mods:
  • @cat_programmer@lemmy.ml
  • @AgreeableLandscape@lemmy.ml
  • BE: 0.19.1
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org