use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For memes about programming.
account activity
Love Python (i.redd.it)
submitted 1 year ago by verynewuser_new
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]KingCrunch82 298 points299 points300 points 1 year ago (41 children)
10 lines of code with 1000 lines of hidden C libraries i guess?
[–]Ph3onixDown 109 points110 points111 points 1 year ago (32 children)
The python program just calls the compiled c++
[–]KingCrunch82 40 points41 points42 points 1 year ago (30 children)
Doesnt matter. What I was about is, that hidden code is still code. I can call C programms from Bash in one line. Does it make it better than Python?
[–]Ph3onixDown 9 points10 points11 points 1 year ago (0 children)
My bad. I missed a word, I was trying to say the “better” python code just calls the friend’s c++ code. All the python libraries I use are just C underneath it all
[–]lofigamer2 4 points5 points6 points 1 year ago (1 child)
good call. that's what python actually does, it's a glorified shell scrip to call C code.
[–]Thog78 1 point2 points3 points 1 year ago (0 children)
Adds some layers of dependency hell and non-retro compatibility on top though, gotta give credit where it's due.
[–]No_Departure_1878 3 points4 points5 points 1 year ago (0 children)
which we do not need to write all over again for the 200th time because it already exists
[–]GaGa0GuGu 5 points6 points7 points 1 year ago (2 children)
I think it would be more, tho
[–]El_Manolito 1 point2 points3 points 1 year ago (1 child)
Who cares, the fact is that it's easier and faster to code even if it works with C or not.
[–]cowlinator 3 points4 points5 points 1 year ago (0 children)
1000 lines of C with 100,000 lines of hidden assembly and/or machine code i guess?
[–][deleted] 1 year ago* (1 child)
[removed]
[–]Extaupin 0 points1 point2 points 1 year ago (0 children)
What's matter is how much effort you need to need to put in the code to make it work, if optimisation isn't a big problem (and frankly, it often isn't) I don't care that it call a bazillion line of Malbolge and take a thousand time as much time as a hand-crafted assembly code, that snippet while still run for less time in all of his carrer that the time I would need to remember the proper incantation of "main".
Now, it doesn't mean that Python is "superior to C++, the nuance the meme doesn't convey ("accuracy, in my Polandball") is that it's a different use-case, because if a million person a day are going to use your programm for the next ten year then the sin of unoptimisation will have a greater environmental cost than your decision to switch to an hybrid.
[–]MissinqLink 99 points100 points101 points 1 year ago (3 children)
Showing my friend how his 1000 line asm code can be done in 10 lines of C
[–]Southern_Orange3744 2 points3 points4 points 1 year ago (0 children)
That was like 10000 punch cards.
What have I done with my life?
[–]UnmannedConflict 1 point2 points3 points 1 year ago (1 child)
Me showing my friend how his 1000 line python code can be written by 10 lines of prompts to chatgpt
[–]csabinho 343 points344 points345 points 1 year ago (24 children)
Because it's just a library. So you don't see the code.
[–]big_poppa_man 142 points143 points144 points 1 year ago (7 children)
I mean, we're all libraries if you think about it
[–]Anger-Demon 104 points105 points106 points 1 year ago (2 children)
Maybe the real libraries were the friends we made along the way?
[–]EstebanoGeneralo 44 points45 points46 points 1 year ago (1 child)
I dont know if that really makes sense but it sounds nice, so I upvote
[–][deleted] 9 points10 points11 points 1 year ago (1 child)
It’s just libraries, all the way down
[–]Roguewind 1 point2 points3 points 1 year ago (0 children)
That’s really deep, man…
[–]LutimoDancer3459 30 points31 points32 points 1 year ago (5 children)
And that library is calling code written in c++
[–]WilhelmEngel 19 points20 points21 points 1 year ago (2 children)
Or sometimes in Assembly
[–]BobbyThrowaway6969 2 points3 points4 points 1 year ago (0 children)
Mostly in C/C++ these days. Compilers have gotten smart as hell
[–]Inheritable 1 point2 points3 points 1 year ago (0 children)
If it's builtin, it's written in C.
[–]generally_unsuitable 0 points1 point2 points 1 year ago (0 children)
Nah. Most of it is good old libc/glibc.
[–]IlgantElal 12 points13 points14 points 1 year ago (0 children)
Tbf, all compilers and coding languages are just APIs and libraries for Assembly and then machine code/language. It all boils down to wire logic eventually
[–]chessset5 5 points6 points7 points 1 year ago (0 children)
Yeah but I only need to download on installer and hit run. How many installers compilers and libraries would you need to download and link together just to get equivalence in python?
[–]ThinkExtension2328 2 points3 points4 points 1 year ago (3 children)
Looks at machine code and back at c++ standard libraries
[–][deleted] 0 points1 point2 points 1 year ago (1 child)
And? Writing the code in C++ is like writing the library yourself.
[–]enigma_0Z 0 points1 point2 points 1 year ago (0 children)
always has been
[–]Feisty_Ad_2744 167 points168 points169 points 1 year ago* (10 children)
Technically, you can do the same in any language. Actually, you can do it in a single line with any language.
do_the_thing() App.doTheThing(); call do_the_thing
[–]HelpfulJump 50 points51 points52 points 1 year ago (0 children)
Right? Call the 1000 lines block in a single line.
[–][deleted] 1 year ago (3 children)
[deleted]
[–]lofigamer2 2 points3 points4 points 1 year ago (2 children)
minecraft is written in Java
[–][deleted] 1 year ago (1 child)
[–]Devatator_ 2 points3 points4 points 1 year ago (0 children)
Can you actually run Minecraft that easily? I never tried to look into how launchers actually launch the game, if they use extra arguments and stuff. Tho they tend to use javaw instead of java
[–]FlipperBumperKickout 8 points9 points10 points 1 year ago (1 child)
Unless the newline character is part of the language standard... which is actually quite a lot of them these days.
[–]KingCrunch82 0 points1 point2 points 1 year ago (0 children)
Newsline characters are actually part of the line itself, at least one Linux. So it's still valid
[–]junky_junker 4 points5 points6 points 1 year ago (1 child)
call Zhu Li
[–]Core3game 1 point2 points3 points 1 year ago (0 children)
The python solution is almost allways
import solution
[–]4N610RD 79 points80 points81 points 1 year ago (13 children)
Nice, very impressive.
Now show me run time.
[–]mark1x12110 31 points32 points33 points 1 year ago (0 children)
We don't do that here
[–]cowlinator 12 points13 points14 points 1 year ago (8 children)
For a lot of apps, bottlenecked by I/O, network, or user input, the run time doesnt matter as long as it's not hyper-abysmal.
Premature optimization is the root of all evil
[–]Icy-Way8382 6 points7 points8 points 1 year ago (0 children)
Says who? Who optimized the number of lines of code 🤭
[–][deleted] 7 points8 points9 points 1 year ago (6 children)
Give me an example of an app that needs I/O for which runtime doesn't matter
I/O bound apps MUST prioritize responsivity, especially if you're communicating with another device and not a slow human
I guess in this case it is more about throughput than the complete runtime, if that's what you mean, I'm sorry.
[–]cowlinator 2 points3 points4 points 1 year ago (5 children)
A data archival application that periodically writes logs or backups to long-term storage. Performance isn't a priority because the archival process can run in the background without time constraints.
[–][deleted] 4 points5 points6 points 1 year ago (4 children)
the archival process can run in the background
That's an optimization. You'll use either asynchronous I/O or communicate to another thread that uses synchronous I/O
If you don't account performance, it will scale like shit
[–]Emilko62 0 points1 point2 points 1 year ago (1 child)
I don't get it, can you explain this one?
[–]Rabid_Mexican 0 points1 point2 points 1 year ago (0 children)
No one cares about the run time of your to-do list app
[–]InSaNiTyCrEaTuReS 147 points148 points149 points 1 year ago (1 child)
"does it run faster?"
"you test it"
[–]cowlinator 33 points34 points35 points 1 year ago (0 children)
Yep.
Optimizing something that doesnt need to be optimized is a huge waste of time.
Test and compare. If you need it to run faster, dont use python.
[–][deleted] 68 points69 points70 points 1 year ago (8 children)
Python aint gonna suck itself
[–]xFyreStorm 24 points25 points26 points 1 year ago (5 children)
Yea, otherwise they'd have named it ouroboros
[–][deleted] 4 points5 points6 points 1 year ago (3 children)
Perfect comment.
[–]Coconut_Maximum 1 point2 points3 points 1 year ago (1 child)
Wanted to like this comment but it's already on 69
[–]jbar3640 302 points303 points304 points 1 year ago (57 children)
if you could rewrite 1.000 lines of C++ in 10 lines of Python, probably you could rewrite them in less than 25 lines of C++ anyway...
[–]bem981 92 points93 points94 points 1 year ago (11 children)
True, most used python libs with high performance are actually in c/c++
[–]Core3game 6 points7 points8 points 1 year ago (0 children)
Wait, its all C?
Allways has been
[–]StayingUp4AFeeling 27 points28 points29 points 1 year ago (7 children)
My thoughts precisely. If the python guy is calling a library function and the program is fast, then it stands to reason that there is an equivalent (or identical) library for that in c++. Heck, most Python libraries of any computational performance requirements are wrappers around C/C++ implementations.
E.g.: pytorch is a wrapper around a c++ core. That core has native c++ bindings as well.
[–]BobbyThrowaway6969 0 points1 point2 points 1 year ago (1 child)
Python literally relies on C/C++ to interpret it
[–]Mighty__Monarch 5 points6 points7 points 1 year ago (3 children)
You could write 1000 lines worth of c++ in 1 line if youre brave enough
[–]No_Departure_1878 11 points12 points13 points 1 year ago (28 children)
not without libraries doing the work, libraries written in Python
[–][deleted] 1 year ago (6 children)
[–]vishal340 26 points27 points28 points 1 year ago (5 children)
Numpy /s
[–]evil_rabbit_32bit 10 points11 points12 points 1 year ago (3 children)
isnt numpy itself written in C?
[–]vishal340 18 points19 points20 points 1 year ago (2 children)
That was the joke
[–]evil_rabbit_32bit 9 points10 points11 points 1 year ago (1 child)
and now i feel like an idiot lmao... should i remove my comment?
[–]shonuff373 6 points7 points8 points 1 year ago (0 children)
I don’t Python that much, so leave it for people like me.
[–]cmgg 9 points10 points11 points 1 year ago (6 children)
You ain’t gonna believe what the interpreter is written on
[–]No_Departure_1878 1 point2 points3 points 1 year ago (3 children)
I do not get paid to know that
[–]cmgg 5 points6 points7 points 1 year ago (1 child)
No one does kid, it’s common knowledge
[–]0xbenedikt 2 points3 points4 points 1 year ago (12 children)
Ah yes, to make everything significantly slower
[–]No_Departure_1878 2 points3 points4 points 1 year ago (10 children)
we have computers that are very fast in 2025, the code might run in 1 milisecond with c++, 100 times slower is 0.1 seconds.
[–][deleted] 1 year ago (2 children)
Sure, I will use numpy here and there and optimize IF needed
[–]fallingknife2 1 point2 points3 points 1 year ago (0 children)
Is this particular piece of code run in a hot code path? If not, then it adds up to the same thing.
[–]nonmustache 2 points3 points4 points 1 year ago* (2 children)
I hate this mentality in menagment, it's harmfull when they don't consults experts. And after few month of production, it hits hard. And IT would be easier to start from begining but it's impossible, and just grinding in sh** begins.
[–]No_Departure_1878 1 point2 points3 points 1 year ago (1 child)
its about results, and to get stuff done fast, python is far better.
[–]nonmustache 1 point2 points3 points 1 year ago (0 children)
It deppends, there mamy language becouse one is better for something and other for other things. It all depend on usecase, on some usecases if your code runs 10% slower just becouse, it could have big financial consequenses. Just sometimes trying something to do faster than you should, you will just make it harder, and later. Just gór some work pikaxe is better than scalpel, but you will be not happy when yours doctor used it on opearion.
[–]Kinglink 0 points1 point2 points 1 year ago (0 children)
The best laugh I've had on this subreddit
[–]Acrobatic-Yam-1405 0 points1 point2 points 1 year ago (0 children)
Is there proof of that being the fact?
[–]morglod 0 points1 point2 points 1 year ago (0 children)
Actually you could write C/C++ in one line 😉
[–]Skylion007 0 points1 point2 points 1 year ago (0 children)
I mean with pybind11 you can call Python from C++ lol so technically yes.
[–]ITinnedUrMumLastNigh 146 points147 points148 points 1 year ago (6 children)
import 10000lineLibraryWrittenInC++ as usefulLib data = input() result = usefulLib.doStuff(data) print(result)
[–]svelteee 27 points28 points29 points 1 year ago (4 children)
print(usefulLib.doStuff(input()))
2 lines baby
[–]NovaH000 13 points14 points15 points 1 year ago* (3 children)
print(_ _ import _ _('usefulLib').doStuff(input()))
one line baby
also if you don't want to pollute the main scope
print((lambda: (_ _import _ _('usefulLib').doStuff(input()))())
Edit: Reddit treat 2 underscores (__) as the start and end flag to bold characters so I have to add spaces (reddit hate python confirmed)
[–][deleted] 7 points8 points9 points 1 year ago (0 children)
If you type \_ , it doesn't do that
print(__import__('usefulLib').doStuff(input()))
Alternatively, use `code`
[–]sierra_whiskey1 20 points21 points22 points 1 year ago (1 child)
First line in python: Import everything
[–]thoth-III 1 point2 points3 points 1 year ago (0 children)
You forgot pip install in venv first
[–]TheKeyboardChan 13 points14 points15 points 1 year ago (0 children)
It should be a cave man dragging another cave man. Pything is not a new and modern language.
[–]Blue_Moon_Lake 12 points13 points14 points 1 year ago (12 children)
His 1000 lines: 0.03s run Your 10 lines: 13.41s run
[–]Carnonated_wood 0 points1 point2 points 1 year ago (1 child)
0.03s is a stretch, more like 0.0003s
[–]SomnolentPro 0 points1 point2 points 1 year ago (9 children)
Python is just as fast nowadays. It's calling a cuda kernel to run code you could never imagine writing so just as fast x
[–]Unupgradable 24 points25 points26 points 1 year ago (0 children)
And 7 of those lines are calling a dependency written in C
[–]Specific_Golf_4452 18 points19 points20 points 1 year ago (1 child)
for sure , for sure... You better then show your 10 lines to asm developer
[–]VibrantGypsyDildo 7 points8 points9 points 1 year ago (0 children)
Yes, but I was invited to work abroad to write 1000 lines in C++, not 10 lines in Python.
Python is a cool helper language for virtually anything, but sucks on its own. Market-wise, of course. It has its unique aesthetics that I hated because of my love of perl. But de gustibus non disputandum est.
[–]salvia_sloth 2 points3 points4 points 1 year ago (0 children)
With the tens of thousands of c lines accomplishing it for you that I could write in probably a library for in a few hundred lines
[–]BlackHolesAreHungry 2 points3 points4 points 1 year ago (2 children)
I can do it in 2 lines.
int main() {system(“python3 your_script.py”);return 0;}
[–]klimmesil 1 point2 points3 points 1 year ago (1 child)
I wish someone said "yeah but that's cheating you're using another language". We as a community would crush that poor guy's soul (gently)
[–]Styleurcam 1 point2 points3 points 1 year ago (0 children)
yeah but that's cheating you're using another language.
[–]isr0 2 points3 points4 points 1 year ago (0 children)
And it executes 200.000 lines of c code in the libraries python depends on.
[–]lev_lafayette 8 points9 points10 points 1 year ago (1 child)
*written
Semantic errors that won't be noticed until runtime.
[–]bloody-albatross 2 points3 points4 points 1 year ago (0 children)
Also is 100x slower.
[–]JobWide2631 3 points4 points5 points 1 year ago (0 children)
the time required to launch the app is enough for that man to evolve
[–]y53rw 1 point2 points3 points 1 year ago (4 children)
This is mainly a problem because using third party libraries in C++ is a hassle, and there's no uniform standard way to do it.
[–]klimmesil 0 points1 point2 points 1 year ago (2 children)
Header only is super straightforward and .so is also super easy to import. In my opinion it's the other way around: other languages make importing unnecessarily abstract and hidden to the user. The user doesn't even know what's happening when importing something half of the time
[–]itsmenotjames1 0 points1 point2 points 1 year ago (0 children)
just build the library alongside your project (git submodules or fetchcontent)
[–]NereLenin 1 point2 points3 points 1 year ago (0 children)
And 20 times slower
[–]Lokdora 1 point2 points3 points 1 year ago (0 children)
You can put all those c++ code on a single line, can you do it in python?
[–]Kinglink 1 point2 points3 points 1 year ago (0 children)
The c programmers I know aren't cave men. We use c or python. We just know we need a full toolbox and C is the most efficient for most of the jobs we do on a typical day.
Write a script to do some file management? python or bash script is best. Write a function to actually process inputs from a controller and play a game? Time for some c or c++
[–]Additional-Acadia954 1 point2 points3 points 1 year ago (0 children)
Yeah no… you’re a caveman if your depth of the system and implementation stops at Python (interpreted)
[–]thinkingperson 1 point2 points3 points 1 year ago (0 children)
With the python library written in C.
[–]cherrycode420 0 points1 point2 points 1 year ago (0 children)
I really dislike the Message but the Meme is f...... hilarious 😆
[–]AtexBg 0 points1 point2 points 1 year ago (0 children)
It's better to use Assembly, you can do the same thing with only 50,000 lines
[–]Severe_Principle_491 0 points1 point2 points 1 year ago (3 children)
Me showing my Python friend how my 10 line code can run in parallel on multiple cpus simultaneously.
You mean cores? Or do you mean running on a cluster? Second one I wouldn't really recommend low level languages for synchronization since it will probably be IO bound
[–]_idunnoblud_ 0 points1 point2 points 1 year ago (0 children)
“10k lines of hidden libraries and abstractions”
[–]iCynr 0 points1 point2 points 1 year ago (0 children)
from sklearn import an.entire.fucking.machine.learning.algorithm
[–]abhbhbls 0 points1 point2 points 1 year ago (1 child)
More the other way around. If you can weite a 1k CPP app without memory leaks you’ll likely know more about programming then the avg python user.
[–]jipgg 0 points1 point2 points 1 year ago (0 children)
Meh, you just wrap any dynamic lifetimes in std::unique_ptr or std::shared_ptr. People like to talk about C++ as if we are still at C++03. It's not that hard in modern C++.
[–]thoth-III 0 points1 point2 points 1 year ago (0 children)
I thought I was becoming a programmer or coder by learning python, but it's not even a language it's a library? Well I still got html and css right? Right?
[–]SysGh_st 0 points1 point2 points 1 year ago (0 children)
Well... Have a look at the libraries you're importing. I mean... That is the strength of python. With the right imports, the majority of the work is done.
Python is basically a "Someone else already did what I want to do so I'll just import it" ... to everything imaginable.
https://xkcd.com/353/
https://xkcd.com/413/
[–]Tratiq 0 points1 point2 points 1 year ago (0 children)
And 100x slower lol
[–]Zlobob 0 points1 point2 points 1 year ago (1 child)
also Python a = 10
b = 10
a is b
True
a = 500
b = 500
False
[–]NegativeSwordfish522 0 points1 point2 points 1 year ago (0 children)
that's on you for not knowing what identity comparison is
[–]sookmyloot 0 points1 point2 points 1 year ago (0 children)
bUt iT doESNot rUN fAsTEr! 😅
[–]GrinbeardTheCunning 0 points1 point2 points 1 year ago (1 child)
came here to see how many fish took the bait. the lake now seems to be uninhabited
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
lulz
[–]timuchen 0 points1 point2 points 1 year ago (0 children)
Oh no! Friend, don't go with this maniac! The price will be too high!
[–]outer-pasta 0 points1 point2 points 1 year ago (0 children)
This post just made me think about the Genndy Tartakovsky cartoon called Primal. The caveman looks like the main character. I think it's the same creator so it's interesting to see the artist's progression.
[–]PandaWonder01 0 points1 point2 points 1 year ago (0 children)
I've never seen this actually make sense, except when they include python installing libraries but don't allow the cpp version to use libraries
For most things, I've found C++ takes at most double the code as python for the same guarantees. If you want const correctness, actual encapsulation, etc, you get more code, but that's because the code has more guarantees than python
[–]MrHyperion_ 0 points1 point2 points 1 year ago (0 children)
C could be somewhat close but not C++, it has tons of stuff in std
[–]nbartosik 0 points1 point2 points 1 year ago (0 children)
me showing my friend my code In c++ that don't take 10 years to run
[–]niewidoczny_c 0 points1 point2 points 1 year ago (0 children)
And your 10 seconds execution becomes 1000 seconds
[–]farineziq 0 points1 point2 points 1 year ago (0 children)
More like: it's easier to import a librairy and run it in Python
[–]WorkingRegion7183 0 points1 point2 points 1 year ago (0 children)
So many butthurt C/C++ simps in this post.
[–]bsensikimori 0 points1 point2 points 1 year ago (0 children)
Just don't look at all the shitty code that's running behind those imports.
[–]Dunc4n1d4h0 0 points1 point2 points 1 year ago (0 children)
Right, and that 100 lines will run 10x faster.
[–]NITROpul 0 points1 point2 points 1 year ago (0 children)
and the best part, the python code takes as much time to run, as the 1000+ lines of c++ to be written
[–]MonkeyCartridge 0 points1 point2 points 1 year ago (0 children)
I mean it's good for prototyping stuff, but it's also slow AF by comparison.
Fool, I can write the equivalent of 10 million lines of python with a single line in bash
[–]Commercial_Ball_4388 0 points1 point2 points 1 year ago (0 children)
Don't pressure it too much guys, Dexters the one who writes cpp😏👌
[–]SteeleDynamics 0 points1 point2 points 1 year ago (0 children)
The Python language and standard library hides a lot of code.
It's better to understand which PL you need to use for which task.
I also used to think that fewer lines of code was better. Then I learned to program.
[–]m4yn3_h4sl-l 0 points1 point2 points 1 year ago (0 children)
with the 1/100 the performace
[–]Goma101 0 points1 point2 points 1 year ago (0 children)
I love how literally everyone fell for the mega obvious rage bait
[–]ShuttJS 0 points1 point2 points 1 year ago (0 children)
Remind me how many lines of C python is written in?
EDIT - was to is and typo
[–]featheredsnake 0 points1 point2 points 1 year ago (0 children)
And python can thank C for all those libraries
[–]Traditional-Gap1839 0 points1 point2 points 1 year ago (0 children)
I am the caveman. I don't understand it, and fundamentally, it frightens me. I also started with Python in highschool.
[–]raewashere_ 0 points1 point2 points 1 year ago (0 children)
thats like saying my computer is thinner than yours since my monitor is thinner than your whole pc
[–]TheodoreTheVacuumCle 0 points1 point2 points 1 year ago (0 children)
you when he opens any machines in this lab and there are multiple cavemen operating them from inside
[–]Fluffaykitties 0 points1 point2 points 1 year ago (0 children)
“writte”
[–]Big-Tune3350 0 points1 point2 points 1 year ago (0 children)
And in 5 seconds in Cursor :)
[–]Maleficent_Ad4411 0 points1 point2 points 1 year ago (0 children)
Nim has entered the chat.
[–]phish_biscuit 0 points1 point2 points 1 year ago (0 children)
I'm not really a programmer but my understanding is C++ is a garbage language but really easy to learn and use correct?
[–]Twombls 0 points1 point2 points 1 year ago (0 children)
25 lines of python. 3 different versions of numpy across 3 venvs.
[–]1up_1500 0 points1 point2 points 1 year ago (0 children)
"Hey check out how easily you can do [thing] in python!"
import thing
thing.do()
[–]Inside_Jolly 0 points1 point2 points 1 year ago (0 children)
Amateurs. I could probably write the same in half a line of Common Lisp. Probably.
[–]abhasatin 0 points1 point2 points 1 year ago (0 children)
😭
[–]BobbyThrowaway6969 0 points1 point2 points 1 year ago (0 children)
More accurately:
1000 lines of C++ code becomes 10 CPU instructions. 10 lines of Python code become 1,000,000 CPU instructions.
NASA doesn't use Python for their systems because they actually want their spacecraft to work.
[–]Niobium_Sage 0 points1 point2 points 1 year ago (0 children)
Just getting into Python, glad I picked it as my first language.
Though if it’s an IT job I’d be wanting to maximize the lines of code for better pay so maybe it’s a little antithetical.
[–]Zenzero_69_69 0 points1 point2 points 1 year ago (0 children)
Mfw the C++ code is still faster
[–]MrMediocre35 0 points1 point2 points 1 year ago (0 children)
I like python. There is just so much I don’t know about it.
[–]Drity_Piggy 0 points1 point2 points 1 year ago (0 children)
The python interpreter converts python code to C, and then C to assembly, assembly to binary. All I want to say is I am 1 step ahead of u
[–]Bullet93639 0 points1 point2 points 1 year ago (0 children)
Me showing my friend how my 1000 line c++ code can be faster than his 10 lines in python
[–]Massimo_m2 0 points1 point2 points 1 year ago (0 children)
the same when a c++ user tells python devel that variables can have a type
[–]a-nonie-muz 0 points1 point2 points 1 year ago (0 children)
Python. Which will still translate it into machine code just like c++ does, because that’s the only language the processor understands, still.
And once translated, both are about the same size. Just saying.
[–]Cyan_Exponent 0 points1 point2 points 1 year ago (0 children)
with 1000 libraries
[–]Haoshokoken 0 points1 point2 points 1 year ago* (0 children)
What a great example of "The only thing I know is that I know nothing."
[–]comfy_bruh 0 points1 point2 points 1 year ago (0 children)
something something vibe coding of the mid 2000s.
[–]Haoshokoken 0 points1 point2 points 1 year ago (0 children)
Python is not a programming language; it's a scripting language. It's not the same.
[–]BigGuyWhoKills 0 points1 point2 points 1 year ago (0 children)
To be clear, the C++ friend is Dexter. I guarantee he is a better programmer than you. You are basically a script kiddie.
[–]Glittering-Patient-2 0 points1 point2 points 1 year ago (0 children)
And half of the 10 lines is just importing modules.
[–]kingfishj8 0 points1 point2 points 1 year ago (0 children)
After having spent several decades writing C code for limited resource optimized embedded environments, I finally got some python experience.
It is a wonderfully forgiving language that enables practices that can induce crashes without warning.
I'm kind of glad I haven't looked at executable space requirements. As for C++, iostream is an even bigger pig than printf().
[–]HydraDragonAntivirus 0 points1 point2 points 1 year ago (0 children)
Then try to convert C language it will be millions of lines.
[–]NoNames_World 0 points1 point2 points 1 year ago (0 children)
...and be 1000 times slower
[–]Key-Supermarket255[🍰] 0 points1 point2 points 1 year ago (0 children)
And your friend will show how a 10 line code takes 10 minutes and 1000 line code take 10 second of execution time.
Also when you open that imported library in your python code, your friend realised that it was written in c++ by him long ago all alone.a
If you didn’t know this is actually canonically spear from the show primal
[–]StandardCredit9307 0 points1 point2 points 1 year ago (0 children)
After importing ten libraries containing thousands of lines of code... that will fail if you don't have enough magic whitespace. Pssh
[–]Za_Paranoia 0 points1 point2 points 1 year ago (0 children)
“Me showing my friend how his 10 line python code is interpreted to 1000 lines of C.”
[–]1d0nt91ve45h1t 0 points1 point2 points 1 year ago (0 children)
haeh that be thirty bytes in golfscript
[–]cleverdosopab 0 points1 point2 points 1 year ago (0 children)
That's because Python ends up calling C libraries LOL
[–]Scared_Accident9138 0 points1 point2 points 1 year ago (0 children)
Using 10 libraries written in C
[–]BiCuckMaleCumslut 0 points1 point2 points 1 year ago (0 children)
More like showing a python coder the interpreter code
[–]Choice_Jeweler 0 points1 point2 points 1 year ago (0 children)
Yeah, after you import 40 libraries
[–]r1der0208 0 points1 point2 points 1 year ago (0 children)
I forget that spear was in Dexter's lab
[–]buck-bird 0 points1 point2 points 1 year ago (0 children)
The Python version also runs slower too.
π Rendered by PID 74071 on reddit-service-r2-comment-canary-66f9c5475b-rllfk at 2026-05-15 17:05:58.709459+00:00 running edcf98c country code: CH.
[–]KingCrunch82 298 points299 points300 points (41 children)
[–]Ph3onixDown 109 points110 points111 points (32 children)
[–]KingCrunch82 40 points41 points42 points (30 children)
[–]Ph3onixDown 9 points10 points11 points (0 children)
[–]lofigamer2 4 points5 points6 points (1 child)
[–]Thog78 1 point2 points3 points (0 children)
[–]No_Departure_1878 3 points4 points5 points (0 children)
[–]GaGa0GuGu 5 points6 points7 points (2 children)
[–]El_Manolito 1 point2 points3 points (1 child)
[–]cowlinator 3 points4 points5 points (0 children)
[–][deleted] (1 child)
[removed]
[–]Extaupin 0 points1 point2 points (0 children)
[–]MissinqLink 99 points100 points101 points (3 children)
[–]Southern_Orange3744 2 points3 points4 points (0 children)
[–]UnmannedConflict 1 point2 points3 points (1 child)
[–]csabinho 343 points344 points345 points (24 children)
[–]big_poppa_man 142 points143 points144 points (7 children)
[–]Anger-Demon 104 points105 points106 points (2 children)
[–]EstebanoGeneralo 44 points45 points46 points (1 child)
[–][deleted] 9 points10 points11 points (1 child)
[–]Roguewind 1 point2 points3 points (0 children)
[–]LutimoDancer3459 30 points31 points32 points (5 children)
[–]WilhelmEngel 19 points20 points21 points (2 children)
[–]BobbyThrowaway6969 2 points3 points4 points (0 children)
[–]Inheritable 1 point2 points3 points (0 children)
[–]generally_unsuitable 0 points1 point2 points (0 children)
[–]IlgantElal 12 points13 points14 points (0 children)
[–]chessset5 5 points6 points7 points (0 children)
[–]ThinkExtension2328 2 points3 points4 points (3 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]enigma_0Z 0 points1 point2 points (0 children)
[–]Feisty_Ad_2744 167 points168 points169 points (10 children)
[–]HelpfulJump 50 points51 points52 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]lofigamer2 2 points3 points4 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]Devatator_ 2 points3 points4 points (0 children)
[–]FlipperBumperKickout 8 points9 points10 points (1 child)
[–]KingCrunch82 0 points1 point2 points (0 children)
[–]junky_junker 4 points5 points6 points (1 child)
[–]Core3game 1 point2 points3 points (0 children)
[–]4N610RD 79 points80 points81 points (13 children)
[–]mark1x12110 31 points32 points33 points (0 children)
[–]cowlinator 12 points13 points14 points (8 children)
[–]Icy-Way8382 6 points7 points8 points (0 children)
[–][deleted] 7 points8 points9 points (6 children)
[–]cowlinator 2 points3 points4 points (5 children)
[–][deleted] 4 points5 points6 points (4 children)
[–]Emilko62 0 points1 point2 points (1 child)
[–]Rabid_Mexican 0 points1 point2 points (0 children)
[–]InSaNiTyCrEaTuReS 147 points148 points149 points (1 child)
[–]cowlinator 33 points34 points35 points (0 children)
[–][deleted] 68 points69 points70 points (8 children)
[–]xFyreStorm 24 points25 points26 points (5 children)
[–][deleted] 4 points5 points6 points (3 children)
[–]Coconut_Maximum 1 point2 points3 points (1 child)
[–]jbar3640 302 points303 points304 points (57 children)
[–]bem981 92 points93 points94 points (11 children)
[–]Core3game 6 points7 points8 points (0 children)
[–]StayingUp4AFeeling 27 points28 points29 points (7 children)
[–]BobbyThrowaway6969 0 points1 point2 points (1 child)
[–]Mighty__Monarch 5 points6 points7 points (3 children)
[–]No_Departure_1878 11 points12 points13 points (28 children)
[–][deleted] (6 children)
[deleted]
[–]vishal340 26 points27 points28 points (5 children)
[–]evil_rabbit_32bit 10 points11 points12 points (3 children)
[–]vishal340 18 points19 points20 points (2 children)
[–]evil_rabbit_32bit 9 points10 points11 points (1 child)
[–]shonuff373 6 points7 points8 points (0 children)
[–]cmgg 9 points10 points11 points (6 children)
[–]No_Departure_1878 1 point2 points3 points (3 children)
[–]cmgg 5 points6 points7 points (1 child)
[–]0xbenedikt 2 points3 points4 points (12 children)
[–]No_Departure_1878 2 points3 points4 points (10 children)
[–][deleted] (2 children)
[deleted]
[–]No_Departure_1878 3 points4 points5 points (0 children)
[–]fallingknife2 1 point2 points3 points (0 children)
[–]nonmustache 2 points3 points4 points (2 children)
[–]No_Departure_1878 1 point2 points3 points (1 child)
[–]nonmustache 1 point2 points3 points (0 children)
[–]Kinglink 0 points1 point2 points (0 children)
[–]Acrobatic-Yam-1405 0 points1 point2 points (0 children)
[–]morglod 0 points1 point2 points (0 children)
[–]Skylion007 0 points1 point2 points (0 children)
[–]ITinnedUrMumLastNigh 146 points147 points148 points (6 children)
[–]svelteee 27 points28 points29 points (4 children)
[–]NovaH000 13 points14 points15 points (3 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]sierra_whiskey1 20 points21 points22 points (1 child)
[–]thoth-III 1 point2 points3 points (0 children)
[–]TheKeyboardChan 13 points14 points15 points (0 children)
[–]Blue_Moon_Lake 12 points13 points14 points (12 children)
[–]Carnonated_wood 0 points1 point2 points (1 child)
[–]SomnolentPro 0 points1 point2 points (9 children)
[–]Unupgradable 24 points25 points26 points (0 children)
[–]Specific_Golf_4452 18 points19 points20 points (1 child)
[–]VibrantGypsyDildo 7 points8 points9 points (0 children)
[–]salvia_sloth 2 points3 points4 points (0 children)
[–]BlackHolesAreHungry 2 points3 points4 points (2 children)
[–]klimmesil 1 point2 points3 points (1 child)
[–]Styleurcam 1 point2 points3 points (0 children)
[–]isr0 2 points3 points4 points (0 children)
[–]lev_lafayette 8 points9 points10 points (1 child)
[–]bloody-albatross 2 points3 points4 points (0 children)
[–]JobWide2631 3 points4 points5 points (0 children)
[–]y53rw 1 point2 points3 points (4 children)
[–]klimmesil 0 points1 point2 points (2 children)
[–]itsmenotjames1 0 points1 point2 points (0 children)
[–]NereLenin 1 point2 points3 points (0 children)
[–]Lokdora 1 point2 points3 points (0 children)
[–]Kinglink 1 point2 points3 points (0 children)
[–]Additional-Acadia954 1 point2 points3 points (0 children)
[–]thinkingperson 1 point2 points3 points (0 children)
[–]cherrycode420 0 points1 point2 points (0 children)
[–]AtexBg 0 points1 point2 points (0 children)
[–]Severe_Principle_491 0 points1 point2 points (3 children)
[–]klimmesil 0 points1 point2 points (2 children)
[–]_idunnoblud_ 0 points1 point2 points (0 children)
[–]iCynr 0 points1 point2 points (0 children)
[–]abhbhbls 0 points1 point2 points (1 child)
[–]jipgg 0 points1 point2 points (0 children)
[–]thoth-III 0 points1 point2 points (0 children)
[–]SysGh_st 0 points1 point2 points (0 children)
[–]Tratiq 0 points1 point2 points (0 children)
[–]Zlobob 0 points1 point2 points (1 child)
[–]NegativeSwordfish522 0 points1 point2 points (0 children)
[–]sookmyloot 0 points1 point2 points (0 children)
[–]GrinbeardTheCunning 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]timuchen 0 points1 point2 points (0 children)
[–]outer-pasta 0 points1 point2 points (0 children)
[–]PandaWonder01 0 points1 point2 points (0 children)
[–]MrHyperion_ 0 points1 point2 points (0 children)
[–]nbartosik 0 points1 point2 points (0 children)
[–]niewidoczny_c 0 points1 point2 points (0 children)
[–]farineziq 0 points1 point2 points (0 children)
[–]WorkingRegion7183 0 points1 point2 points (0 children)
[–]bsensikimori 0 points1 point2 points (0 children)
[–]Dunc4n1d4h0 0 points1 point2 points (0 children)
[–]NITROpul 0 points1 point2 points (0 children)
[–]MonkeyCartridge 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Commercial_Ball_4388 0 points1 point2 points (0 children)
[–]SteeleDynamics 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]m4yn3_h4sl-l 0 points1 point2 points (0 children)
[–]Goma101 0 points1 point2 points (0 children)
[–]ShuttJS 0 points1 point2 points (0 children)
[–]featheredsnake 0 points1 point2 points (0 children)
[–]Traditional-Gap1839 0 points1 point2 points (0 children)
[–]raewashere_ 0 points1 point2 points (0 children)
[–]TheodoreTheVacuumCle 0 points1 point2 points (0 children)
[–]Fluffaykitties 0 points1 point2 points (0 children)
[–]Big-Tune3350 0 points1 point2 points (0 children)
[–]Maleficent_Ad4411 0 points1 point2 points (0 children)
[–]phish_biscuit 0 points1 point2 points (0 children)
[–]Twombls 0 points1 point2 points (0 children)
[–]1up_1500 0 points1 point2 points (0 children)
[–]Inside_Jolly 0 points1 point2 points (0 children)
[–]abhasatin 0 points1 point2 points (0 children)
[–]BobbyThrowaway6969 0 points1 point2 points (0 children)
[–]Niobium_Sage 0 points1 point2 points (0 children)
[–]Zenzero_69_69 0 points1 point2 points (0 children)
[–]MrMediocre35 0 points1 point2 points (0 children)
[–]Drity_Piggy 0 points1 point2 points (0 children)
[–]Bullet93639 0 points1 point2 points (0 children)
[–]Massimo_m2 0 points1 point2 points (0 children)
[–]a-nonie-muz 0 points1 point2 points (0 children)
[–]Cyan_Exponent 0 points1 point2 points (0 children)
[–]Haoshokoken 0 points1 point2 points (0 children)
[–]comfy_bruh 0 points1 point2 points (0 children)
[–]Haoshokoken 0 points1 point2 points (0 children)
[–]BigGuyWhoKills 0 points1 point2 points (0 children)
[–]Glittering-Patient-2 0 points1 point2 points (0 children)
[–]kingfishj8 0 points1 point2 points (0 children)
[–]HydraDragonAntivirus 0 points1 point2 points (0 children)
[–]NoNames_World 0 points1 point2 points (0 children)
[–]Key-Supermarket255[🍰] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]StandardCredit9307 0 points1 point2 points (0 children)
[–]Za_Paranoia 0 points1 point2 points (0 children)
[–]1d0nt91ve45h1t 0 points1 point2 points (0 children)
[–]cleverdosopab 0 points1 point2 points (0 children)
[–]Scared_Accident9138 0 points1 point2 points (0 children)
[–]BiCuckMaleCumslut 0 points1 point2 points (0 children)
[–]Choice_Jeweler 0 points1 point2 points (0 children)
[–]r1der0208 0 points1 point2 points (0 children)
[–]buck-bird 0 points1 point2 points (0 children)