they call it gen z c++

923 points · 48 comments · view on lemmy.world

48 Comments

InverseParallax@lemmy.world · 146 pts · 3y (5 replies)

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

pastermil@sh.itjust.works · 59 pts · 3y (2 replies)

deadass vibin

scarilog@lemmy.world · 9 pts · 3y (1 reply)

syntax error

pastermil@sh.itjust.works · 2 pts · 3y

πŸ’€πŸ’€πŸ’€

chillhelm@lemmy.world · 34 pts · 3y (1 reply)

I love "yeet cap rn".

InverseParallax@lemmy.world · 14 pts · 3y

I was fine till I hit sussin.

WhyIDie@lemmy.ml · 124 pts · 3y
[ removed ]
CoolBeance@lemmy.world · 95 pts · 3y

Z++

kinttach@lemm.ee · 61 pts · 3y

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

TheKarion@lemmy.world · 59 pts · 3y (3 replies)
[ removed ]
QuazarOmega@lemmy.world · 24 pts · 3y (2 replies)

Yeah...

store this gem on Codeberg instead!

MonkCanatella@sh.itjust.works · 5 pts · 3y (1 reply)

no cap fr

lord_ryvan@ttrpg.network · 1 pts · 3y

!0;

BembelSommelier@feddit.de · 53 pts · 3y (2 replies)

lelgenio@lemmy.ml · 37 pts · 3y (1 reply)

Reminder that yeet is a keyword in rust

csolisr@communities.azkware.net · 3 pts · 3y

Is it synonymous with eject?

mojo@lemm.ee · 51 pts · 3y (2 replies)

this had me deadass laughin fr fr no cap

KpntAutismus@lemmy.world · 20 pts · 3y (1 reply)

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

pastermil@sh.itjust.works · 8 pts · 3y

fr mf be bussin

Dasnap@lemmy.world · 35 pts · 3y

squaresinger@feddit.de · 32 pts · 3y

That's called a Domain-specific Language.

moridinbg@lemmy.world · 31 pts · 3y (2 replies)

Gen Z++

runner_g@lemmy.blahaj.zone · 2 pts · 3y

yeetZ++

StarkillerX42@lemmy.ml · -1 pts · 3y
genz be bouta millenial rn
rockSlayer@lemmy.world · 29 pts · 3y (5 replies)

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

scutiger@lemmy.world · 12 pts · 3y

yeet cap rn

It's right there!

aaaa@lemmy.world · 10 pts · 3y (2 replies)

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 · 8 pts · 3y (1 reply)

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
aaaa@lemmy.world · 5 pts · 3y

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 · 6 pts · 3y

Returns a zero, I think.

red@feddit.de · 28 pts · 3y (1 reply)

ngl, SQL could use some rejuvenation

pastermil@sh.itjust.works · 18 pts · 3y

fr no cap

HeavenAndHell@lemmy.world · 25 pts · 3y
[ removed ]
JoMiran@lemmy.ml · 21 pts · 3y

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

BeigeAgenda@lemmy.ca · 20 pts · 3y

Ages ago downloaded some code for handling volume control for me to extend, it was a VB developer using c and they did the same, I just closed it and found some other code to use. πŸ™„

Bonehead@kbin.social · 18 pts · 3y

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

Moghul@lemmy.world · 16 pts · 3y

This feels like those boomer comics about how dumb millennials are

0x4E4F@lemmy.rollenspiel.monster · 12 pts · 3y

Gangsta C++, for the ammo endowed.

Dagu@sh.itjust.works · 10 pts · 3y (2 replies)

You could do this so much better than this

gaussian_distro@iusearchlinux.fyi · 21 pts · 3y

Let's see what you got.

Chadus_Maximus@lemm.ee · 4 pts · 3y

No cap.

vicfic@iusearchlinux.fyi · 7 pts · 3y (1 reply)

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

Dogeek@sh.itjust.works · 2 pts · 3y

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

xuxebiko@kbin.social · 6 pts · 3y

Finally! I'm now deadass hip with the new lingo.

MonkderZweite@feddit.ch · 5 pts · 3y

The count of imports or the syntax?

drekly@lemmy.world · 4 pts · 3y

LETTSSS GOOOOOO

ZILtoid1991@kbin.social · -28 pts · 3y (3 replies)

No, gen Z C++ requires you to type fn for every function, weakly typed (type systems are scary), and every value is constant by default (variables are super scary and bad).

holgersson@lemm.ee · 25 pts · 3y

xd young people dumb

derfl007@lemmy.wtf · 7 pts · 3y

ok boomer

Pretzelise@aussie.zone · 5 pts · 3y

πŸ€“