Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
hexc11206yLol, I kinda wish python wasn't a thing, it annoys me that it's what ML libs decided to target even know it's to slow so all the backend code is in c/c++... Like why python when you have so many better languages, not saying they shouldn't target python just saying they should have the same support for some of the other main stream language... RAGE!!
-
endor56706y@hexc because it is much easier to work with and maintain for most people working with it - many of which are not professional programmers, but researchers in many different fields who need some programming done.
Python is great, because it allows you to put together a solution far more quickly than most other languages. And since it's such a popular language, there will be many packages and libraries who will do most of the work for you, so all you need is to just put the pieces together and let it rip.
Sure, C++ and other compiled languages have much better runtime performance, but the time you save during runtime is often offset by the extra time required to write the code and set up the environment. And then you can integrate it in whatever project you have with much greater ease.
It's a tradeoff, and a pretty good one at that. If it weren't, it wouldn't be so popular -
c3ypt1c96636yI don't think python should be ran for every occasion. Its special purpose is number crunching and data analysis.
-
EliaP736y@hexc What language do you think should be used instead?
IMO, I don't want to offend anyone, just my two cents:
Java is ugly and very verbose. Also it requires a VM. Sure, you can bundle some kind of executable but the VM is at least 50-100MB. I can only understand its usage for serverside applications to be honest.
Python itself is just a language. The official interpreter is slow yes but there are many others.
PyPy is a just in time compiler much faster than the default one.
Cython compiles to C code.
Both of these can outperform java without much effort and in some very particular cases even c++.
Python can run C and C++ extensions for critical sections that require performance. This is what all scientific or cpu intensive libraries do.
Also nowadays cpu is rarely the limiting factor compared to network and io and even if that was the case you can write that particular cpu intensive task in C and call it from python. -
EliaP736y@hexc C/C++ are great options for building applications IMO but don't you think they're too old, too verbose, too much boilerplate to write an entire program in? Sure the performance will be great but how much time will it take to write?
Also I suggest you read this, it may change your perspective on python
https://medium.com/@3de6fa310805/... -
hexc11206y@EliaP I'm not saying you have to use c++ specifically, many other languages are much more preformant than python, hell even JavaScript is considerably faster https://benchmarksgame-team.pages.debian.net/... python is basically just crap all around and I've got no idea why it's still a thing. And as far as writing a full application in c++, it's really not that hard, sure there is a good amount of boilerplate but some IDEs can take care of the majority of that for you.
-
@hexc python has got its niche, and personally I like it best from all the scripting languages. Performance is just not as important to scripting languages as writing code quickly and easily is.
Though I agree that there should be more libraries for other languages like C++, especially because you hear that a lot of what ML can do is limited by performance. -
EliaP736y@hexc I just said that python is just a language and if you're looking for performance that are many other interpreters that are much faster and easily outperform java, c#, etc.. :/
If you want to understand why Python is great just read the article for a full view (It's like 5 mins) but it basically boils down to development time.
JFYI The backend of the MMORPG Eve Online with thousands of players in the same server is made with python. Of course they used a different implementation that the official one (The slow one) and they probably wrote C here and there but in the end, it's python, and it works -
flocke2606y@hexc @EliaP I have worked with Python, C and Java before and they are all good languages with their specific use cases.
During my PhD I basically only use Python for my numerical computations since it's easy to write and I don't need every little ounce of performance I can get. I don't really want to write a whole C program if I just want to quickly integrate or plot something. And I haven't found anything as good for numerical computation as numpy and scipy in any other language. -
RageBone5906yJust a small unrelated fact.
Intel ME runs Java.
A flavour called JEFF.
And to be precise, it's used for iAMT or vPro remote management.
And maybe other things.
Related Rants
"Java runs on 3 billion devices"
joke/meme
device
python
java