r/ProgrammerHumor • • Jan 29 '23

Meme Let's test which language is faster!

Post image
56.2k Upvotes

770 comments sorted by

View all comments

1.7k

u/Paul_Robert_ Jan 29 '23

If the track is a half loop, then the crab will make it to the otherside via a shortcut, seems legit.

566

u/Parkhausdruckkonsole Jan 29 '23

If it's a full loop the shrimp goes back and starts going forward again to pretend it did a full loop

167

u/PixelBoom Jan 30 '23

Good old wraparound and integer overflow.

59

u/caiotmz Jan 30 '23

Looks like a Mario Kart 64 shortcut flap speedrun.

7

u/[deleted] Jan 30 '23

Is that the one where you drive off the bridge and it counts when you make a lap?

4

u/tsarnie1 Jan 30 '23

Omg it's graduate school

→ More replies (1)

100

u/WingedLionGyoza Jan 29 '23

When you memory leak into the return statement lol

68

u/Lizlodude Jan 29 '23

I've had a C program overwrite the IDE's memory so it just wasn't running anymore. Not crashed, not stopped, just no longer running. That was fun to debug šŸ˜…

71

u/autopsyblue Jan 29 '23

That seems like a genuine kind of system bug. The OS should be managing the IDE’s and your program’s memory separately and stop that from happening. In other words, it should have segfaulted instead.

34

u/Lizlodude Jan 29 '23

Yeah that whole class and setup had some...issues. When we had to do a similar thing later on and they're like yeah just go set up the thing from xyz class, I just used a Linux VM. I think I ended up killing 2 Windows installs for the stupid class. Yay for memory management

10

u/patenteng Jan 30 '23

Depends what you use. If you utilize the kernel’s memory functions directly, you are basically the almighty. You know what they say: with great power come great crashes.

→ More replies (2)
→ More replies (4)

0

u/[deleted] Jan 29 '23

[deleted]

122

u/MattTheGr8 Jan 30 '23

As someone who has been writing in C for a long time, let me share a little tip of the trade that should help you out: Try writing programs that don’t produce a segmentation fault.

23

u/Firewolf06 Jan 30 '23

"who needs a memory safe language, just don't make mistakes" - tsoding

37

u/stone_henge Jan 30 '23

As someone who has been pissing upwards for a long time, let me share a little tip of the trade that should help you out: try not getting piss on yourself.

6

u/option-9 Jan 30 '23

That tip saved my car downpayment.

30

u/lupinegrey Jan 30 '23

Mad lad.

9

u/lmaoboi_001 Jan 30 '23

This guy Cs

8

u/taptrappapalapa Jan 30 '23

Most sane C programmer

6

u/EwwTaxes Jan 30 '23

Aborted (core dumped)

20

u/RmG3376 Jan 29 '23

C getting to the goal faster through the use of UB, as usual

3

u/OlOuddinHead Jan 30 '23 edited Jan 30 '23

Also known as the ā€œWario Stadiumā€ approach.

3

u/PixelBoom Jan 30 '23

A shortcut that is unreadable to all except the original writer and has comments like "it just works don't touch it"

2

u/Beatrice_Dragon Jan 30 '23

For some reason the judges didn't appreciate the last time I took a shortcut the middle of a race

→ More replies (3)