I'm majoring in Sociospatial studies and I'm currently learning python and R. I been a lurker for a long time in this board and I frequently encounter hostile opinions towards these languages, particularly py. Is there any reason for not learning it first? I'm not going to be a developer anyways, I just need to analyse data.
Why do you all hate python?
take any opinion on here with a grain of salt. the majority of this board is Jow Forums crossposters nowadays, if I were you I'd jump ship and find a comfier niche imageboard like arisuchan where people actually know their shit.
Python is fine for that purpose
>I frequently encounter hostile opinions towards these languages, particularly py
It has really awful performance, which is fine for rudimentary automation tasks and gluing actually performant code together. The problem is that a bunch of people use it as their primary language for everything and write a bunch of software that runs much slower than it should because it's written entirely in python. People on Jow Forums tend to see that kind of python software and develop a distaste for the language because of the generally poor quality of a lot of what's made with it. As far as opinionated generalizations go, it's a fairly valid one since the inefficiency is as much Python's fault as it is the developer's choice to use it.
>Is there any reason for not learning it first? I'm not going to be a developer anyways, I just need to analyse data.
That's a perfectly valid use case for python.
Name one program that is slow because it is written in python.
>he problem is that a bunch of people use it as their primary language for everything and write a bunch of software that runs much slower than it should because it's written entirely in python.
Can you give me some examples of this?
he probably means programs that are completely native to python
a lot of pajeetoids missed the memo that python is a scripting language
this, but don't get caught in the trap of trying to do everything in Python and R if you start making more complicated models later on. If you start doing more complicated stuff like this econometrics post-doc dude I met once who was trying to do way too much only in R when he should have been writing an R package in C to define his data structures precisely...
anyway. Don't prematurely limit your future options.
Name one widely used program that is slow because it is written in python.
Calibre
Engineers/programmers use python. Code monkeys hate python. Simple.
Look at google Deepmind. The world's most advanced AI. Its python.
Everyone on those boards is just a larper dude.id rather have Jow Forums then people who wanna be haxers
Not him and I don’t know of any particular example where the same software is available in python and c++ for comparisons but you can see benchmarks online. Personally ive used both languages for plugin development and C++ is orders of magnitude faster than python. Which only matters when you’re running highly complex algorithms like convex hull calculation as an example of one thing I did in both languages. I also think python can call c code natively? I’ve heard about it I’m not sure, but even then I don’t think you can call that programming in python.
Calibre is slow because its single threaded plus the code is probably ancient.
Ranger. It's only a command interface, and still manages to be slower than the equivalent vifm.
Calibre isn't slow. The extensions written by Pajeets are.
you're a fucking idiot. abort yourself.
The problem with your limited understanding of things is that you probably won't find any evidence contradicting your beliefs. just like a flat earther.
Also, Python is pretty serious-business and a lot of it is also kinda reactionary against Perl, which is weird in a lot of ways if you spend some time thinking about it.
>a file manager is slower than a text editor
This is why you never listen to retards on here.
I believe him. Whenever I write things, pypy does almost as well as other scripting languages, but CPython is often an order of magnitude slower than that. It has to just be poorly designed.
>a text editor
You should really try to educate yourself a kit before you go running your stupid mouth.
explain to me why is python used for AI my friend
?
Procedural language gets OOP half balked, lack decent meta-programming, funcional programming unfinish, low performance in computed task and using ugly hack C to fix it, hard to build big systems need constants updates, single thread .
But begin amazing language for no-programmers and prototype features, high number libraries and decent documentation.
Just use python, let nerds fight about autism features.
Because smart people paid 500k a year have better things to do than checking that all their mallocs are freed and finding the source of segfaults.
A lot courses for no programmer in Uni use python, people write a lot Sci libs for Python, ML/IA developer use Python as glue for High-Optimizer C++ code
>I'm not going to be a developer anyways, I just need to analyse data.
This is why we don't like it.
Python "programmers" are not software developers, and they don't follow proper software development practices. Their code bases tend to be unholy messes, all in a 1000 line single file not in source control.
It's like javascript. It brought programming to the masses. And we fucking hate that.
I'm not just memeing either. I'm a software developer that works with scientists. Scientists are SHIT at writing code. Absolutely shit. But they all love python because you don't have to go learn what an int or the heap or the stack is to write python. Then they write inefficient pseudo-code and hand it to me and I have to sort the mess.
Python is not strongly typed, too laissez-faire, and many like me consider it a poor introduction to programming.
Looks like a codemonkey got triggered. Enjoy your ad hominen reality.
>my friend
sir going back to india pls.....
Its type system and interaction with C/C++ libraries will make building anything complex a nightmare. Pic very fucking related. It's compounded because Python is dynamically typed, so it is not obvious what numpy/pandas/etc. are doing, many of the casts are automatic, others are not.
It's not a meme either, the company I work for is trying to move away from Python.
It's a decent language to use as a kind of front-end for C/C++ ML libraries, but that is it.
-t employed data shitter
OP here. So give me advice on how to avoid becoming one of those scientists.
It's not something that can be taught. I've just accepted at this point that not everyone is like this and that there's no changing the people who are.
I did a science degree before becoming a developer. One of my awesome colleagues is/was a scientist fresh from a mathematics undergraduate and phd in particle physics, and she understands it too.
On the other hand I've met countless people who rage at me like "but I don't gettttt ittttttt, I don't have time to learn that, I'm not a programmer like you!!!!!". So fucking learn it bitch. Where do you think I learnt this, school? No I self-taught by googling on the job.
Some people do the bare minimum to get by in life and seem allergic to learning new things. They will always tell you that they "don't have time" to learn the proper way.
Just google best practices when you have a new problem. Try new technologies. Don't be "that guy" who writes every single thing in python then gets really defensive when I say "you know you should really be putting that into git and using something more performant like C for that part" with "omg leave me alone I'm not a programmer like you!!! I don't have time!"
Whitespace syntaxing
Unclear scoping
OOP is a hack
Dynamic + Implicit + Strict typing is a fucking headache
Function signatures are literally useless
this
CPU time is a hell of a lot cheaper than programmer time these days
>Unclear scoping
How so?
>Engineers/programmers use python
Literally not true. Webdevs use python. Lazy sysadmins use python. Engineers use C++. Researchers use R/Matlab. Programmers use everything else.
AI is not used for Python extensively. It's very slow, it's restricted to a single core, and it's difficult to quickly modify large codebases. It's used frequently for hobbyist ML, or quick prototyping, but not industry-backed ML or AI actually uses Python.
It may have python components, but it is not primarily comprised of Python.
He wrote vifm, retard
Here is everything that is wrong with Python. Before 3.0 came around Python supporters always bragged that it was the way to program and the evidence was the simplicity of hello world..
print "Hello World"
Simple, concise and doesn't work anymore in Python 3. Go fuck yourself.
There is no such thing as "Python". There are Python 2.6, Python 2.7 and Python 3.6.5 and they aren't compatible. The syntax isn't the same the libraries are different.
Even fucking Oracle gets the right with Java.
You are the exact target audience for Python. Just use it.
There's only two reasons people complain about Python:
1. It's slower than most languages
2. They heard someone else say it's bad
While 1 is a valid complaint, there's not many alternatives in data science, and it's the best there is for that purpose.
Total lack of bracketing. Indentation represents scoping, but when everything is relying on that and you're 5 levels deep, scroll down a bit and it's immediately unclear how many indentations you're actually down. Are you still in the for loop from before? I can't remember, now I have to scroll up, there's no brackets, I can't tell where I am on the tail I have to always go back up to the head and then hope I can keep track of the indented whitespace as I scroll back down to figure out where I'm actually working in
It's just useless to exclude bracketing from loops, conditionals, and functions. It unnecessarily makes large codebases extremely difficult to read.
print function is superior.
for example I can now do
print("Loading....", end="")
print("DONE")
instead of
import sys
sys.stdout.write("Loading...")
>There's only two reasons people complain about Python:
t. Pythonista
There are a near-endless list of reasons why Python is bad. The only people who support and approve of it are people who are either retarded and only use Python, and so have to justify it by saying YOU'RE JUST HATERS!, or people who don't know what they're doing and are just fucking about.
If you're just fucking about, who cares. Fuck about. Use any language. Have fun.
If you're retarded and feel like you have to defend Python, then you're just defensive.
I've never once heard anybody give reasons why Python is *good*, aside from "It's easy for beginners".
What?
Indentation is much clearer than brackets.
And get a decent editor with code folding. Jesus.
Portage
>Calibre is slow because its single threaded
Why should such a program use multiple threads? Also that is directly linked to Python because of the GIL.
No, it isn't. Brackets come with indentation, you're not gaining anything by getting rid of the brackets. In fact, you're losing a whole fucking lot. If you're even just 3 levels deep and in a long function, where you can't see the start of the indent, it's REALLY fucking easy to lose track of what scope you're working under.
It even happens with bracketing, just a lot less.
If you don't know what I'm talking about then you've very obviously never had to work in a codebase of any meaningful size. Brackets are extremely important for reading code because it makes scope termination very, very clear.
>software that mostly does I/O work
>slow because interpreted language
retard
>get a decent editor with code folding.
>My shit language is okay because you can just rely on some other program to make it work!
Do you understand how stupid you sound
>Brackets come with indentation,
No they don't
>it makes scope termination very, very clear.
How is an indent level shorter or longer not very clear?
Just because I/O is slower than in-memory computation doesn't mean it's the bottleneck. Python is single threaded, it cannot handle multiple calls at once, and I/O calls are explicitly blocking threads. Python objectively makes Portage worse.
>It has really awful performance, which is fine for rudimentary automation tasks and gluing actually performant code together. The problem is that a bunch of people use it as their primary language for everything and write a bunch of software that runs much slower than it should because it's written entirely in python.
It's also good for internet-based programs, like web apps or whatever.
For instance, I regularly write programs that interact with the internet, where the bottleneck is my comparatively slow internet connection (i live in a rural area), therefore I wouldn't get a significant speed-improvement even if i wrote the programs directly in machine code.
If you work for a company developing something though, you probably don't have a choice in the language to begin with.
It was an addendum not a counter-argument.
A bracket based language benefits more from code folding.
>I just need to analyse data
python and R are great choices then
>async I/O doesn't exist
okay then
>No they don't
Yes they do. Name a simple language where the syntax standard is to have no indentation after a bracket.
>How is an indent level shorter or longer not very clear?
Because you can't fucking read apparently. I've explained it to you two goddamn times. What scope just ended? You don't fucking know because now you can't see the indent level above. Just suddenly it dropped down.
If you see just a bracket dropped down, you very clearly know that the top level scope just ended.
If you just see a new statement dropped down, who the fuck knows? Maybe the top level scope ended. Maybe it didn't. Maybe you left an if statement that was way above you. Want to find it? Great! Just remember exactly the indent level you're on and scroll up, hoping your brain doesn't be a brain and forget exactly where it is because you're trying to remember indent levels and not something clear like a bracket.
>t. Pythonista
I rarely use Python though.
>I've never once heard anybody give reasons why Python is *good*, aside from "It's easy for beginners".
I gave a reason (albeit without much explanation). It's great for data science/machine learning due to the massive amount of libraries it has for this subjects. Most other languages can't compete in this regard.
I'm not saying Python is perfect, but I'm also tired of people parroting "Python is shit xD" without meaningful reasons.
That's an (opinionated) problem with syntactical whitespace, not a scoping issue. Python has perfectly sane function scoping. If you can't wrap your head around syntactical indentation, that's not a problem of the language's scoping system.
Async I/O does exist, by leveraging multiple threads. I/O is a blocking call. Read a fucking book.
You can certainly do async I/O with only a single real thread
>thinking GIL means that Python is single threaded
docs.python.org
Fucking retards on Jow Forums I swear.
>It's great for data science/machine learning due to the massive amount of libraries
R/Matlab are still better. If you just want a single script and don't care about computation time to crunch some data, yeah, sure, python is great for that. It's a lazy scripting language. Perfect.
Literally anything beyond that? No, absolutely not. And that's what everybody uses it for. Everything it's not meant to do. It's like webdevs and Javascript.
The whitespace is tied into the scoping problem, and it's a human error. Your brain fucking sucks at tracking whitespace levels, so the second you don't have a clear start point is where your eyes start going goofy and you think you're in one scope but actually in another.
>Is says threading so that means it's threaded!
Do you think goroutines are threads too, dipshit?
>Your brain fucking sucks at tracking whitespace levels
My brain handles it fine, thanks. Again, you not being able to understand something visually doesn't mean there's anything wrong with the language's scoping system.
Faggot
>CPython implementation detail: In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once
lack of brackets with things that usually use brackets, and there aren't semicolons
people tell me these are the reasons they like python, but i hate it. the formatting is terrible, but it's pretty easy, and does nearly everything C++ can do
ALL peoples brains fucking suck at tracking whitespace. You very clearly have not working in large python codebases. Is it fine like 85% of the time? Yeah, because 85% of the time the scope start indent level is visible, or you're not scoping in any further.
That other 15% of the time? Working in other peoples codebases? It comes back to fucking haunt you. It is an absolute nightmare because unless you turn on "show indent whitespacing" in your editor (which is fucking absurd, I can't think of a single other instance in any other situation in which that is necessary) then you have literally no way of telling what scope you're working under.
I'm not gunna try and change your mind because you clearly only work in hobby scripts and so this issue is something you have never even come close to experiencing, but it's real, and it's fucking annoying.
The interpreter literally spawns OS-level threads you dipshit.
>waiting for an IO operation is done with Python code
This is why you are a retard.
>Yes they do. Name a simple language where the syntax standard is to have no indentation after a bracket.
Javascript.
For example, look at Jow Forums's javascript code
s.4cdn.org
wiki.python.org
>In CPython, the global interpreter lock, or GIL, is a mutex that protects access to Python objects, preventing multiple threads from executing Python bytecodes at once. This lock is necessary mainly because CPython's memory management is not thread-safe. (However, since the GIL exists, other features have grown to depend on the guarantees that it enforces.)
>CPython extensions must be GIL-aware in order to avoid defeating threads. For an explanation, see Global interpreter lock.
>The GIL is controversial because it prevents multithreaded CPython programs from taking full advantage of multiprocessor systems in certain situations. Note that potentially blocking or long-running operations, such as I/O, image processing, and NumPy number crunching, happen outside the GIL. Therefore it is only in multithreaded programs that spend a lot of time inside the GIL, interpreting CPython bytecode, that the GIL becomes a bottleneck.
>However the GIL can degrade performance even when it is not a bottleneck. Summarizing those slides: The system call overhead is significant, especially on multicore hardware. Two threads calling a function may take twice as much time as a single thread calling the function twice. The GIL can cause I/O-bound threads to be scheduled ahead of CPU-bound threads. And it prevents signals from being delivered.
>waiting for an IO operation is done with Python code
Oh, so Python is useful because it doesn't actually do anything itself, it just calls on other, proper languages. Great.
That's minified javascript you absolute retard. Do you think anybody actually writes or edits javascript when its like that?
You missed the point entirely. When your write a script in Python you have zero guarantee that it will work with a newer version of python. In fact the language creator goes out of his way to break basic language feature between versions because autism.
I have written programs in Java that I complied with Java 5 that will run, unmodified with a Java 8 JVM. I only need one Java JDK installed on a machine unless I'm doing really weird shit like compiling stuff that is going to run on an older JDK and even then I could fix that with compiler flags.
With Python you just need to have both 2.7 an 3.6 installed and some libraries only work with one version or the other.
Other then that the syntax is weird for the sake of being weird. I get that practically every language just rips off C and he wanted to do something different but the indenting as part of code is unwieldy. If I cut and paste a block of python code from another file I usually have to manually fix all the indenting. I can't trust the IDE to get it right and its part of the syntax. With any other language I just have the IDE reformat.
>syntax standard
You mean Code convention?
There are many different ones, and they are usually not enforced by the compiler/interpreter.
>If you just see a new statement dropped down, who the fuck knows
There is one indentation level less, its as clear as if there was a bracket.
So what?
We shouldn't fix things ever for the sake of backwards compatibility?
Do you work for Microsoft?
>they are usually not enforced by the compiler/interpreter.
And yet everybody includes the indentations anyways. How odd! It's almost as if they are people, who read things, and enjoy clarity. Such as with brackets. And indents. And fucking closing brackets to make it clear a thing has fucking ended.
>There is one indentation level less, its as clear as if there was a bracket.
no, it isn't, because it's a statement, not a bracket. That implies it's a new thing within a scope, of which the previous 6 scopes may or may not have ended because shit just drops down a level instead of a very clear, very obvious, "THIS SCOPE HAS FINISHED".
You can't tell me that Python can't execute multiple threads, because I tried it and it works
t. Python expert with 6 years of experience
I never disliked python but the split between python 2 and 3 is really offputting considering that even new development is occasionally written in python 2.7 despite the deadline being soon, not to mention that being such a normie language means the ecosystem is littered with long abandonded libraries that have no unit testing and don't fully adhere to the api/rfc/standard they're trying to implement and instead come off as half baked hobbyist projects but they're the only libraries with any sort of popularity behind them
I also like perl which has a lot of the same problems, so take that for what it's worth
>I'm not but gas the kikes unrionically
>Let's just rewrite the entire language every revision because we're inconsistent and retarded, and our language is just a series of bad interpreter hacks. What are you, some kind of luddite hanging onto the past?
>I called the threading library so that means it must be threading things right
Oh, so C is useful because it doesn't actually do anything itself, it just gets transformed to assembly. Great.
>Therefore it is only in multithreaded programs that spend a lot of time inside the GIL, interpreting CPython bytecode, that the GIL becomes a bottleneck.
Thanks for proving my point.
Don't call me a retard because you're a retard, too.
False equivalence.
>No u
Don't be butthurt because you were stupid
>>I called the threading library so that means it must be threading things right
it acts and behaves like threads, and it works like threads. So it might as well be threads.
what else would it even be?
i like it
i tried both rust and go and neither felt as good to me. maybe because i'm already familiar with python by a lot, but the constant if x == nil or whatever in go is a major turnoff. i hate ; too. also, it seems to force you to do things in a certain way; to be fair, python does somewhat too, but i like the pythonic way. go, in that sense, feels more like java, which i hated when i had to use it
as for rust, i couldn't understand half of it, despite having coded in c, c++ and lisp in the past. the lack of libraries kept me from having enough interest to invest serious time too
maybe some other language will eventually replace python (julia perhaps) but right now i don't feel like anything else is better. even java fell though, despite all the corporate usage and jvm, so nobody's really safe
I still have no idea what you're on about.
What's less clear about:
foo
bar
baz
than:
foo}bar}baz}
?
This is easily the most ignorant thing I've read today.
I'm not saying break shit at random.
Python's move to 3 was heavily planned, included plenty of guides of changes, porting utilities, backporting some of the 3 feature to 2 to make it more compatible.
It's not cascading that's the issue. Again, 85% of the time it's perfectly clear.
It's when you're already 3-6 levels deep, and see a drop.
Cool. Wait, was that an if statement that ended? Or a for loop? Where am I in exactly? What's happening? Did I drop into the inner loop or am I still in the outer loop?
Compared to bracketing where it's just a bracket. Maybe a statement follows it. Maybe another bracket follows it. It's a sigil, a well defined way of saying "THIS SCOPE HAS ENDED", rather than just implying it. I can't give an example on Jow Forums because Jow Forums doesn't allow for that much space, this is a serious problem in *large* codebases. If you ever end up having to work on somebody elses codebase that's a mile long, you'll immediately know what I'm talking about.
The docs literally say CPython is single threaded. It's right there.
Honestly Python isn't that terrible. Its basically replaced Perl for me. I use it for small jobs that I don't expect to run doing on a long term basis. . I don't have any compelling reason to use Python for this stuff but I don't any reason not to either.
How the fuck far do you need to indent? If you're going more than 3 tabs deep you're complicating things more than necessary senpai.
It doesn't. You have poor reading comprehension. It says only one thread may execute Python bytecode at a single time. Waiting for IO is not executing Python bytecode. Just kill yourself.
>why does Jow Forums hate X
>100 shitposts and flamewars later
Waiting for IO is a blocking call, which means that thread cannot do anything else. CPython can only execute on a single thread because of GIL. IO blocks python execution. Cut off your own dick.
Syntactic whitespace is cancer, lambdas are unnecessarily crippled, there is no do/while construct and the only reason why not is "the devs think it looks too ugly"
I still don't understand.
for ...
if ....
....pages down
foo
bar
for ... {
if .... {
....pages down
foo
}
bar
In both cases I can only see that the last scope has ended.
CPython spawns a new OS-level thread for every Python thread. It's literally right there in the code.
>However, threading is still an appropriate model if you want to run multiple I/O-bound tasks simultaneously.
Do you want me to recommend you a good rope store?
mypy. though for older code, you're sol. it's a scripting language, not a systems language. dealwithit
also . if you have 3 levels of indentation with python, you're doing something very wrong. you either need to start using functions or changing the way you use with statements or something else. it's not like a bunch of nested loops in python will be fast either. you're probably a java/c programmer who doesn't know how to code in a pythonic way (or the people who wrote the legacy code)
your complaints are ridiculous. if this is the worst kind of complaint someone can come up with, the language is close to perfect (it's not, mind you)
the tab issues are easily solved by the ide, and worst case scenario all you have to do is block select and tab/shift tab. the breakage from python3 won't happen again.
as for having python2 and 3, or libraries, virtual environments exist and make everything much simpler (these library problems happen with java too, faggot).
Bullshit, there's no such thing as rope stores dinkus
If you need an ide to make the language usable, the language is shit.
wiki.python.org
>In CPython, the global interpreter lock, or GIL, is a mutex that protects access to Python objects, preventing multiple threads from executing Python bytecodes at once
Not. Multi. Threaded.
Can you have multiple threads? Yes. But you better fucking hope none of them ever have to talk to each other or share any kind of resource. It's equivalent to spawning new interpreters on new threads and running entirely separate programs. It's a cheap hack, just like the rest of Python.
I know logically it doesn't make any sense, it's really a see-it-to-believe-it thing. I can't really explain it any more than that.
Other peoples codebases. And if you've never been that deep in, you're lying. It happens. Not everybody writes perfect code 100% of the time.