Why do you guys hate python? It is a very powerful scripting language and it's great for plotting shit...

Why do you guys hate python? It is a very powerful scripting language and it's great for plotting shit, doing math operations, and processing data.

You guys aren't really writing all your code in C/C++, right?

Other urls found in this thread:

youtube.com/watch?v=tKTZoB2Vjuk&list=PLC8825D0450647509
greenteapress.com/wp/think-python-2e/
youtu.be/W9dwGZ6yY0k
github.com/adafruit/circuitpython
painlessprogramming.blogspot.hr/
twitter.com/SFWRedditImages

Don't worry, they just like feeling superior. Doing everything the dumbest way possible just to seem like they are doing more, and more complex things when really they're just using it because it's the only thing they know. When they are exposed for not knowing something like python they claim it is because it is beneath them, when really they're just slow and stubborn.

learning python here
>LearnPythonTheHardWay
anyone else in the same boat? I'd like to get a few pointers.

Whitespace as syntax.
BDFL.
GIL.
"Pythonic" anything.

That said, Flask is pretty comfy.

Package management is a nightmare.

Claims to be productive while not allowing you to define new syntax.

That is more productive

learn python the hard way is terrible. I would recommend either
>Python Crash Course: A Hands-On, Project-Based Introduction to Programming
Book by Eric Matthes
or the other books by the same publisher/author; automate the boring stuff, and I forget the other one that covers numpy and related libraries. There are also the two O'reilly books, I think the first one has a picture of a rat on it. The other one is called "Fluent Python".

If you prefer videos, Google has a good video series
youtube.com/watch?v=tKTZoB2Vjuk&list=PLC8825D0450647509

honestly the whitespace as syntax helps with readability. I hate reading code other people write that have are absolutely fucked up in terms of formatting. "Pythonic" is stupid and I don't know anyone that uses the term, although that might be because I am the only one at work who writes in python.

This may seem like a cliche answer, but every language has its place. If you are writing a large and complex application where speed and security are important, you'd be crazy to use Python. But if you are using it as a prototyping language, scripting or small networking projects, then it is the perfect tool for the job.

>Why do you guys hate Excel? It's a very powerful system for plotting shit, doing math operations and processing data.
>NIGGA WE DEVELOP VIDEO CODECS

Python as a language has some minor quirks that can be very annoying, e.g. "default" arguments.

CPython is shit because it's slow and has GIL.

There *are* alternate implementations, but they are often not much better. I do have hope for some though definitely.

could you explain to me how usefull is python for c/c++/c#?
its about embedding right?

Python is basically the PHP of scripting languages: a huge bunch of features with an inconsisten syntax. I don't hate it, but it's bascially sub par scripting language. Perl, Ruby or even Lua are better.

Also it attracts a huge amounts of n00bs. Saying "I know Python" is like saying "I know HTML and CSS". It's definately good to know, but it's nothing to be proud of.

>It is a very powerful scripting language
>scripting
Yes. Don't use that shit for anything else, it's good for parsing docs and doing small tasks but fuck no just use go for whatever prototype you're developing.

Learning from scratch... I only have basic powershell knowledge and thats it.

I started going through the online learn python the hard way and its horrible, I gave up. There is zero explanation as to why you are doing anything early on so when you screw up you literally have zero clue why and what to do to fix it.

I bought the python humble bundle a couple months back and its got that crashcourse book in it. Been wanting to give it atry

>Saying "I know Python" is like saying "I know HTML and CSS".

Actually, it's worse

It's even worst than PHP.

Basic question, but what is Python useful for? If I were going to learn any language, what end result would compel me to learn Python?

I'm considering it because it can be used in Maya so I could stay in the same general creative field but have more job options/ career paths.

But if that didn't work out and I already learned Python, what exactly could I do with it for a career? Other than being a stepping stone to other languages.

Zed is a fucking retard, he said python3 isn't turing complete because it can't run python2 scripts. Do not read any of his books or tutorials, he doesn't know shit and teaches absolutely shit stuff.

I dislike it for very shallow reasons. Its syntax is just so weird to me and not in a good way.

I can go between C, C++, C#, Java, PHP, Javascript, etc and be like these are reasonable differences. Then you load up Python and are just like what the fuck, who thought this was a good idea.

>Basic question, but what is Python useful for
did you even read the OP? dumbass

There's a lot of backend web development work with it (A la Django.)

I use it a lot writing website scrapers and bots for various things (Reddit, tinder, etc.) If I'm automating repetitive tasks at work, I either do it in Powershell or Python.

Lots of science and math people use it for their sort of stuff too.

Because it's irritating. The developers are very opinionated on how you should write code, and the language is very much designed around it. We all know about indent blocks, but the creator of Python also tried to take out maps, lambda functions, etc. because they were not "Pythonic." It's like they want you to be stuck in deep nested control flow or something.

It's basically the GNOME of scripting languages.

I also work in data science and it is a bit of a mystery to me why it became so popular in the field over R. I've noticed that anyone with a math background prefers R, CS people prefer Python.

You retarded? If you know C/C++, python is fucking trivial.

def SieveOfEratosthenes(size):
array = [True] * size
for each in xrange(3,int(sqrt(size))+1,2):
if array[each]:
array[each*each::2*each]=[False]*((size-each*each-1)/(2*each)+1)
return [2] + [each for each in xrange(3,size,2) if array[each]]


just look at that last line;
return [2] + [each for each in xrange(3,size,2) if array[each]]

beautiful.
absolutely beautiful.

>Basic question, but what is Python useful for?

Scripting and automation of things that do not require performance. It is easy to learn and easy to code to so you can do a lot of shit in a short time.

It is very used by CG companies because softwares like maya and blender have APIs for it. You can automate the creation of folders structures and file management with it for intance,or crate 3D objects with specific attributes that you desire.

t. TD in a CG company.

>honestly the whitespace as syntax helps with readability

no it doesn't. this shit is hideous. and any reasonable person who have indented anyway. its just forced ugly programming style. brackets and parentheses and semicolons aren't confusing they add clarity.

None of what you've mentioned is unique to Python.

Thanks, that sounds in line with what I've picked up about it.

Of course I did! I meant on a broader scale, like what would go into a job listing looking for Python experience.

Thanks, that's what I would plan on doing with it. I do most of the WYSIWYG stuff in Maya but don't qualify for technical positions without a solid scripting base. And I imagine there's less competition for those jobs that the purely artistic ones - I don't think I've ever met anyone else who enjoyed rigging.

>honestly the whitespace as syntax helps with readability.
until you run into a tabs vs spaces conflict
shit breaks, but everything looks properly indented

Go gets this right. You can indent your code however the fuck you want when you're writing it, and the standard code formatting tool (that your editor should be running on every save) standardizes the formatting.

What other languages are easy to learn(many things abstracted), easy to code(basically pseudo code), has good readability, and a built in library out of the box that makes coding shorter?

>what the fuck, who thought this was a good idea

made me kek

Forced indentation.. Feels like my hands are tied to prevent me from doing my own styling. Other that that, no closing statements like if with endif. instead of } makes code less readable in my opinion. Other than that, I think it's a good language but I don't use it much

Inconsistent languages are the worst. I hate Python for the same reason I hate French: too much incongruent shit that feels stapled together.

For scripting there is a Scheme: a logical, consistent syntax.

What does a hobbyist solo programmer even write in C besides new OS kernels that compete with the giants?

Embedded shit. real-time performant graphics/audio shit.

>whitespace as syntax helps with readability. I hate reading code other people write that have are absolutely fucked up in terms of formatting.
Yeah true but only noobs code that way. Seasoned programmers don't need the language to force indentation on us. We all have our own styling preferences. I hate being forced into anything that is supposed to be artful in some respect. It's like forcing an artist to only use certain brushes.. I get what you're saying but white space as syntax is just plain retarded.

there are a ton of APIs written in python.
>"what would you use python for?"
>user lists what he used it for
>"y-y-yeah well I could do this in another language if I wanted!"
you're missing the point lad

>Yeah true but only noobs code that way. Seasoned programmers don't need the language to force indentation on us. We all have our own styling preferences.
that's why I hate reading other people's code or updating someone else's code. I usually remove all their tabs and replace them with spaces; I have no idea why people who use tabs don't set up their text editor to replace all tabs with spaces.

extensions for Python code that just can't cut the mustard

unless youre writing in notepad.exe this wouldnt be a problem

>brackets and parentheses and semicolons aren't confusing they add clarity.
What this user says. Except closing words are better than brackets for readability. I think python was trying to avoid being called Basic because that's what it is. Except Basic is a much better language than Pyhton. No forced white space and closing statements. Basic is completely readable because it is "self documenting". That was the original goal of basic. Python is Basic's retarded little brother.

>What does a hobbyist solo programmer even write in C
I've seen people write every conceivable type of program in C. It's just plain retarded because it's the wrong tool for everything. C wan't designed for general purpose type programming. Sure it can be used for that, but it's dumb because it will take 10X as long to write and be buggy as fuck. I've seen it!

>you load up Python and are just like what the fuck
Exactly dude.. But python is kind of a joke anyway, the name comes from "Monty Python's Flying Circus" which was hillarious! One of my favorite shows when I was a kid.

>learning python in CS course
How fucked am I, lads?
I mostly just wanna be able to make games and possibly apply the knowledge to a future career, how useful is it in that regard?

Unless you wanna make visual novels, trivial SDL games, or text games then Python a shit for games.

But once you learn how to program picking up another language isn't terribly difficult.

A beautiful scripting language exists now

Is Perl 6 worth learning? I'm intrigued by Perl 5 but never bothered with it.

I like python. The comprehensions are extremely powerful, and dictionaries are fantastic and some of the list methods make parsing text simple.

bump

What's wrong with indenting every time you have a nested instruction? Is that not what you're supposed to do?

>Is Perl 6 worth learning?

No.

>I'm intrigued by Perl 5 but never bothered with it.

Perl 5 loses its sexy greybeard hacker unix admin mystique when you actually use it and realize it's horribly designed and basically just the PHP of the early 90s.

List comprehensions are a pointless syntactical wart and should just be replaced with map/filter/reduce or a for loop.

c++ and python are all you need.

Perl and Ruby exist

Wow

sub erat {
my $p = shift;
return $p, $p**2 > $_[$#_] ? @_ : erat(grep $_%$p, @_)
}

But python has all these things.
Wtf is wrong with anons hating a programming language?
Did it touched your little wormy..?

Hating something for it's existence is retarded on so many levels, specially if it's not part of your life.

>Uh, mah indentation
>Mah syntax
>Mah speed
Don't fucking use it?

>Is Perl 6 worth learning?
Maybe, it's not operational yet due to performance and stability issues, but it's a very interesting and rich language.

>I'm intrigued by Perl 5 but never bothered with it.
Just call it Perl.
You absolutely should, it's the ideal language for scripting. And even if you'd still prefer Python/Ruby, it's probably different than every language you tried and will open up your mind a bit.

That's just bad style and has nothing to do with indentation. Proof: write that same algorithm in C++ or Java and see how it looks.

greenteapress.com/wp/think-python-2e/
Here is a better book to learn python, it's not a meme tutorial like lpthw.

Is python the best language to learn for small scripting tasks on windows?

You'll probably enjoy it more than batch shit

Bash>Python

Bump

Lua > Python

It is worse for math and plotting then Matlab.
Let that sink in, a language worse then Matlab.

Horrible packaging ecosystem. Why the fuck Python can't into proper dependency management? Learn from npm and maven.

I would pirate the udemy course complete python master class. Its helped me way more than learn the hard way. I understand what's going on behind the scene more and it helped me wrap my brain around programming logic.

I seriously wonder how can someone be so autistic to hate on Python so much. It has its uses and it allows for fast development. If you use it for something it's not meant for, it's not the language that is fucked, it's you.

There aren't any pointers in python =^}

Learning python the hard way is like learning Cobol. It's obsolete technology, he refuses to make a version that teaches current python

>>honestly the whitespace as syntax helps with readability
>no it doesn't. this shit is hideous.
>and any reasonable person who have indented anyway.
If any reasonable person would have indented it anyway then it can't be hideous, since it's what any reasonable person would have done.

Why do we have so many fucking morons in here?

because they're fumbling retards like me who don't know you can do that

you own styling is not good styling and you need to realise it.

I hate OOP in Python. Writing 'self' everywhere is such a fucking annoyance coming from another language.

Why the fuck would you ever do OOP in Python? That's just dumb.

Right you idiots, this is what python is good for:

"DEV OPS"
SYSTEM AUTOMATION

thats it

nothing else

If you dont work in infrastructure you shouldn't be using it

>absolutely beautiful
>inconsistent capitalization
choose one

A fair number of games use it as a scripting language. You won't be able to write a high performance engine in it though. Then again, unless you are doing something non-standard, you should probably use an off-the-shelf engine.

>You guys aren't really writing all your code in C/C++, right?
Of course not, there is always dlang and a bunch of superior scripting languages including my own.

I'm actually learning python3 with it but i got stucked on exercise 13 through 16 since he doesn't explain shit.

>what is Data Science and ML

Hello Pajeet

>It is worse for math and plotting then Matlab.
>Let that sink in, a language worse then Matlab.
>then Matlab.
so should I learn python >then Matlab ?

Here is your (you) you miserable fuck.

>Let that sink in, a language worse then Matlab.

matlab is an outtaded piece of shit. You may as well use R.

Well for embedded devices, with 256 byes of RAM and maybe a KB of flash, python is shit
I use it as a calculator though, it's very good at that

to be fair matlab was basically designed as a tool for math and plotting.

that's like saying a hammer is better than a saw at smashing things so why would you ever need a saw?

youtu.be/W9dwGZ6yY0k

watch this

Literally the only reason anybody even mentions python and ML in the dance sentence is because it's the language that all of the textbooks use. There is no particular reason to use python over any other language for ML beyond the point of "its less lines so I can fit it on the book pages easier".

Wow

It's got pretty damn good string manipulation, but that's all I've gotten from it.

quints confirm

i'm a big fan of python as a learning tool. are you guys familiar with github.com/adafruit/circuitpython

A lot of scientists use it for quick prototyping. Usually it's either python, mathematica or MATLAB. Python has a neat science library but I personally never liked the intent formatting.

For actual modelling people tend to go for C/C++ cos sometimes you gotta go fast.

t.Theoretical Chemist

Exactly and python is even worse

>What is R?
Hi Rajesh

I feel like Udemy courses are just a meme, or are they actually good?

>science memers thinking they are programmers

Let's talk about things that matter, like real software dev or at least

I don't like the way it is. It feels like a *worse* javascript in most ways. It's mostly 'great' because of libraries, but even the way it utilizes the libraries is shit. Shell/rc is a good-enough scripting language, and coreutils effectively do all that.

Why wouldn't you just use a Lisp?

best place to learn programming:
painlessprogramming.blogspot.hr/