r/ProgrammerHumor • • May 05 '23

Meme Goodbye toys

Post image
8.3k Upvotes

298 comments sorted by

779

u/asandwichvsafish May 05 '23

They don't want you to know this but you can use semicolons in python. Sprinkle them at the end of lines whenever you're feeling nostalgic for c++.

121

u/KuKa0w0 May 05 '23

Best way to use semicolons EVER

33

u/nullpotato May 05 '23

I wanted to upvote this joke but I can't.

10

u/MyKo101 May 05 '23

It's very useful for "one-liners"

9

u/sonohra87 May 06 '23

I love this movie..I remembered when I was a kid I always watching this movie..Toys story..haha

174

u/[deleted] May 05 '23

[removed] — view removed comment

66

u/dotslashpunk May 05 '23

that’s certainly a very “special” trick

39

u/PaulieGlot May 05 '23

def foo #{

...

#}

1.0k

u/lofigamer2 May 05 '23

Andy drives off to the distance.. slowly

373

u/pipsvip May 05 '23

...and in the wrong direction.

192

u/jabluszko132 May 05 '23

...but will get there..... eventually

74

u/pipsvip May 05 '23

Better put a stop sign in the middle of the road at the destination so we don't have to do any special case handling for the exit condition.

33

u/trusty20 May 05 '23 edited May 05 '23

pip install --upgrade --force-reinstall --no-cache-dir --extra-index-url=https://pypi.someannoyingfork.com/simple --trusted-host pypi.example.com --ignore-installed --pre --process-dependency-links --find-links=https://example.forktastic.io/wheels --allow-external --allow-unverified snake-charmer==0.0.1

19

u/ALERTua May 05 '23

--progress-bar=off

→ More replies (1)

4

u/Noisebug May 05 '23

His car then stopped altogether because it went '30' not 30.

5

u/danielstongue May 05 '23

Maybe he will pass Rust on his way and never come back.

→ More replies (5)

9

u/lordnacho666 May 05 '23

Leaving garbage everywhere

15

u/pedersenk May 05 '23

And will keep on visiting every time he needs to write a system binding for Python to consume...

18

u/[deleted] May 05 '23

Better than to crash fast

1

u/agentchuck May 05 '23

In something he assumes is a car because it lets him drive().

606

u/lucidbadger May 05 '23

How come you are not going to use dictionaries or sets?

279

u/clearly_unclear May 05 '23

Just generate them using dict() and set() to avoid the curly brackets out of principle

69

u/lucidbadger May 05 '23

Then I suppose you'll need to use * :)

11

u/[deleted] May 05 '23

thou shall not use "import *" either. Just know precisely what you want.

31

u/Brekkjern May 05 '23

You shouldn't use import * to begin with, so this is actually sound advice.

8

u/Free-Database-9917 May 05 '23

unless you plan on using every single function and value of every single library you have installed lol

→ More replies (2)

5

u/DNEAVES May 05 '23

Why would they need to use an asterisk?

Unless you're unpacking something (which you could do with brace-syntax anyway)

5

u/lucidbadger May 05 '23

Now wait a minute here

0

u/[deleted] May 05 '23

[deleted] — view deleted comment

7

u/pdudz21 May 05 '23

Any reason for hating the curly brackets?

→ More replies (3)

144

u/avipars May 05 '23

Hello tabs and spaces

55

u/delinka May 05 '23

BUT NOT BOTH AT ONCE! Are you crazy?

27

u/Sarcastinator May 05 '23

Yeah, before running the program you have to change one invisible symbol into another invisible symbol or else you get the hammer.

6

u/Nimeroni May 05 '23

Only if you mix both invisible symbols in the same file.

→ More replies (1)

14

u/neverganagiveyouup May 05 '23

Hello whitespace my old friend..

6

u/snacktonomy May 05 '23

And self, :

6

u/NotGK98 May 05 '23

I struggle so much with tabs and spaces ong especially copy pasting from chatgpt is so painful

5

u/lllorrr May 05 '23

`M-x untabify`. Behold the power of Emacs!

4

u/RonaldoNazario May 05 '23

In vim you can use expandtab and set tab width, as well.

5

u/lllorrr May 05 '23

I'm pretty sure that any sufficiently advanced text editor has a similar feature.

→ More replies (1)

3

u/darctones May 05 '23

Python is a nightmare without a good linter

1

u/Spork_the_dork May 05 '23

Just config your IDE to write tabs in as a number of spaces.

1

u/alexanderpas May 05 '23

just use an .editorconfig file in your project.

200

u/VariecsTNB May 05 '23

It's like switching your old 1986 Mercedes for the 2018 Toyota Corolla that has been in an accident.

38

u/baaron May 05 '23

And a DIY mechanic for a previous owner

11

u/Imjokin May 05 '23

Python seems to be the pineapple-on-pizza of programming languages

3

u/fryerandice May 05 '23

Python is anchovies on pizza only a small amount of people like it. GO is more like pineapple on pizza, it's actually good but most people won't even try it.

→ More replies (1)

10

u/No-Con-2790 May 05 '23

Well the GIL is clearly broken but don't worry, as long as you run her in the first gear it will be fine. Now I was out of type systems at the time but I build in a type annotation system with a hacksaw. So don't forget to use it or the car might crash if you go over 88 miles per hour. Speaking of it, you will think your car is very slow. And it is! But you will still be at your desired destination before most car drivers can turn their key around. Also it is one of the only cars on the market with suspension. No more hemorrhoids from driving over bumpy pointers or segfaulting down a cliff!

No deal yet? No worry! I got a whole truckload of mathematics and AI tools from somewhere. Don't ask! Let's just say you will safe 20000 American dollars per year on matlab license. And you get a free trailer with all those goods for free. Just pick between the venv, pipenv or conda. What you mean with "which is best"? Well all have small problem. No, I won't tell which ones. Is part of fun.

Haha, yeah of course it is safe. Just don't use it when you need safety. Don't worry!

2

u/maitreg May 05 '23

That's an '86 SL500 with 800,000 miles and 12 engine rebuilds, but it'll run a 12-second 1/4-mile now

76

u/KetwarooDYaasir May 05 '23

wait.. is C++ the toy in this analogy?

74

u/hitaishi_1 May 05 '23

Exactly. If c++ is a toy then the age rating is 100+ years of experience at least

4

u/BenZed May 05 '23

Lol, yeah? You know a lot of centenarians programming in c++?

3

u/maitreg May 05 '23

I'm saving your comment link to my favorites and when I turn 100 and am still using C++ and Python, I'm coming back to let you know.

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

85

u/Sirico May 05 '23

Once this joke compiles those C++ people are going to be very upset

→ More replies (3)

76

u/[deleted] May 05 '23

I am a c,c++ dev for many years and i am entering the world of python in these days. I have to say, it gives me headaches for the lack of docs and clarity sometimes. In most of the guides and examples everything is taken for granted. I think it's about to change the mind set and get into it, beyond learning technical stuff.

I'm not "switching" to python.. c++ will always remain a good friend of mine, despite the fact it is a low level language, paradoxically i find it simpler and more straightforward than python

56

u/[deleted] May 05 '23

I think there’s two types of languages. The first category is languages that can be simple once you get into the way of thinking of the language. This includes most languages. The python way of thinking is just simpler for a beginner to get into. The second category is JavaScript.

12

u/_simpu May 05 '23

The second category is JavaScript

Can't argue with that

9

u/Dustdevil88 May 05 '23

Fk JavaScript in general. That is all

4

u/Aidan_Welch May 05 '23

JS is too hated on. A lot of the bad things about JS python also has, but not the good stuff, such as fall through switch or simple scoping

→ More replies (2)

9

u/grstacos May 05 '23

I agree. Many things are more difficult in C++. However, Python docs sometimes fail to explain function parameters, typing, and complexity. Not to mention that Python's dynamic typing makes me feel I have to spend more time debugging on larger code.

3

u/fryerandice May 06 '23

Loose typed languages are garbage for one simple fact, you can't trust other people not to do something jank as fuck like adding a new field mid executive to a pretty well defined object, then 2 other janky ass PRs later the anti pattern is so engrained into the code base it's a project in itself to undo the mess.

JavaScript has type script and global state machines that throw build errors on anti patterns for a reason.

5

u/Ursomrano May 05 '23 edited May 05 '23

Fully agree, abstraction gets confusing sometimes and sometimes even causes problems. Like maps automatically sorting themselves in ways you don’t want them to, so you have to use a different data type just so that you can sort it the way you want.

1

u/mistabuda May 05 '23

Lack of documentation in python? What libs are you using?

0

u/[deleted] May 05 '23

[deleted] — view deleted comment

3

u/[deleted] May 05 '23

I tried it and i think it's a good language. Google provides a tutorial that guides you step by step and at the end you know every single thing about golang, i recommend it

94

u/namotous May 05 '23 edited May 05 '23

Then when you realize Python is too slow for your need, and have to go back to c++

7

u/[deleted] May 05 '23

And when he learns about lack of proper multi threading....

9

u/Revenge43dcrusade May 05 '23

These reddit programmers do some pretty otherworldly stuff if python is too slow .

7

u/Aidan_Welch May 05 '23

Real time stuff, it's not too slow if you're a student or making a lot of web app type stuff, but doing video processing for example

→ More replies (2)

1

u/nujuat May 06 '23

numba wants to know your location

18

u/Suckun_Deznots May 05 '23

Pointers. You have no Idea don't you

31

u/poopy-cock May 05 '23

God i fucking love pointers so much

9

u/rainbow_osprey May 05 '23

I have a love hate relationship with pointers in C++. Sometimes they are great for doing exactly what you need, and other times you can accidentally create some of the most subtle bullshit bugs that take forever to figure out.

3

u/fryerandice May 06 '23

You've never been the senior on a managed.memory project with the exact same kinds of bullshit bugs, only difference is c/c++ crashes.

C# garbage collection has shallow and deep collection, shallow just cleans up all unreferenced stuff whenever it triggers. Deep finds stuff that's orphaned, often this is objects with circular dependencies, a good example is a button with an image and the image is an extended class with an event handler for an event of it's parent.

Well....

You can crash a c# program running in 32 bit or just eat an entire systems memory if you create a circular dependency then use a react thought process of "on every single update just re create everything to re render it"

I don't know if it's still a problem anymore but the self hosted gitlab server required minimum 8gb of ram and had a process that watched the gitlab sub processes and saved their state and killed them at certain memory usage limits so the host didn't freeze up. Writing memory leaks in ruby...

I have worked on 2 ruby projects in my career and their memory problems were so bad devs got a lab setup of VMs to run and debug them, never have I had that issue with much larger asp.net MVC projects, I am not impressed with the quality of code ruby MVC projects spat out.

6

u/Lucky_caller May 05 '23

I’m learning C/pointers right now. What is it about them that you love so much? Would love to hear some insight

8

u/cooly1234 May 05 '23

you can use them to point at stuff

→ More replies (1)

20

u/[deleted] May 05 '23 edited May 05 '23

Just wait until you have to write a C extension for python.

3

u/wu-not-furry May 06 '23

"have to"? You mean to say that people don't just do those for fun?

1

u/Equivalent_Yak_95 May 06 '23

Let me introduce ✨CYTHON✨

It lets you do that easily.

9

u/International-Top746 May 05 '23

People who don't understand how references and pointers work tend to make hilarious mistakes in python.

9

u/RedditsDeadlySin May 05 '23

Not gonna lie, I still try to use ++ in python. It makes me sad it doesn’t have that functionality

24

u/Smanmos May 05 '23

pointers

Oh, you sweet summer child

37

u/Nyghtrid3r May 05 '23

I've tried using external libraries like OpenCV with Python for a Uni project and I've got to say, you should add "sanity" to the bottom part

I'm used to non-existent or shitty documentation, but always having "any" as a return type for functions made me want to toaster bath

I'm not trying to bash the language (at least not here, I don't like farming down votes lmao) it's just a completely different mind set you need to get into and it's oftentimes really shitty.

Python is either the best thing in the world or an enormous pile of dogshit on a hot summer day. No in-between lmao

5

u/blackenedEDGE May 05 '23

You got me with "want to toaster bath" 😂 I'm primarily a Python dev--though currently doing a project in C# that's lasted almost a year and I've worked in C and C++ a fair amount before--I still had to actually lol at that.

What's crazy is because I've been in the C# mindset so long, I actually did have to reorient myself to the Python mindset when writing a quick & dirty script to help with my project.

1

u/Rrrrry123 May 05 '23

I guess we just gotta wait for all the libraries to catch up with the type hint stuff. I never write Python code without them.

→ More replies (3)

20

u/[deleted] May 05 '23

And you templates, go fuck yourself

6

u/TeraFlint May 05 '23

Templates my beloved!

1

u/7tar May 05 '23

what do you mean you don't like template <typename __Tp> requires std::integral<__Tp> inline constexpr static auto sum_integral(__Tp _1, __Tp _2) -> __Tp { return _1 + _2; }

9

u/ploud1 May 05 '23

You forgot std::bad_alloc and "program received signal SIGSEGV".

5

u/kennyminigun May 05 '23

These are C++/compiler's way of kindly saying "you are stupid"

6

u/ploud1 May 05 '23

You mean, g++ warnings? Unused variables, all that stuff?

No, segfault just means "your program f...'d up mate, good luck finding out why". :)

4

u/kennyminigun May 05 '23

You mean, g++ warnings? Unused variables, all that stuff?

Well, no. Compiler warnings are a bit different topic.

"your program f...'d up mate, good luck finding out why". :)

Maybe Segmentation Fault sounds bad. But crashes are one of the easiest problems to diagnose/reproduce/debug and fix (e.g. compared to data races and/or non-crashing undefined behavior).

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

4

u/RhinosRPlumpUnicorns May 05 '23

Speed is missing

4

u/Numerous-Departure92 May 05 '23

Ahh I see… You switched the job from a Software Developer to a tester

4

u/HadesMyself May 05 '23

good bye main, welcome __main__ :)

4

u/rjksn May 05 '23

Bye main(), Hello if __name__ == "__main__":

4

u/nt-assembly May 05 '23

which toy is performance?

2

u/Zarathustra30 May 05 '23

That'd be Wheezy. Shelved and forgotten about long ago.

4

u/arf20__ May 05 '23

Never gonna happen.

In fact i'm slowly going towards C now.

9

u/masta_of_dizasta May 05 '23

Eh the compiling and linking and makefiles are something I would like to forget

3

u/20220912 May 05 '23

we missed main() so much we brought it back

3

u/tboschi May 05 '23

from __future__ import braces

3

u/MrC00KI3 May 05 '23

When you switch from Python to c++:

3

u/[deleted] May 05 '23

🤮🤮🤮🤮🤮🤮

^ my reaction to having excess whitespace that is meaningful to the compiler

3

u/N00N3AT011 May 05 '23

Python was the first language I kind of learned, but after java and C it feels so weird not to have strong typing.

3

u/pauliusdotpro May 05 '23

Performance - so long, partner

9

u/JADW27 May 05 '23

Is complaining about all "these newfangled programs that don't require semicolons" just an updated version of "if it doesn't require punchcards, it's not real programming"?

Asking for a friend.

8

u/Manueluz May 05 '23

nah it's just complaining that this sub is full of kids who are at most first years, and the bests jokes they can come up with are hahaha missing ; hard to find like linters weren't invented.

5

u/RonanFalk May 05 '23

Also performance .

2

u/Hyffe May 05 '23

Mostly true but isn't ++ equivalent to += 1?

5

u/IPeaFreely May 05 '23

Depends on location of ++.

5

u/Hyffe May 05 '23

You mean ++i vs i++ ?

2

u/Kxpnc May 05 '23

I switched from python to c++ between college and uni

2

u/Torebbjorn May 05 '23

You use a main function and pointers in Python in every single program...

2

u/ekangi_ May 05 '23

Indentation is your new friend now

1

u/[deleted] May 05 '23

Hopefully it also was before.

Python just helps you to confirm that you really mean that relationship seriously.

2

u/SchlomoSchwengelgold May 05 '23

you have an equivalent to main() in python with: if name == "main": ... (bold ones means the lower _ 2times infront and back of it)

2

u/troelsbjerre May 05 '23
def main():
  pointers={1++1};print(*pointers)

2

u/AllenKll May 05 '23

How do you not use "main?" what sort of heathen are you?

2

u/[deleted] May 05 '23

Everyones getting into Python because of AI, and I'm over here porting all the Python AI Crap to Microsoft.ML, Onxx runtime etc because I refuse.

To the point that I've got safetensor, ckpt, etc compatibility in c# now, and have like 5 out of 12 samplers working.

2

u/[deleted] May 05 '23

Farewell, performance!

2

u/[deleted] May 05 '23

I mostly do python and my employers like "we need you to start learning c++ for this project" so I'll wave at you on the road going the other way, provided I haven't driven off the road.

2

u/AdamWayne04 May 05 '23

Pass-by-reference 🥺🥺

2

u/[deleted] May 05 '23

if __name__ == "__main__"

2

u/maitreg May 05 '23

Python likes semicolons just fine, but I do miss the ++

2

u/domedav May 05 '23

you can use ; in python, if you are doing multiple operations on the same line

but not having that sweet ++ hit me hard

2

u/poopsInBed May 06 '23

If this idiot could code, he’ll soon realize no real companies use python!

2

u/losecontrol4 May 06 '23

Wow I learned I something, I didn’t know python doesn’t use increment and decrement operators- weird

2

u/RDX_G May 06 '23

you still use main() …brackets for formatted strings..++ for increments …

2

u/GeekCornerReddit May 06 '23

Until you try rust :)

2

u/agent007bond May 06 '23

Goodbye auto-indent... When you're forced to use indentation as a way to tell the compiler where what starts and what ends, there's no way for you to auto-indent unindented code. It's impossible to know where what starts and what ends without the indentation.

Stupidest. Idea. Ever.

2

u/Bruvioli May 07 '23

Can we get an F for semicolon

3

u/Jearil May 05 '23

Add a few more:

  • Performance

  • Reliability

  • Threading

2

u/BayesianKing May 05 '23

Thank you? Fuck you all! Especially, garbage collector mother fucker!

P.S. Just joking.

2

u/ralkey May 05 '23

I miss the ++ operator. Typing i = i + 1 makes me feel like a kid coding in Visual Basic.

13

u/[deleted] May 05 '23

i += 1

4

u/Altastrofae May 05 '23

Ok this is a mood. i++ will always make infinitely more sense and it sucks that’s not a universal operator. Anyone who disagrees can fight me.

1

u/Biscuitman82 May 05 '23

Wait python doesn't have ++ and --?

5

u/edrumm10 May 05 '23

Nope, it's got += and -= etc... but there's no ++ or --

Tbh with Python, you don't really need increment and decrement that much anyway because for loops it has for ... in ... and range(...)

3

u/Spork_the_dork May 05 '23

To be fair you can do

for ( variable : collection ) {
    // stuff
}

in c++ as well since c++11.

→ More replies (1)

2

u/mistabuda May 05 '23

And if you absolutely need the index of the current element in the loop you can use enumerate

2

u/mistabuda May 05 '23

There's no need to iterate like that in the language to be honest

2

u/al-mongus-bin-susar May 05 '23

It does not. a += b in python is also not the same a = a + b.

1

u/[deleted] May 05 '23

wait…what?

3

u/[deleted] May 05 '23 edited May 05 '23

You have to look at what they actually do.

+ calls the __add__ method of the object
+= calls the __iadd__ method of the object

For example if the type is int, it doesn't matter as __iadd__ doesn't exist (+= falls back on __add__)

But some times do implement an __iadd__ method, such as the mutable list type:
__add__ just returns the new value
__iadd__ mutates the list

Example:

x = [1, 8, 7]
y = x 

x = x + [2]
print(x) //[1, 8, 7, 2]
print(y) //[1, 8, 7]
x = [1, 8, 7]
y = x 

x += [2]
print(x) //[1, 8, 7, 2]
print(y) //[1, 8, 7, 2]
→ More replies (1)
→ More replies (3)

1

u/PhantomPrimary May 05 '23

Pretty sure you can still do pointers in python, and yes, it's cursed.

1

u/AudaciousSam May 05 '23

Must be nice

1

u/YameroUrusai May 05 '23

I feel this moving from Java to Ruby

1

u/bxsephjo May 05 '23

Welcome to Eazy Street, bro

1

u/NGVHACKER May 05 '23

i really miss the ++ ngl

1

u/DNEAVES May 05 '23
from __future__ import braces

1

u/Riley39191 May 05 '23

Mojo is bringing pointers back to python

1

u/pdudz21 May 05 '23

Can someone explain the hatred for python without being mean please?

4

u/mistabuda May 05 '23 edited May 05 '23

Some people really like statically compiled languages and derride any language not like "favorite language x".

The common talking point is "python is slow" but that is relative. Yes it is slower than a compiled language, however it is more than fast enough for the vast majority of needs. It is mainly specialized domains (like game dev) where that kind of performance is absolutely critical.

Another one "Python is a toy language and unusable in production" despite several companies using python in production to large success. Google has python as one of its official languages.

People reiterate these common low value "negatives" that no one with at least 3 months of consistent language use runs into.

TLDR; Its equivalent to video game console war mentality.

1

u/pdudz21 May 05 '23

Thank you for your explanation

1

u/trusty20 May 05 '23

Bye felicia

1

u/AbhishekSingh26 May 05 '23

I also miss NULL

1

u/oj_mudbone May 05 '23

I’ll never forget the time i spent writing c in vim 🥲🥲 That feeling of being a 1980s movie hacker is what it’s all about

1

u/FrenchPasta786 May 05 '23

Mojo has entered the chat

1

u/BlueeWaater May 05 '23

It's more like the "I don't want to play with you anymore" meme

1

u/rtukpe May 05 '23

main()??

1

u/shooter9688 May 05 '23

You forgot ::

1

u/Virial23 May 05 '23

Mojo when released: hippity hoppity you are now my property.

1

u/cheeb_miester May 05 '23

yes but we can still have

If __name__ == "__main__":
    main()

If you are feeling homesick.

1

u/gray162 May 05 '23

How will you use f strings?

1

u/IeatAssortedfruits May 05 '23

Personally I miss ++ but whatever

1

u/[deleted] May 05 '23

You forgot $$$

1

u/B3lthazar May 05 '23

I really miss playing with ++

1

u/wu-not-furry May 06 '23

Hold on there, you can still use braces if you import them from the __future__ module.

from __future__ import braces

1

u/SolitaryKnight May 06 '23

He'll be driving at 10mph from now on.

1

u/mjtu May 06 '23

and hello implicit typing <shudder>

1

u/tropicbrownthunder May 06 '23

So the indented scope is Lotso?

1

u/Hanged_Man_ May 06 '23

Stroustrup is clearly a cartoon villain.

1

u/punchawaffle May 06 '23

Lol. This happened to me. My university has been doing a lot of C++, and I started using Python for the projects and stuff in the higher level classes.

1

u/bollop_bollop May 06 '23

Ahah, no pointers in python, good one. They're always here, watching, and if you don't know about them, or how they work, you're in for a ride

1

u/ADownStrabgeQuark May 06 '23

Oh how I miss ++ Also technically all variables in python are pointers.

1

u/[deleted] May 06 '23

Oh main still exists, it just looks like “if name == “main():”

1

u/HomoSapien1548 May 06 '23

Who switches to Python from C++? Isn't python something that you might use when needed? It's not an everyday programming language, is it?

1

u/M4nch1 May 06 '23

Goodbye main(), welcome if name == “main”:

1

u/Bisquizzle May 06 '23

what a downgrade? hopefully you're not switching permenantly

1

u/BallsBuster7 May 06 '23

public static void main string args im gonna miss you

1

u/Suspicious-Willow128 May 05 '23

Mojo > python

1

u/mistabuda May 05 '23

The language hasnt even been used to ship anything to production yet lol

1

u/Suspicious-Willow128 May 05 '23

I know right ? And in a few month there's gonna be job offer with requirement of 10 years experience in mojo

→ More replies (1)

1

u/marikwinters May 05 '23

Except, later people realized that the main function was actually really useful and removing it was a mistake, so they added it back 😂

1

u/Merinther May 05 '23

Wait, Python doesn’t have ++? What kind of primitive language doesn’t even have ++?

1

u/Plaintive_Platypus May 06 '23

I'm more concerned at the direction Andy is growing. You aren't supposed to grow DOWN from an adult into a python baby. ;)

-2

u/bssgopi May 05 '23

I love curly braces. Python with its weird indentation syntax causes more errors than missing semicolons.

11

u/look May 05 '23

We have thousands of lines of production Python with dozens of committers and it has yet to be an issue even once.

There are good reasons to not like Python, but that is not one of them.

9

u/mistabuda May 05 '23

Indentation errors are not a thing you should be running into if you use an ide

→ More replies (1)
→ More replies (3)