physfluids.fr
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
pastermil@sh.itjust.works to Programmer Humor@lemmy.ml · il y a 2 ans

they call it gen z c++

sh.itjust.works

message-square
59
fedilink
1.05K

they call it gen z c++

sh.itjust.works

pastermil@sh.itjust.works to Programmer Humor@lemmy.ml · il y a 2 ans
message-square
59
fedilink
alert-triangle
You must log in or register to comment.
  • InverseParallax@lemmy.world
    link
    fedilink
    arrow-up
    155
    arrow-down
    2
    ·
    il y a 2 ans

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

    • pastermil@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      68
      arrow-down
      2
      ·
      il y a 2 ans

      deadass vibin

      • scarilog@lemmy.world
        link
        fedilink
        arrow-up
        14
        ·
        il y a 2 ans

        syntax error

        • pastermil@sh.itjust.worksOP
          link
          fedilink
          arrow-up
          2
          ·
          il y a 2 ans

          💀💀💀

    • chillhelm@lemmy.world
      link
      fedilink
      arrow-up
      40
      arrow-down
      3
      ·
      il y a 2 ans

      I love “yeet cap rn”.

      • InverseParallax@lemmy.world
        link
        fedilink
        arrow-up
        16
        ·
        il y a 2 ans

        I was fine till I hit sussin.

  • WhyIDie@lemmy.ml
    link
    fedilink
    arrow-up
    136
    ·
    edit-2
    il y a 2 ans

    deleted by creator

  • Cool Beance@lemmy.world
    link
    fedilink
    arrow-up
    95
    ·
    il y a 2 ans

    Z++

  • BembelSommelier@feddit.de
    link
    fedilink
    arrow-up
    64
    ·
    il y a 2 ans

    • lelgenio@lemmy.ml
      link
      fedilink
      arrow-up
      41
      ·
      il y a 2 ans

      Reminder that yeet is a keyword in rust

      • Carlos Solís@communities.azkware.net
        link
        fedilink
        arrow-up
        4
        ·
        il y a 2 ans

        Is it synonymous with eject?

  • kinttach@lemm.ee
    link
    fedilink
    arrow-up
    62
    ·
    il y a 2 ans

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

  • 👁️👄👁️@lemm.ee
    link
    fedilink
    arrow-up
    55
    arrow-down
    3
    ·
    il y a 2 ans

    this had me deadass laughin fr fr no cap

    • KptnAutismus@lemmy.world
      link
      fedilink
      arrow-up
      24
      arrow-down
      3
      ·
      il y a 2 ans

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

      • pastermil@sh.itjust.worksOP
        link
        fedilink
        arrow-up
        10
        arrow-down
        1
        ·
        il y a 2 ans

        fr mf be bussin

  • moridinbg@lemmy.world
    link
    fedilink
    arrow-up
    45
    ·
    il y a 2 ans

    Gen Z++

    • runner_g@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      5
      ·
      il y a 2 ans

      yeetZ++

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

    Delete your GitHub account

    • QuazarOmega@lemmy.world
      link
      fedilink
      arrow-up
      25
      arrow-down
      1
      ·
      il y a 2 ans

      Yeah…

      store this gem on Codeberg instead!

      • MonkCanatella@sh.itjust.works
        link
        fedilink
        arrow-up
        7
        ·
        il y a 2 ans

        no cap fr

        • The Ramen Dutchman@ttrpg.network
          link
          fedilink
          arrow-up
          1
          ·
          il y a 2 ans

          !0;

  • Dasnap@lemmy.world
    link
    fedilink
    arrow-up
    40
    arrow-down
    1
    ·
    il y a 2 ans

  • Square Singer@feddit.de
    link
    fedilink
    arrow-up
    35
    arrow-down
    1
    ·
    il y a 2 ans

    That’s called a Domain-specific Language.

  • rockSlayer@lemmy.world
    link
    fedilink
    arrow-up
    31
    ·
    il y a 2 ans

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

    • scutiger@lemmy.world
      link
      fedilink
      arrow-up
      15
      ·
      il y a 2 ans

      yeet cap rn

      It’s right there!

    • Aa!@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      edit-2
      il y a 2 ans

      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
        13
        ·
        il y a 2 ans

        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
          ·
          il y a 2 ans

          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
      ·
      il y a 2 ans

      Returns a zero, I think.

  • red@feddit.de
    link
    fedilink
    arrow-up
    32
    arrow-down
    2
    ·
    il y a 2 ans

    ngl, SQL could use some rejuvenation

    • pastermil@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      24
      arrow-down
      3
      ·
      il y a 2 ans

      fr no cap

  • HeavenAndHell@lemmy.world
    link
    fedilink
    arrow-up
    30
    ·
    il y a 2 ans

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

  • Jo Miran@lemmy.ml
    link
    fedilink
    arrow-up
    26
    ·
    il y a 2 ans

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

    • swab148@lemm.ee
      link
      fedilink
      arrow-up
      5
      ·
      il y a 2 ans

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

  • VicFic!@iusearchlinux.fyi
    link
    fedilink
    arrow-up
    23
    ·
    il y a 2 ans

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

    • Dogeek@sh.itjust.works
      link
      fedilink
      arrow-up
      8
      ·
      il y a 2 ans

      #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.

  • 170 users / day
  • 837 users / week
  • 1.78K users / month
  • 10.4K users / 6 months
  • 1 local subscriber
  • 35.6K subscribers
  • 1.71K Posts
  • 37.1K Comments
  • Modlog
  • mods:
  • cat_programmer@lemmy.ml
  • AgreeableLandscape@lemmy.ml
  • BE: 0.19.4
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org