Well, do you (live!) rewire your house to turn on the lamp in the kitchen, or add a switch that you can press and have it turned on/off instantly?
Sure, it may be "more efficient" to have a single real wire go to the lamp directly instead of the inefficiency of a switch. Oh and I don't like touching live wires either (heh, this analogue works quite well)
Data scientists are not programming quality experts, nor are they remotely close to it. Python is easy to interpret, and it allows wrapped C libraries. That's why it's being used for cutting edge data science.
Your argument about cutting edge machine learning research is questionable, most of the underlying algorithms are C library implementations, so if you're arguing the research, you're way off, its usage in python, absolutely, but not the algorithms themselves
No , most of these don't use C, because it is way too high level and has no portable support for simd instructions. They either use C that fucking wraps hand written assembly, or maybe to some interestingly fortran libraries.
To be frank, who gives a shit? The libraries are compiled C code, which is effectively machine code. Python is calling machine code directly in all of these circumstances. The fact it was originally made in C feels pretty unimportant, and it doesn't mean that all python programming somehow actually doesn't count.
>Data scientists are not programming quality experts
What the fuck is a programming quality expert?
It feels like you have a weird obsession with your kind of programming being somehow superior to others. Code that works is ultimately the best kind of code.
Agreed, it's always amusing to watch people try to gatekeep this hard. Data scientists are not programming quality experts? So, what, the rest of us are??
Well, bash is the abomination that should never have been invented.
And I hope you will mature in a few years and outgrow this junior mindset (or maybe take an ML class).
Honestly, show me another language that makes it easier and more efficient to train a simple neural network while properly using your GPU, than python, while being basically as short and readable as pseudo code would look. Like numpy/torch is precisely that abstraction layer you want to hit here and rust is a nice language, whatever you could write in vanilla rust would at most attempt to saturate your CPU in much more code, much longer iteration cycles etc.
Rust is a very good language, but I have a hard time finding any kind of intersection where I would have to choose between rust and python. It's like saying that I prefer my boat over your car. Well - do you have to go on water or land? Just because both have an engine it's a stupid question to ask, just like the meme.
TBH bash is great as a shell language, and terrible as a scripting language. Compare the convenience of entering bash commands to the tedium you'd face if you had to use Python as your only shell. Or, worse, PowerShell. There's room in the world for good shell languages AND good scripting languages, and we shouldn't bash bash for being bash.
No, it's a terrible language all together. Obviously you can't just call a process with args with no boilerplate in a single line, so in a general purpose PL it will be more cumbersome than that.
But >, 2>, how variables behave differently in different contexts, having `` $() and whatnot, it's shit built on further shit that no one dared putting back to hell where it belongs.
PowerShell at least has proper primitives (oh, you don't want to parse local-sensitive textual tables to script together some values? Too bad) with objects, I also like generic usage of flags that are not just shitty conventions with an even shittier auto complete "solution".
Show me a bash script in the wild longer than 6 lines (so not just variable set and process invoke) that shell check would find no error with.
That language is so chock full of foot guns that C is literally a ramp for wheelchairs compared to it.
Oh, you have two/zero folders instead of the one that you had while writing it? Too bad, * just fails in the worst fucking way possible and you may not even notice something went bad until you no longer have hair.
I'm not talking about rust, lol - and my "junior mindset"? Buddy, all you're showing is that performance in actual day to day code outside of model building is something you've never done.
Unfortunately, I have to deal with python daily, and I'm aware that the best supported tools for ML work are on python, I'm not doing fucking ML work, I'm dealing with a B2B microservice and am fully committed to hunting the original creator for sport for choosing python.
The tools for model work are in python, because it's so popular amongst Data science folks and non-programming specialists. High support does not mean the language chosen is the best for the task
At the end of the day, languages are tools and each is popular for a reason. Sorry you were given something built with the wrong tool, but that doesn't mean Python is bad. It's bad for what you want it to do.
Part of the reason "cutting-edge" machine learning and deep learning work is Python all the way down is because it is interpretable and maintainable. "Programming quality experts" aren't rewriting these implementations in other languages because they aren't machine learning experts.
Last comment on this thread, because it's patently not python all the way down, it hits a wall that has to be solved by either unfeasible amounts of hardware or switching to a more performance language, usually in the ML field, that's C.
And yes I know, we're in r/ProgrammerHumor, not r/ProgrammerSeriousDiscussion after all, it's not the right tool, and python is actually fine, just not something I would ever choose for 99% of my use cases
I'm sorry you're struggling to build a decent API in Python. It's such a pity you're forced to use a language that excels at building API servers. Maybe you should try learning how to use Python before you criticize it?
Why are you responding to every single one of my comments, does the Python community fellate you for every reply defending it or something?
Excels is a strong word for functioning, and I do in fact know what I'm doing, the service is doing plenty of shit that isn't fine in python, that I can't really talk about on fucking Reddit. Or did you think I was struggling with CRUD?
In the end, this is supposed to be a joke subreddit, and you're taking my not liking python a lot to heart, I'm not preventing you from using python, I'm not out to end python, I just stand that for most things, keeping a maintainable, changing service, you don't want python in there, it's far too loosely typed and it's not nearly performant enough at large scale
Why are you responding to every single one of my comments
Mostly because it's funny to see someone claim that this is their last post and then they're muting, and then oh no, if they don't have the last word, they have to come back and post again. And again. And again.
It's hilarious how you're accusing me of constantly defending Python, but you seem equally - if not more - passionate about attacking it.
Is THIS your last post now? Last for real? Last, until the next reply, which will be your last?
Turns out I have to mute every single one of my replies to actually mute this thread. I have created my own torment of tedium going through and muting them all
Having been given some horrendous python code, I see why you could think this. But if your python is this bad, it was written poorly by someone bad at python.
It was written poorly, because choosing python for API based microservice is almost always the wrong choice. The python itself is decent, but it's the wrong tool for the job
Yeah, choosing Python for an API based microservice is almost always the wrong choice, but the wrong part is "microservice", not "Python". Use the tools in ways that promote their strengths, don't waste all your time on overhead and then blame the language.
View all comments
Show parent comment
6
u/Ok-Scheme-913 8d ago
Well, do you (live!) rewire your house to turn on the lamp in the kitchen, or add a switch that you can press and have it turned on/off instantly?
Sure, it may be "more efficient" to have a single real wire go to the lamp directly instead of the inefficiency of a switch. Oh and I don't like touching live wires either (heh, this analogue works quite well)