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

Bonehead
link
fedilink
191Y

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

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

Aa!
link
fedilink
14
edit-2
1Y

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
141Y

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
71Y

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.

yeet cap rn

It’s right there!

LoafyLemon
link
fedilink
61Y

Returns a zero, I think.

Gen Z++

genz be bouta millenial rn

Reminder that yeet is a keyword in rust

Is it synonymous with eject?

You could do this so much better than this

No cap.

Let’s see what you got.

Your move, busta

Jo Miran
link
fedilink
251Y

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

swab148
link
fedilink
51Y

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

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

deadass vibin

syntax error

💀💀💀

I love “yeet cap rn”.

I was fine till I hit sussin.

Gangsta C++, for the ammo endowed.

That’s called a Domain-specific Language.

Cool Beance
link
fedilink
951Y

Z++

this had me deadass laughin fr fr no cap

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

fr mf be bussin

ngl, SQL could use some rejuvenation

fr no cap

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

Pretzelise
link
fedilink
51Y

🤓

ok boomer

holgersson
link
fedilink
271Y

xd young people dumb

TheKarion
link
fedilink
421Y

Delete your GitHub account

Yeah…

store this gem on Codeberg instead!

Fonzie!
link
fedilink
21Y

!0;

Create a post

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.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.6K Comments
  • Modlog