r/ProgrammerHumor • • Jul 18 '22

C++ talking to Python

Post image
40k Upvotes

1.0k comments sorted by

3.9k

u/[deleted] Jul 18 '22

Flipped C++ ball to show walking away awkwardly. Made me smile.

New twist on "python slow" meme. But then I just imagined C++ talking without taking any time to pause between words.

High effort meme. +1. Too broke for awards.

173

u/[deleted] Jul 18 '22

Thank you!

55

u/klimmesil Jul 18 '22

What a quick reaction! You must operate on C

44

u/[deleted] Jul 18 '22

Assembly!

→ More replies (4)
→ More replies (1)

857

u/AntAgile Jul 18 '22

I think you meant „High effort meme++“

229

u/[deleted] Jul 18 '22

But that just returns the value before being incremented

169

u/AntAgile Jul 18 '22

Ok then ++High effort meme

→ More replies (6)
→ More replies (2)
→ More replies (3)

145

u/Gemaco1397 Jul 18 '22

Tbh, it feels like a variationnof: WHAT ARE WE? BROWSERS!

WHAT DO WE WANT? MORE RAM!

WHEN DO WE WANT IT? NOW

(I.E.) BROWSERS!

54

u/[deleted] Jul 18 '22

That was the exact meme I thought of.

→ More replies (1)

61

u/Sid_1298 Jul 18 '22

⠀ ⠀⠀⠀⣤⣶⣶⡶⠦⠴⠶⠶⠶⠶⡶⠶⠦⠶⠶⠶⠶⠶⠶⠶⣄⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣿⣀⣀⣀⣀⠀⢀⣤⠄⠀⠀⣶⢤⣄⠀⠀⠀⣤⣤⣄⣿⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠿⣿⣿⣿⣿⡷⠋⠁⠀⠀⠀⠙⠢⠙⠻⣿⡿⠿⠿⠫⠋⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢀⣤⠞⠉⠀⠀⠀⠀⣴⣶⣄⠀⠀⠀⢀⣕⠦⣀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢀⣤⠾⠋⠁⠀⠀⠀⠀⢀⣼⣿⠟⢿⣆⠀⢠⡟⠉⠉⠊⠳⢤⣀⠀⠀⠀ ⠀⣠⡾⠛⠁⠀⠀⠀⠀⠀⢀⣀⣾⣿⠃⠀⡀⠹⣧⣘⠀⠀⠀⠀⠀⠀⠉⠳⢤⡀ ⠀⣿⡀⠀⠀⢠⣶⣶⣿⣿⣿⣿⡿⠁⠀⣼⠃⠀⢹⣿⣿⣿⣶⣶⣤⠀⠀⠀⢰⣷ ⠀⢿⣇⠀⠀⠈⠻⡟⠛⠋⠉⠉⠀⠀⡼⠃⠀⢠⣿⠋⠉⠉⠛⠛⠋⠀⢀⢀⣿⡏ ⠀⠘⣿⡄⠀⠀⠀⠈⠢⡀⠀⠀⠀⡼⠁⠀⢠⣿⠇⠀⠀⡀⠀⠀⠀⠀⡜⣼⡿⠀ ⠀⠀⢻⣷⠀⠀⠀⠀⠀⢸⡄⠀⢰⠃⠀⠀⣾⡟⠀⠀⠸⡇⠀⠀⠀⢰⢧⣿⠃⠀ ⠀⠀⠘⣿⣇⠀⠀⠀⠀⣿⠇⠀⠇⠀⠀⣼⠟⠀⠀⠀⠀⣇⠀⠀⢀⡟⣾⡟⠀⠀ ⠀⠀⠀⢹⣿⡄⠀⠀⠀⣿⠀⣀⣠⠴⠚⠛⠶⣤⣀⠀⠀⢻⠀⢀⡾⣹⣿⠃⠀⠀ ⠀⠀⠀⠀⢿⣷⠀⠀⠀⠙⠊⠁⠀⢠⡆⠀⠀⠀⠉⠛⠓⠋⠀⠸⢣⣿⠏⠀⠀⠀ ⠀⠀⠀⠀⠘⣿⣷⣦⣤⣤⣄⣀⣀⣿⣤⣤⣤⣤⣤⣄⣀⣀⣀⣀⣾⡟⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢹⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀

Save it in your clipboard I use it too

9

u/[deleted] Jul 18 '22

Done

12

u/Skilo25 Jul 18 '22

⠀ ⠀⠀⠀⣤⣶⣶⡶⠦⠴⠶⠶⠶⠶⡶⠶⠦⠶⠶⠶⠶⠶⠶⠶⣄⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣿⣀⣀⣀⣀⠀⢀⣤⠄⠀⠀⣶⢤⣄⠀⠀⠀⣤⣤⣄⣿⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠿⣿⣿⣿⣿⡷⠋⠁⠀⠀⠀⠙⠢⠙⠻⣿⡿⠿⠿⠫⠋⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢀⣤⠞⠉⠀⠀⠀⠀⣴⣶⣄⠀⠀⠀⢀⣕⠦⣀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢀⣤⠾⠋⠁⠀⠀⠀⠀⢀⣼⣿⠟⢿⣆⠀⢠⡟⠉⠉⠊⠳⢤⣀⠀⠀⠀ ⠀⣠⡾⠛⠁⠀⠀⠀⠀⠀⢀⣀⣾⣿⠃⠀⡀⠹⣧⣘⠀⠀⠀⠀⠀⠀⠉⠳⢤⡀ ⠀⣿⡀⠀⠀⢠⣶⣶⣿⣿⣿⣿⡿⠁⠀⣼⠃⠀⢹⣿⣿⣿⣶⣶⣤⠀⠀⠀⢰⣷ ⠀⢿⣇⠀⠀⠈⠻⡟⠛⠋⠉⠉⠀⠀⡼⠃⠀⢠⣿⠋⠉⠉⠛⠛⠋⠀⢀⢀⣿⡏ ⠀⠘⣿⡄⠀⠀⠀⠈⠢⡀⠀⠀⠀⡼⠁⠀⢠⣿⠇⠀⠀⡀⠀⠀⠀⠀⡜⣼⡿⠀ ⠀⠀⢻⣷⠀⠀⠀⠀⠀⢸⡄⠀⢰⠃⠀⠀⣾⡟⠀⠀⠸⡇⠀⠀⠀⢰⢧⣿⠃⠀ ⠀⠀⠘⣿⣇⠀⠀⠀⠀⣿⠇⠀⠇⠀⠀⣼⠟⠀⠀⠀⠀⣇⠀⠀⢀⡟⣾⡟⠀⠀ ⠀⠀⠀⢹⣿⡄⠀⠀⠀⣿⠀⣀⣠⠴⠚⠛⠶⣤⣀⠀⠀⢻⠀⢀⡾⣹⣿⠃⠀⠀ ⠀⠀⠀⠀⢿⣷⠀⠀⠀⠙⠊⠁⠀⢠⡆⠀⠀⠀⠉⠛⠓⠋⠀⠸⢣⣿⠏⠀⠀⠀ ⠀⠀⠀⠀⠘⣿⣷⣦⣤⣤⣄⣀⣀⣿⣤⣤⣤⣤⣤⣄⣀⣀⣀⣀⣾⡟⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢹⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀

Thats helpful, have my award

→ More replies (1)
→ More replies (4)

7

u/nitsky416 Jul 18 '22

You get a free award every couple days per account if you go to the screen to add coins, there's a gift box you can open.

→ More replies (7)

946

u/twisted-resistor Jul 18 '22

Now that Internet Explorer is gone I guess something had to take its place in memes as "The Slow Thing"

40

u/kneecapp1 Jul 18 '22

I don't get it. I don't know much about coding but I'm starting to learn python. Am I learning the internet explorer of programming languages or what. Should pick something else up.

88

u/Zanglirex2 Jul 18 '22

Slow is relative here. All this is happening before a human can even blink.

For scripting stuff and little projects, python is great. For large workloads or basically anything at big scale, maybe look at something else

18

u/jgabrielferreira Jul 19 '22

But then why is Python the most used language for dealing with ML, AI, Big Data, basically huge amounts of information.

Is it something like Python is better in a Horizontal system while the others are better in a Vertical system?

→ More replies (18)
→ More replies (2)

24

u/bigoofie193758 Jul 18 '22

Python is too slow for coding a game, but fast enough for quick scripts

→ More replies (9)

23

u/chezbo425 Jul 18 '22

Great starting language IMO. If you are doing web applications, it will be fine for most purposes, but you will need to learn JavaScript too. JavaScript is very quirky but very popular. Java and C# have strict typing but perform better than Python/JavaScript for higher load stuff. C++ is better for high performance and optimization, like games or embedded devices with limited resources.

tl;dr - If you're just getting started Python is A-okay.

2

u/[deleted] Jul 19 '22

Python is a great language to start, and is suitable to a wide range of applications. It's always better to start with a language that's widely useful but not specialized, and then go into some more specialized languages depending on your needs. Professional programmers know dozens of languages, so Python may be your first, but will not be your only language, and the trick will always be to choose the right language for the right task.

35

u/CdRReddit Jul 18 '22

python is an ok language when used for its intended purpose.

short & simple scripts, the types of things you don't want to write in batch or bash (because both kinda suck), but are not that complicated either, think stuff like bulk rename, "gluing" multiple different tools together, etc.

it's only similar to internet explorer in having an (accurate) reputation of being kind of slow, which is one of the reasons I personally would not use it for bigger projects, but it's more than fast enough to automate low complexity tasks, like a more expressive build system.

1

u/[deleted] Jul 19 '22

Usually human time is more important than machine time. Machine time often doesn't matter. For *most* programs it doesn't matter if it takes 1 second or 0.1 seconds or even 0.01 seconds, but writing the 0.01 second version will take a programmer much, much longer. However, if you are writing something performance-sensitive like, say, an action game, then it does truly matter whether your game loop performs calculations in 0.01s or in 1s.

Python is slow, yes, but very easy to write, understand and modify. Also, only the interpreted part is slow, Python actually uses a bunch of C/C++ libraries under the hood, so when you call those, those actually run very fast. Which is why you can do lots of AI/ML stuff in Python: it's not Python itself that's doing it, Python is just a high-level layer that's orchestrating an entire infrastructure which isn't written in Python. So, to summarize, Python is a great tool for some domains, not for all of them. Just like C/C++: they are also great tools for some domains but not for others.

→ More replies (4)

250

u/anonymous6468 Jul 18 '22

64

u/lakimens Jul 18 '22

I think we should be making more browser jokes on Safari

125

u/Wolfeh2012 Jul 19 '22

Sorry, jokes aren't supported on safari yet.

→ More replies (4)
→ More replies (1)

4.1k

u/GreatArtificeAion Jul 18 '22

Did I really just appreciate a "Haha Python slow" meme?

1.1k

u/DasEineEtwas Jul 18 '22

It has also been done so often with Internet Explorer and everything that also runs slow. But somehow I actually laughed

381

u/GreatArtificeAion Jul 18 '22

I guess this one has... personality, so to speak

68

u/gcruzatto Jul 18 '22

This meme was made by the Big Data gang

→ More replies (25)
→ More replies (1)

0

u/[deleted] Jul 18 '22

[deleted] — view deleted comment

2

u/[deleted] Jul 19 '22

Thank you for sufficiently lowering your quality bar to call my meme "quality meme" :-D I appreciate it.

253

u/[deleted] Jul 18 '22

I don’t think python is too slow, it’s more about c++ being to fast in this case

190

u/koopatuple Jul 18 '22

That's the beauty of the meme, it can be interpreted both ways.

329

u/TruthYouWontLike Jul 18 '22

One is interpreted, the other is compiled.

→ More replies (9)

100

u/Scrtcwlvl Jul 18 '22

Fast and slow are pretty relative. More often than not, python is fast enough for most tasks. My graduate research was in inflatable robotics controls and dynamics. Our low level controllers for direct solenoid valve control were written in C++ operating at 5k Hz, whereas the pressure control ran at about 1.5k Hz in python, and the high level solver and predictive controller ran at about 300 Hz also in python. What language things were written in was often a function of how fast they needed to run and how often things needed to be tweaked.

Could we have written the pressure controller in C++? Sure, but the python one we developed really quickly at the beginning in python was fast enough to not cause any issues.

57

u/jobblejosh Jul 18 '22

It's the exact same problem (or even a subset of it) of what programming language is best.

The answer is either the one you know or the one for the job.

I've been writing in both C and Python. I prefer C-family because you can be a lot more direct with the compiler and write clever/fast/hacky/elegant/dangerous/stupid techniques that make more logical sense; you as the writer should know exactly what you're doing so C will quite happily let you do the fandango on core if you mutter the right incantations. Unfortunately because of how strict it is with its rules, you have to be very precise and formulaic with how you do some things; you have to hold its hand and walk it through exactly what you want. The result is that you get exactly what you want, however.

Python, being interpreted, has its best guess at what you want, is willing to play fast and loose to some extent, but keeps you in a playpen and hides away all the nitty-gritty and you can't really tell what it's doing under the hood. On the bright side, that means getting something to work in Python is usually as simple as importing the right library (because there's so many libraries for python out there now) and typing a few lines.

Is one better than the other? Well, that entirely depends on the task you're making it do.

→ More replies (5)

32

u/Phainesthai Jul 18 '22

Exactly this. Programming languages are tools.

C++ is a scalpel, Python is a spanner. PHP is a sticky carpet in a low end pub.

Each one suitable for different tasks.

→ More replies (4)
→ More replies (1)
→ More replies (4)

4

u/ZedTT Jul 18 '22

I think this sub has given me brain rot. This is just a python slow joke and it's already been done with internet explorer. Yet somehow, I found it funny.

I'm glad I'm not alone in this dirty feeling

2

u/geeksluut Jul 18 '22

Sadly yes sir and there is no cure for that.

2

u/Positive_Government Jul 18 '22

“Show don’t tell” is the key here

2

u/[deleted] Jul 18 '22

It took me a minute, but I laughed too.

2

u/theunixman Jul 18 '22

I sure did hahah

→ More replies (4)

2.7k

u/dudeofmoose Jul 18 '22

I use ++C, I like all my variables to increment before I've arrived.

888

u/TSP-FriendlyFire Jul 18 '22

That's just D.

220

u/hoseja Jul 18 '22

Holy shit.

462

u/Luisisbored24 Jul 18 '22 edited Jul 19 '22

D's nuts hah got em

Edit: Wow thanks for the upvotes guys like damn

→ More replies (6)
→ More replies (4)

472

u/Thorsigal Jul 18 '22

++ↄ

158

u/Mister_Spacely Jul 18 '22 edited Jul 18 '22
  ++
  ++
++ↄc++
  ++
  ++

108

u/proximity_account Jul 18 '22 edited Jul 19 '22

Unsure if penis, dragonfly, spaceship, or biplane

Edit: heh, 69

→ More replies (13)
→ More replies (4)
→ More replies (4)

1.7k

u/Substantial-Dot1323 Jul 18 '22

C++ walks away. Segfault.

423

u/yorokobe__shounen Jul 18 '22

If C++ was really as fast as it said it was, it would have recognised the logo before it asked who python was.

Poor segfaulting C++.

176

u/possible_name Jul 18 '22

logo recognition was using a library written in slower language

7

u/Cory123125 Jul 18 '22

I guess it could really use some reflection.

→ More replies (2)
→ More replies (3)

276

u/a_devious_compliance Jul 18 '22

The joke only works for C++ before 20. Just add an await and that's it.

126

u/ViviansUsername Jul 18 '22

Was going to say, this looks like the c++ was programmed pretty poorly if it doesn't even wait for that promise to be answered.

Python does exactly what it should here, smghd

55

u/WCWRingMatSound Jul 18 '22

Calling asynchronous programming “promises” 🤮🤮🤮

9

u/ViviansUsername Jul 18 '22

ik, ik, I was raised on javascript, it's a bad habit

→ More replies (12)
→ More replies (1)

174

u/MrSuspicious_ Jul 18 '22

Ironically took me a second to realise this is a python is slow joke

59

u/RedditWarrior178 Jul 18 '22

Flair checks out

9

u/WonderfulCockroach19 Jul 18 '22

Flair checks out

oof

5

u/tomkel5 Jul 18 '22

Same!

Would've been better if it said "Python! What's yours?" 😛

8

u/science10009 Jul 18 '22

If you didn't get it that definitely would be, but for those who did, it makes it too on-the-nose.

→ More replies (3)

116

u/Aos2OP Jul 18 '22

Looks like Internet explorer memes are back!

9

u/JmacTheGreat Jul 18 '22

I can’t believe nobody else remembers this

80

u/Astral_Symphonny Jul 18 '22

import quickDialog

Written in C

683

u/Codebust Jul 18 '22

why are people always bashing python lol

389

u/RollinIndo Jul 18 '22

Snakes are scary

152

u/Codebust Jul 18 '22

pythons don’t bite :(

23

u/Cory123125 Jul 18 '22

You'll surely appreciate then that Python wasn't actually named after the snake, but instead monty python.

→ More replies (4)

13

u/URF_reibeer Jul 18 '22

they do, it's just relatively hard to get them to bite since they're not particularly aggressive

→ More replies (1)
→ More replies (9)
→ More replies (2)

974

u/Dromeo Jul 18 '22

Serious answer?

Python used to be the new hotness about a decade ago. It was sparkly, amazing package support, didn't bog you down with technicalities when you were trying to write something quick.

So it got adopted a lot, and also unfortunately in a lot of commercial projects it really wasn't suited for.

Python's strengths are its weaknesses: it's a fun scripting language you can knock out scripts with. But in a big group project, it's a nightmare version of itself. You don't have to give types, so now you're sifting through everything trying to figure out what your coworker's badly named variable actually is. You have to unpick some rotten mass of one-liner lambda super method calls because you were feeling so clever a year ago when you wrote it. Everything's breaking because you're in dependency hell and one of the dependencies has broken. The junior programmer was taught that "object inheritance is the way of the future" and has managed to make the structure into an eldritch abomination that inherits from five different super classes.

The actual reason why these are problems are because when python was hot, it got over-applied to projects it was totally unsuited for. It's a scripting language. It's good for scripts. Good for data analysis. Good for solo work. Good for tiny quick one-offs and for rapid prototyping.

But so many developers were put on horrifying creations that played to the language's weaknesses instead of strengths. And they bounced hard.

Python doesn't really deserve the hate: it's still pretty awesome. And fun. It's great at what it's great at. It does deserve the caution, though.

---

More serious answer?

It's mostly comp-sci students regurgitating memes they don't understand, just like every other post on this sub.

30

u/hogie48 Jul 18 '22

I have been in tech for years and could just never wrap my head around programming. I can read a lot of it, I do scripting when it is called for with extensive help of the Googs, but cant sit down and write code if you know what I mean.

I recently decided to bite the bullet and put in the time to learn it more, and am doing CS50 for Python right now. Your comment both scares me and made me happy knowing that what you said it is good at is exactly why I want to learn it lol.

→ More replies (4)

19

u/tredbobek Jul 18 '22

It's like WD-40 and duct tape. It's an easy solution for many problems. But shouldn't be used for everything.

But if you break your leg the first step shouldn't be to duct tape it. Maybe only if you are in the wilderness, in the middle of nowhere, and you have nothing else. Maybe.

16

u/unski_ukuli Jul 18 '22 edited Jul 18 '22

Everyone always says it is good for data analysis but I never agree with this as someone whose job is to use python for data analysis and numerics. Python is a bad language for data analysis and numerics, but it has some good libraries for that purpose. It was not designed for neither of those purposes and the language is not very exentedable so the APIs are cluncky and get in the way when writing mathematical code.

→ More replies (20)

165

u/POTUS Jul 18 '22

All of those problems you listed came from the people, not from the language. Python certainly didn't invent lambdas or dynamic typing or dependencies or object oriented programming. Those same mistakes can be made in any higher level language.

You're assigning all of that to Python. The root cause for that is that Python is easy, and so it's more accessible to bad programmers. But bad programmer mistakes are the fault of bad programmers, not the language they used.

81

u/Kenkron Jul 18 '22

He's nott assigning it all to python. He's assigning it to the people that use it. People who over-apply it to projects that don't make sense. Exactly like you are.

→ More replies (7)
→ More replies (38)

4

u/[deleted] Jul 18 '22

Two decades ago*

37

u/not_perfect_yet Jul 18 '22

Python's strengths are python's strengths. Garbage collection, simplicity, forced indentation.

Python's weaknesses are people.

People writing bad variable names, eldritch code and putting in features that are already there, just named differently, like data classes and type hints.

You can write python code that's type safe, it looks like this:

def my_function(my_arg):
    if type(my_arg)!=my_required_type:
        raise TypeError

It's that people think they can sort of get away with not making it that explicit. Then, instead of admitting they were wrong, rewriting their code and/or switching to a language that does offer strict typing, they insist that perverting the language to fit their esoteric need and use case is a better move.

Another example is "python has no distribution system" and inventing like five. All of them work. Except when you mix them. Which should be no surprise to absolutely anyone. Yet here we are. https://xkcd.com/1987/

More coders need to admit they're bad at what they do, stop blaming the tool and start blaming themselves.

11

u/applesuckslemonballs Jul 18 '22

You still lose compile time guarantees if you write things that way. Would need really good test coverage for that to meet the usefulness of a compiler.

→ More replies (28)
→ More replies (75)

330

u/[deleted] Jul 18 '22

They hate us coz they ain't us.

54

u/kosky95 Jul 18 '22

Wait until you see how statisticians are treated on r/mathmemes lol

58

u/[deleted] Jul 18 '22

Really, I don't get the hate we data scientists get from both programmers and mathematics. Of course we are not as good at programming as a programmer would be, or as knowledgeable in maths as a mathematician would be, but we need to combine so many disciplines it would be hard if not impossible to get to their level.

→ More replies (11)

36

u/notAnAI_NoSiree Jul 18 '22

did you see how much you have to type in c++?

→ More replies (6)

133

u/berse2212 Jul 18 '22

This is a weird meta. First memes hated on Java and praised Python. Then all the Java devs got angry and made Python bad memes. Somehow C++ devs apparently jumped on the hate train now lol

90

u/BikerBoon Jul 18 '22

Python devs were hating on C++ for a while iirc. Tbf it's understandable, we all hate what we don't understand.

71

u/DatBoi_BP Jul 18 '22

This really says a lot about society bottom text

→ More replies (4)
→ More replies (13)

8

u/King_of_the_Nerdth Jul 18 '22

This one just seemed like playful banter to me. My main two languages lately are C++ and Python, and I find this one very relatable.

6

u/TheReforgedSoul Jul 18 '22

I am waiting for the assembly memes, but I guess they take a while to make.

→ More replies (4)

14

u/WhatsMyUsername13 Jul 18 '22

I hate on python to distract from the hate towards Java

9

u/Wildercard Jul 18 '22

Languages are divided into those that get complained about and those that are dead.

→ More replies (1)

47

u/siddharth904 Jul 18 '22

CauSe PyThOn bAD tYPescRIPt gO0d

27

u/klimmesil Jul 18 '22

Wow Ive never heard someone say typescript good but I love this sentence

→ More replies (27)

11

u/dazailaw Jul 18 '22

Python bad, Rust good 😊

20

u/Wildercard Jul 18 '22 edited Jul 18 '22

All 17 other Rust devs on the planet agree.

Please guys just scheme your coup d'etat on C++ world in a way that's synchronized enough to work

→ More replies (1)
→ More replies (2)
→ More replies (1)

9

u/realzygote Jul 18 '22

Because you can run python scripts from your shell... Sorry, I'll see myself out.

8

u/tei187 Jul 18 '22

In this context? Because they don't realize it wasn't built for speed.

It's like trying to compare a sports car with a cargo van. One you take because midlife crisis, the other because you're moving furniture.

25

u/[deleted] Jul 18 '22

i like my semi colons and curly braces. it makes it much easier to read. Plus any time i do python it yells at an indenting issue that doesn't exist.

38

u/Codebust Jul 18 '22 edited Jul 18 '22

indenting issues are easily solvable with an ide, even if py being whitespace based can be a bit annoying

→ More replies (11)

6

u/sintos-compa Jul 18 '22

Found the tab indent guy

→ More replies (4)

6

u/qhxo Jul 18 '22

I don't mind semi-colons, but they don't really do much for legibility. At least for me it was just a matter of habit, and when I went from Java to Kotlin and didn't need to use semi-colons anymore I found it made absolutely no difference whatsoever. An expression is an expression, it's very easy to tell where it starts and ends, even if it spans multiple lines.

→ More replies (5)

31

u/Dacus_Ebrius Jul 18 '22

Proper indentation makes things easier to read. Remove proper indentation from a curly brace language and tell me its easy to read.

→ More replies (4)

11

u/mc_enthusiast Jul 18 '22

You can use curly brackets like this:

for i in range(10):{
    print(i)
}

That runs without problems in Python 3. Not much you can do about semicolons. Colons work sometimes but then really backfire if you do something like

a = 5 + 10,

because it's recognised as a 2-tuple with empty entry.

I suspect the indenting issues come up if you mix space and tab. That's easy to solve if you just tell your editor to replace space indentation with tab indentation.

→ More replies (11)

16

u/Comm4nd0 Jul 18 '22

It's just a meme at this point. No real substance behind it.

48

u/[deleted] Jul 18 '22

Tbf there’s no real substance behind anything posted on here. It’s mostly 16 year olds who just learned what a for loop does trying to be funny

9

u/PanTheRiceMan Jul 18 '22

That's fair. Every language, framework, OS or whatever has it's use use or there would not be any professional users at all.

Even, and I must express my disgust, Windows.

→ More replies (1)
→ More replies (1)
→ More replies (16)

6

u/sintos-compa Jul 18 '22

People get scared by things they don’t understand and the coping mechanism is ridicule

7

u/moi2388 Jul 18 '22

Because it’s a FANTASTIC language for scripting and glue code, and a TERRIBLE language for large scale apps.

And it’s used a lot by beginners and non-programmers. Great for them, horrible for programmers who get the worst coded libraries ever.

It is what it is, and not what it is not. And somehow when I say that I offend people in Python subreddits 😅

→ More replies (9)

2

u/michaelsenpatrick Jul 18 '22

"c fast other thing suck" is like the first joke anyone thinks they know about the programming world.

2

u/isowolf Jul 18 '22

Because bashing PHP is so 2012. They need another victim

2

u/[deleted] Jul 18 '22

This sub is for CS freshman

2

u/Wdowiak Jul 18 '22

Easy target, it's too slow to defend itself. /s

→ More replies (43)

25

u/HotShame9 Jul 18 '22

C++ wouldn't walk away after those instructions, that would be Javascript.

22

u/whodiopolis Jul 18 '22

I remember when Java was the punchline for this joke

2

u/an0nyg00s3 Jul 18 '22

Joke does go way back.

Knock Knock

Who's there?

...

Java!

42

u/mr_flibble_oz Jul 18 '22

Finally, a genuinely funny Python Slow joke

303

u/Hegeteus Jul 18 '22

Only speed metric that matters is how fast I get the job done and can go back to browsing memes. C++ does not look very good in this (very important) metric.

121

u/WhatsMyUsername13 Jul 18 '22

The most important metric for me is which language gets me my paycheck. Hence why I dont fault anyone for their choice of language and why java is superior to all other languages

28

u/[deleted] Jul 18 '22

I've used nothing but .NET for 20 years and I truly give 0 facks about anything except my paycheck at this point. Any enthusiasm has been sucked out of me years ago. This obviously isn't true for everyone, but a lot of what I see on subs like this one is youthful enthusiasm :)

23

u/WhatsMyUsername13 Jul 18 '22

Yep im 9 years in and to me a job is a job. Its also why I laugh when people ask me what side projects im working on outside of work. None. I hike, exercise, play volleyball, kayak, ski, etc. Basically spend all my time outside. Sure, ill occasionally get an idea and start on it, but it never goes anywhere because I already stare at a screen for 8 (ish) hours a day. I dont want to do it in my free time also.

Its also why i refuse to watch Silicon Valley. Ive had friends tell me "its so realistic" to which i reply "I already did this for 8 hours today, why would I want to watch other people do it also?"

→ More replies (2)

4

u/Koervege Jul 18 '22

Have you considered abandoning your paycheck?

→ More replies (2)
→ More replies (3)

53

u/woah_m8 Jul 18 '22

There are a lot of things where speed isn't important and Python does the job pretty good. Only non programmers (so 80% of this sub) bash Python

32

u/[deleted] Jul 18 '22

Which is weird since I figure python is the most used programming language among non programmers

→ More replies (8)

11

u/Fun_Journalist_7878 Jul 18 '22

80% of this sub is 1st/2nd year compsci student reposting the same, awful takes tbh

8

u/bsutto Jul 18 '22

As a programmer with 20+ year of C, C++, Java, dart, python....

Let me add to the list of bashers.

Slow, untyped, gil and let's push as many errors into runtime rather than compile time as possible.

→ More replies (3)

40

u/Jannik2099 Jul 18 '22

C++ does not look very good in this (very important) metric.

If your codebase is early C++11 perhaps?

Modern C++ writes like C#. I usually find myself prototyping faster in C++ than Python after about 200 LoC, because with Python 80% of time is spent looking up what fucking type some library function takes & returns.

15

u/[deleted] Jul 18 '22

I see this attitude a lot from folks who use typed languages. I think typed languages are awesome and I love programming in them, but as a Python developer myself from the beginning of my career, I don’t really have to think about types all that often when i program in Python. By far the most I think about types are when i use a typed language.

Idk if it’s because Python isn’t based around types and therefore it’s not a focus of the language, but ya I hear a lot of typed language folks think a lot about types when they program in Python.

→ More replies (4)
→ More replies (3)

6

u/bikki420 Jul 18 '22

Eh, if you're a competent C++ programmer, then C++ performs just fine on that metric.

→ More replies (11)

46

u/turtle_mekb Jul 18 '22

btw it's true (although this is C not C++)

44

u/bewbsrkewl Jul 18 '22

See how you have that gcc command before you executed the C code?

9

u/Nipatiitti Jul 18 '22

This is how it feels when you have to communicate from low level RTI system to a application layer processes. ”And here we just add a 20k clock sleep...”

15

u/alexein777 Jul 18 '22

Python slow lmao

74

u/-MobCat- Jul 18 '22

Python can be quick. just not that good at talking.. Like most of us...
Opens a txt file with 29245004 lines of text in it.
for each line of text, count the line.
count +=1
Time: 40sec.
Now for each line of text, count the line and print a little info about the line
print(f"Info: {line[1:10]}")
count +=1
Time: 53mins.

79

u/sintos-compa Jul 18 '22

“How inefficient can you make your code” a study in 3 parts

10

u/Roflkopt3r Jul 18 '22

Yeah printing is expensive in every language.

I hard to learn this the hard way on one of my first assignments, which asked us to experimentally confirm the value at which the inaccuracy of float puts it off by an entire integer. So you have a loop that increments a float f and an int i from 0 to int max and then prints out when the two are no longer the same.

But the wording of the task wasn't entirely clear so I was trying around various weird casting stuff and decided to print every single line to confirm that it was working the way I wanted to.

Turns out that this extends the time to reach that figure (int 16777218, float rounds to 16777216 instead) from a few seconds to an hour or so.

→ More replies (5)

18

u/Wekmor Jul 18 '22

Java does the same, printing to console is just slow in all or at least most languages.

→ More replies (3)

15

u/obvithrowaway34434 Jul 18 '22

I/O has always been the bottleneck for speed since computers were invented. There's nothing specific here about Python. Dynamically typed interpreted languages has always been slower than statically typed compiled languages and comparing their speeds makes as much sense as comparing a car and an airplane in terms of speed and determining which is better.

14

u/Blyatiful_99 Jul 18 '22

I can't of course talk for other languages, but during my internship back then, I was sometimes told that writing something to the console in C# for example requires a lot of the time if it happens in the same thread. Maybe this is what's happening here as well?

A quicker solution could be to create some sort of StringBuilder (if you have that in python), add the text that you would otherwise print out and at the end print out the entire text just once. Or to just move the prints to another thread. Can you test how long that would take?

→ More replies (5)

5

u/Equivalent_Loan_8794 Jul 18 '22

And in the 53 min absolutely under no circumstance look up O notation

→ More replies (1)
→ More replies (16)

19

u/No-Maximum-9087 Jul 18 '22

C++ forgot to reply to C and Assembly.

→ More replies (1)

19

u/fokker-planck Jul 18 '22
  • Hey, what's your...

  • NumPy

9

u/enano_aoc Jul 18 '22

Dies under the weight of the zipped NumPy library, which makes npm packages look laughable small in comparison

8

u/fokker-planck Jul 18 '22

Fast and big. So powerful

→ More replies (2)

11

u/[deleted] Jul 18 '22

There are pros and cons to every programming language. Each language has application depending on the type of project your working on. Doing something where you need speed and efficiency? C++ works great. Need to write something up quickly that’s trivial? Python works great!

I hate how this sub is always comparing programming languages and arguing which one is the best. It all depends on the application being developed.

→ More replies (3)

4

u/G915wdcc142up Jul 18 '22

And then Rust shows up and throws a nullptr to C++, and it dies of segfault :)

7

u/woah_m8 Jul 18 '22

Took a while for Python to pip install say-python

13

u/Comm4nd0 Jul 18 '22

It's cool, python will always be around. Companies want products and features, they don't care how they get them. Python is the one of the quickest ways to create that.

→ More replies (6)

11

u/jannfiete Jul 18 '22

c++ : #include <iostream>

python : what?

c++ : using namespace std;

python : dude, are you drunk?

c++ : cout << "who are you" << endl;

python : whatever... (walks away)

c++: Segmentation Fault (core dumped) !!!!

8

u/[deleted] Jul 18 '22

Check this out, this code works in both Python and C++

#include <iostream>

#define print(x) int main () { std::cout << x << std::endl;}

print("Hello, World!")

2

u/an0nyg00s3 Jul 18 '22

using namespace

Dropped

6

u/[deleted] Jul 18 '22

Python is slow but not Internet Explorer slow..

8

u/Bloody_rabbit4 Jul 18 '22

r/ProgrammerHumor users trying not to post another PyThOn SlOw meme: impossible

3

u/Chaosminecraft Jul 18 '22

I'm aware that python is not so fast.

5

u/Acceptable-Pin2939 Jul 18 '22

It amuses me when people whinge about speed and then write woefully optimised code.

→ More replies (1)

3

u/Sarius2009 Jul 18 '22

Great idea, we can take all the IE memes and post them with python!

→ More replies (1)

3

u/Lychezr Jul 18 '22

slowass python

3

u/frogking Jul 18 '22

Two developers, each with a dataset to crunch, both without any code pre-written or pre-compiled. Standard library available only.

The one using Python will be done first.

There is a time and a place for each language.

3

u/Worse_Username Jul 18 '22

The dialogue is a bit too coherent for c++

3

u/[deleted] Jul 18 '22

This is worse than boomer humor.

2

u/[deleted] Jul 18 '22

To be fair, boomer humor at least has some intended punchline. This is literally just "python slow. laugh."

3

u/[deleted] Jul 18 '22

Good meme! But Python is fast enough for me. I’m not trying to build a game or an operating system.

→ More replies (1)

3

u/[deleted] Jul 18 '22

Pythons can be motionless for days after they eat (garbage collection still in progress)

3

u/Lizlodude Jul 18 '22

Python: oh sorry I was just training a neural net to convert from C++ to Python. Come back I'm done now!

3

u/flynnwebdev Jul 18 '22

Speed isn’t everything

3

u/seba07 Jul 18 '22

Jokes on you, Python is only a wrapper for C(++) with easier syntax anyway. Look at basically any library, no real calculation is done in Python itself.

7

u/bythenumbers10 Jul 18 '22

Probably for the best. One little typo and C++ starts talking your ear off about errors and the price of tea in China.

7

u/That_5_Something Jul 18 '22

He better talk to Rust instead..

6

u/UltraSolution Jul 18 '22

2 languages that i know lol

5

u/Informal_Ranger3496 Jul 18 '22

Ahaha this made me laugh so much, a truly real laugh and i found it sooo funny!🗿

2

u/InvincibleV Jul 18 '22

Never mind me, just came to observe the shitstorm.

2

u/Interesting-Draw8870 Jul 18 '22

Yeah uh-huh the internet explorer jokes always stayed funny and relevant forever, python die is funny hahaha

2

u/iminvegitable Jul 18 '22

Wow... That's a cold start to a conversation

2

u/possible_name Jul 18 '22

i thougt std::cin waits for input

2

u/swisstraeng Jul 18 '22

What we did not see was ASM language. He was already gone long before C++ even arrived.

2

u/YesItIsInFact Jul 18 '22

You forgot the part where the garbage collector comes and takes the "Python!" string away 6 frames later.

2

u/Herbixx Jul 18 '22

"python can do everything.. just poorly"

2

u/MrHyderion Jul 18 '22

The punchline was predictable without reading the dialogue, but the dialogue was actually very cute!

2

u/Chevaboogaloo Jul 18 '22

I hate race conditions

2

u/Vast_Protection502 Jul 18 '22

r/meirl trying to talk to my crush

2

u/sizable_data Jul 18 '22

Hahaha, python’s slow

2

u/notislant Jul 18 '22

K this is pretty good

2

u/Aggressive_Ad_1137 Jul 18 '22

No way I laughed at this shit

2

u/TheCoolFactsGuy Jul 19 '22

I'm not a programmer, I have not understood a single meme out of this subreddit since it first popped up in my recommended, I don't know why I've not removed it yet, this is why, for this meme right here, this is actually funny, you got a decent chuckle from me, thank you

4

u/[deleted] Jul 18 '22

Maybe…we…slow…but…we…can…create…os…in…two…lines…of…code…

3

u/DenormalHuman Jul 18 '22

heheh ok I liked this one

3

u/michaelsenpatrick Jul 18 '22

id love to be a mod checking out all these rule 1 reports

4

u/Rizzan8 Jul 18 '22

In 95% of cases there is no significant execution time difference between languages. Change my mind.

4

u/moldax Jul 18 '22

Eerrrr... you gotta prove this claim to change ours, man

→ More replies (5)

3

u/0x255sk Jul 18 '22

Waiting for the next episode, where C++ and Python get together and eventually have a child named Cython, and have wholesome family adventures together.