Why is this loved by everyone?

why is this loved by everyone?

Attached: 2000px-Python-logo-notext.svg.png (2000x2000, 157K)

because its easy and can do stuff

programming is just a tool

this + there's libraries for everything.

last year I was working on a side project that needed to grab what was currently playing on SiriusXM - lo and behold, someone wrote a library that specifically did that. What other language would have niche little libraries like that?

it makes you highly productive and it's actually well designed

Attached: https:--upload.wikimedia.org-wikipedia-commons-a-a5-Python_natalensis_constricts_a_goat%2C_Zimbabwe. (209x307, 25K)

>loved by everyone
Is not

Attached: python-sucks.jpg (400x400, 65K)

It's absolute snake shit

Whats wrong with it

Lmao

It's mostly loved by people who know Python only.

This. There is a huge number of people (ML, stats, bio, etc) who don't really know how to program that well but they get taught this language to do some basic things in their field using specific packages. Nothing wrong with it since more people should program and python is an easy language to learn.

Unfortunately, since that makes it a very popular language, it gets recommended a lot even though it's a shit language. Furthermore, due to the rise in popularity in CS, the percentage of people with little experience is very high, but since they don't actually know how little experience they have, they anonymously post in internet forums wrong and stupid opinions (like python being a good language) with full confidence. Another factor is that due to capitalism, the people who dictate what most engineers do are managers with relatively little experience and owner class people who mostly have no experience. These types of people tend to go with what seems to be popular and this cycle also ends up with python being a desirable language in job advertisements.

Anyway, in conclusion, you should learn python since it's easy to learn and used almost everywhere, but you should recognize that it's a very shitty language and minimize how much you use it.

There's libraries up the ass, so any retard can just come and pass create.Simulation() without actually doing any thinking

It's the best programming language since it is what Torvalds used to build the Linux kernel.

how the FUCK do i start fucking learning this thing

bait or retard?

Because it lets you get work done and Jow Forums hates it because its a practical tool.

Attached: capybara-eating.gif (390x259, 989K)

bait or retard?

its just convenient for shit you want to write fast but don't need to run fast. its a tool, it has its job. But like any tool you can't just fucking shove it anywhere. I wouldn't go thru the toil of writing and compiling a C program for a task I just need done once and quickly, and I'm not going to use python for a large application that needs to run often and efficiently.

This. Python trades runtime efficiency for developer efficiency, which in a lot of cases is more important.

I am a mechanical engineer and I use python because of machine learning and because I like it better than matlab for graphing and stuff. I know it's considered babby language and not very efficient compared to C, but it just does what I need it to and that's all I need.

Because you can do everything, in the niche cases you need high performnance you still can make a library in C and glue it with Python

Being dogmatic about programming language choice is not a good look. Whenever I hear someone say 'X language is shit because Y' I immediately know they're a fucking idiot who either:
a) spends too much time arguing about this dumb shit on the internet, and not enough time actually programming. Guess what idiots, there are probably people who are about 10x more productive than you because they spend their time mastering a language (any fucking language), and don't spend their time arguing about which one to use.
b) they're usually closed-minded idealists who have retarded concepts of what "real" programming is, and for some reason think that they're better than everyone else because their language has pointers, or it has monads or it has some other unique quality to it. They think that their favorite language is the answer to every, and all problems, rather than approaching the problem from an abstract way, and then picking out the correct language for the job.

The amount of times I've talked to people about starting a project and the first thing they want to decide is what language to use is astonishing. Pick the right tool for the job: wanna right a small script that renames your anime files after your torrent is done? Just use Python and save yourself some fucking time trying to prove how cool you are by doing it in C or ASM or some other shit that isn't suited for the job. Working in a big group with many programmers of varying skill? Use Java, a mean shit... it was designed to make working on large projects easy. Working on an OS? Using anything other than C is basically retard territory.

Also queue copypasta about python.

Because other programming languages did not set up a proper way to integrate third party libraries.

Trying to use a third party library in a language like C++ is a nightmare.

In python, its 1 line. 1 single line. "import xyz" If you don't have that library on you, its again 1 line "pip install xyz"

That's the only difference. Python is extremely easy to use because how easy it is to use third party libraries.

Why is this loved by everyone except Jow Forumstards ?

Attached: 124124214.png (800x400, 141K)

>The amount of times I've talked to people about starting a project and the first thing they want to decide is what language to use is astonishing.
This is because they are scared of languages. Too many developers are monolingual and things which don’t resemble Java or C scare them. So they attempt to end the conversation by pushing what they know.

>Unfortunately, since that makes it a very popular language, it gets recommended a lot even though it's a shit language.
As opposed to what? Sometimes a fast-development scripting language is called for, and everything else is much worse.

It's easy to do stuff with it but if you're doing anything that isn't a simple script with Python you should actually probably kill yourself

Because it is one of the most lisp-like languages and it has good libraries.

In what universe? Depending upon the application (mine) its horrible for both. It just has a fuck ton of libraries.

It has its uses but I wrote that mainly because I have seen many people use the language for things it's not suitable for. One is just creating anything beyond a simple script using python. Another is webservers, which languages like go or elixir are better at. And statistical analysis and plotting, which R is better at. Fast numerical code, which C++, Fortran, and Julia are better at. I've seen people build GUI's using python that runs numerical calculations using for loops. Horribly slow.

I mean it gets the job done and if you want a quick and dirty prototype, it's fine to use. But for actual applications that need to be reliable and easy maintained, and need some amount of speed, I avoid it.

Also the language itself, ignoring the libraries (which are many and useful), is just horrible. And the official implementation is programmed by just really stupid people, resulting in a very slow language and a brittle implementation.

>most lisp-like
>python

why is Jow Forums filled with retards?

>Also the language itself, ignoring the libraries (which are many and useful), is just horrible. And the official implementation is programmed by just really stupid people, resulting in a very slow language and a brittle implementation.

Attached: 24FCFCCC-0638-457C-A7A1-D25DA03F0060.png (2000x2248, 122K)

If average Jow Forumstard would saw R, he would screech even louder than at python.

R is carried by it's libraries (mainly tidyverse) so much that it isn't even funny

It isn't. Non-retards just use bash.

>And statistical analysis and plotting, which R is better at.
R is a pain in the ass and nobody in the field uses it anymore

>Fast numerical code, which C++, Fortran, and Julia are better at.
If you're using numpy, all your code is running in C++ behind the scenes anyway

>R is a pain in the ass and nobody in the field uses it anymore

tidyverse

>Another is webservers, which languages like go or elixir are better at.
Depends, performance in web applications isn't always critical.
>Fast numerical code, which C++, Fortran, and Julia are better at. I've seen people build GUI's using python that runs numerical calculations using for loops. Horribly slow.
Pure Python is obviously very bad for this, but libraries like Numpy alleviate the performance issue. This is why Python took off to begin with, offloading the slow parts to C is much easier than in other scripting languages. Good Python software is usually built on faster libraries.
>Also the language itself, ignoring the libraries (which are many and useful), is just horrible.
Define horrible. Obviously a dynamic interpreted language will have pitfalls, but that's expected when looking for one. Everything else just sucks much harder, especially Ruby.

>Depends, performance in web applications isn't always critical.
This is the wrong way to say this. Performance is always important, however web applications tend to be only IO bound, so the benefit of pure code optimizations is limited.

What's your application? I don't disagree that it's not at all the right tool for the job in some cases. I work at a large tech company and while Python is all over since it can be iterated on very quickly, C++ is used more and tends to be for anything that needs to be performant.

>Be me
>Struggle with programming
>Follow 1hr python tutorial
>Doing cool stuff quickly after completing it
Python is easy to learn even for retards like me and is the reason I enjoy programming occasionally.

>In python, its 1 line. 1 single line. "import xyz" If you don't have that library on you, its again 1 line "pip install xyz"

Except when it's only available via conda. And I hope you remembered to run the right version of pip. Oh were you not in the right virtual environment? Well try again I guess. Shit, what environment was I using again? There we go. Fuck, I need python 3.6.8 for this not 3.7!

repeat ad nauseam

Long running testing and simulation frameworks that has a long startup time.
>5 minutes in "whoops a type error deep in the piping, what fun".
>3 hours in "whoops, looks like some piping issues caused the data to not be saved after the sim... better run it again".
Turn around time on preventable bugs that could be caught with a static type system is horrible. Turn around time on bugs in general is horrible.

Writing models for simulations doesnt take long, writing the product code doesnt take long, using fucking Python setting up the testing environment (correctly) takes the longest in the process BY FAR. It's also usually the largest peice of code. Somethings just off with the this process and Python makes it that much more difficult.

In that case yeah wrong tool. We've got a data processing framework written in Python with decorators everywhere providing typing and it's a fucking mess (and the typing itself makes it slow as hell too).

Is the fucking best language ever, it was used for processing all the data for the image of the black hole

h-honto desu ka?? onii chan

Violent python. Geohot.

I'm the guy you replied to and I use R for stats and plotting all the time. Ggplot, data.table and tidyverse makes R into much more than the actual language.

Not saying it's not a terrible language because it is (just too many issues to talk about), but like python, the libraries make up for it.

Why not use MyPy?

Jow Forumstards get buttblasted over it after pouring their heart and soul into deprecated building blocks.

Attached: 1407053003384.jpg (601x583, 141K)

The guy who created it is named Guido ffs. Anyone who is named Guido should just rope themselves

99% of python devs dont use conda. They straight out use the standard python. Standard python repository contains ~100K different third party libraries. That work on 1 line.

>due to capitalism
>not due to managerial incompetence
ok

Oh it absolutely is. But it's the hot new thing all the managers and older engineers like. Honestly, the way we right the tests, Go would work well.

Have you actually tried installing python packages in Ubuntu (or any other linux)? Pip (or whatever the fuck package manager is in fashion these days, why the fuck does python still not have an official package manager) doesn't come installed and you have to install it separately. Wait, do I install pip3 or pip? And why do I need root access to install packages? Okay, fuck this noise, I'm downloading conda. Okay, what the fuck is this "source activate" shit and why do I need that to run python. And what the fuck are environments? (To all the dumb people: I know what all these are but I'm illustrating how someone would be frustrated by it)

Python environments arent the sanest thing desu.

Can't say I hate it, nor do I have a lot of experience with it. I do think it's quite a useful tool, though. Whenever I want to script/automate something but it requires more complex logic than what I really want to dump into a shell script, Python is what I go for. It's multiplatform and basically universal on Linux distros, the syntax is simple and easy to understand (or the things I use are, at least) and you can probably find a library for whatever you need in a quick and dirty script. Libraries are also easily installed via pip, no headaches there at all.

I've written quite a few small scripts using it and I use them frequently or they are part of things which I have automated.

it's easy to learn

This is still a hundred times more approachable to the average idiot than static vs shared libraries, linking, and writing makefiles.
From experience, the code monkies just run everything as super user and install all packages globally until their system breaks. Then they nuke everything and start the process over.

It's not actually well designed at all. But it's convenient and productive so it gets a pass.

This. Developer time is more expensive then hardware time

It did runtime type checking of every input and output of the operators, MyPy is only static.

>It's not actually well designed at all.
Can you elaborate?

Write it in python, rewrite it in C. Prototyping is a valuable thing in the creation of something new. 3D Printers are a great example of this.

It is loved by scientists who have never used any other language.

Python seems like a terrible choice now if those are your requirements then.

It's only loved by baseddevs, that is all.

Python is to 3d printers as C is CNC machining as C++ is to assembly line production.

it's easy
if speed is an issue, stop using standard CPython -- a script I wrote doing image processing that takes like 15 seconds in CPython takes less than 1 in PyPy on the same image
and most of the library support issues PyPy had are gone now, so there's really no excuse to use slow shit CPython

Just look at the notation for objects, it’s a mess. Half the functionality is implemented with decorators and hidden variables which you are free to overwrite and break your code.
The semantics between in place operations and copying are also unintuitive. If a = 1, a += 1 increments a in place but a = a + 1 creates a new int which shadows the original. This becomes really bad once you start working with list slices, where it’s very easy to copy a large list instead of just referencing a part of it; doing that efficienctly requires using buffer protocol.
Nested functions must also be reinstated every time you call the parent function, which is behavior most people don’t even consider.
List goes on and on...

it's just a modern matlab. Used by people that program all day that aren't real programmers

nodejs

Yep this is exactly what I find frustrating about python (I'm ).

>This is still a hundred times more approachable to the average idiot than static vs shared libraries, linking, and writing makefiles.

you're probably right. But as a long time C dev, compiling and linking to shared libs seems so much more natural to me.

Are you kidding me? So your options are either python or C?? Get the fuck out.

Do you know how easy it is to install and use packages in R? It's seamless. Same for elixir, julia and plenty of other languages.

Python has been popular for more than a decade and it still has a shitshow for managing something as simple as packages.

user you forgot to mention significant whitespace

Why doesn't it have a single good game engine?

>Do you know how easy it is to install and use packages in R? It's seamless. Same for elixir, julia and plenty of other languages.
Every language with a package/dependency manager will run into the same sets of problems eventually, the main being local vs global installation. The same choice is per project, but that can lead to significant redundancy when working on many projects. None of them are perfect, but better than forcing your average user to manually manage all of it.
Python has the additional complication of being an integral component of most distros which expect to use the global installation and cause problems when you muck up the package versions. This is honestly more on the distro vendors for not sand boxing their dependencies, but oh well.

Not a problem if you have your editor configured correctly and your coworkers can be trusted to do the same. If you can’t get that much right then you probably have no business writing software professionally.

It's the FOSS world's Visual Basic without any of the Microsoft stigma. It has a straight-jacketing syntax that prevents amateurs from hurting themselves too badly off the bat. It has tons of add-on libraries (typically written in a language that does actual work). It isn't nearly as intimidating as a real system programming language.

Attached: 1412473719922.jpg (420x393, 21K)

Freebasic but slower then?

You have never written a large application that needs to run often and efficiently.

...

because it's not fast enough for graphics programming with a high poly count

Civ4 was made in Python, which explains a lot.

the issue is that the language is trying to tell me how to format my code by literally altering behavior based on how it's indented. that is terrible design and is completely solved by an end statement or alike.

It's halfway Lisp with more familiar syntax brainlets can grok.

Way more bloated than Python

It wasn't made entirely in python.

Questions like "why wasn't this huge game made in x language" are brainlet triggering because it shows ignorance and no familiarity with the multiple components in a modern game. For instance, try using unreal engine where development is done in C++, build scripts in C#, editor scripting in Python, along with shaders built in HLSL

Then go use Ruby, end statements are ugly verbosity which is only needed for people who insist on having their own special snowflake formatting. For everyone else, white space works fine.

What's the best IDE for python?
I heard good things on pycharm

vim

(or emacs if you're gay)

What's wrong with emacs? (I just want to know my possibilities)

I felt the same at first but in practice you'll be conforming to some form of indentation rules in other languages if you do any sort of collaboration.

It's easy to learn
It has an easy to read syntax
It has a library for everything
It's flexible
It's not JavaScript
It has good tooling
It's portable
It isn't a memory hog (compared to node.js or the JVM)

It's what I use when I need something more robust than a shell script but don't care much about performance. It's the Chad of scripting languages, basically.

The only reason why I use and have learned to be proficient in Python is because it's the scripting language you use for writing scripts in Blender 3D. Had Blender opted to use any other scripting language, that's what I would've learned. That said, I really do use Python for a lot of automation tasks, I'm quite married to it at this point.

Numpy, Scipy, h5py, cartopy, matplotlib and IPython. Those cover 98% of my data analysis requirements.

I wrote a 200 line Python script last month that saved me six months of mouse clicking drudgery. Programming is all about using computers to make your life easier or better, and Python excels at this for a ton of stuff.
>friendly syntax, including some great tricks for compact but readable code (list comprehensions chief among them)
>tons of libraries
>open source
>preinstalled or one command away on any modern *nix
>easy to punt most forms of hard computation to a C library
>doesn't require an IDE, but severalbare available anyways
>possible, albeit not trivial, to wrap up into a single binary per platform for distribution

If you only know one language aside from your OS's shell, Python is a great place to start.

Stockholm syndrome justification

>the language is trying to tell me how to format my code
The language is telling you to format your code correctly. Any not-shit editor will help manage it for you, so it's only noticeable if you're an autist that insists on scrunching everything into one line.

Emacs in its default configuration literally induces RSI in long term users. Use a config kit like Spacemacs if you don't want to spend six months beating it into shape by hand hacking configuration files.

Bait or retard?

It's brainlet friendly.