[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | | Home]

Why do you guys hate python? It is a very powerful scripting

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 99
Thread images: 15

File: python.jpg (13KB, 700x175px) Image search: [iqdb] [SauceNao] [Google]
python.jpg
13KB, 700x175px
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?
>>
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.
>>
>>61856744
learning python here
>LearnPythonTheHardWay
anyone else in the same boat? I'd like to get a few pointers.
>>
>>61856744
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.
>>
>>61857789
That is more productive
>>
File: bridge.jpg (198KB, 1015x759px) Image search: [iqdb] [SauceNao] [Google]
bridge.jpg
198KB, 1015x759px
>>61857692
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
https://www.youtube.com/watch?v=tKTZoB2Vjuk&list=PLC8825D0450647509

>>61857728
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.
>>
>>61857917
>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
>>
>>61856744
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?
>>
>>61856744

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.
>>
>>61856744
>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.
>>
>>61857839
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
>>
>>61859093
>Saying "I know Python" is like saying "I know HTML and CSS".

Actually, it's worse
>>
>>61859093
It's even worst than PHP.
>>
File: 1437447368477.png (62KB, 300x300px) Image search: [iqdb] [SauceNao] [Google]
1437447368477.png
62KB, 300x300px
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.
>>
>>61857692
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.
>>
>>61860388
>Basic question, but what is Python useful for
did you even read the OP? dumbass
>>
>>61860388

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.
>>
>>61856744
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.
>>
>>61857660

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.
>>
>>61860388
>>61860388
>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.
>>
File: code2[1].png (620KB, 1190x670px) Image search: [iqdb] [SauceNao] [Google]
code2[1].png
620KB, 1190x670px
>>61857839
>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.
>>
>>61860570
None of what you've mentioned is unique to Python.
>>
>>61860455
Thanks, that sounds in line with what I've picked up about it.

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

>>61860570
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.
>>
>>61857839
>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.
>>
>>61860726
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?
>>
>>61860443

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

made me kek
>>
>>61856744
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
>>
>>61856744
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?
>>
>>61861315
Embedded shit. real-time performant graphics/audio shit.
>>
>>61857839
>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.
>>
>>61860726
there are a ton of APIs written in python.
>"what would you use python for?"
>anon 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
>>
>>61861340
>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.
>>
File: Untitled.png (50KB, 626x347px) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
50KB, 626x347px
>>61861315
extensions for Python code that just can't cut the mustard
>>
>>61861014
unless youre writing in notepad.exe this wouldnt be a problem
>>
>>61860598
>brackets and parentheses and semicolons aren't confusing they add clarity.
What this anon 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.
>>
>>61861315
>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!
>>
>>61860443
>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.
>>
File: 1466097319267.jpg (164KB, 656x1024px) Image search: [iqdb] [SauceNao] [Google]
1466097319267.jpg
164KB, 656x1024px
>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?
>>
>>61861779
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
>>
>>61861969
Is Perl 6 worth learning? I'm intrigued by Perl 5 but never bothered with it.
>>
>>61856744

I like python. The comprehensions are extremely powerful, and dictionaries are fantastic and some of the list methods make parsing text simple.
>>
File: captcha_please.gif (30KB, 300x100px) Image search: [iqdb] [SauceNao] [Google]
captcha_please.gif
30KB, 300x100px
bump
>>
What's wrong with indenting every time you have a nested instruction? Is that not what you're supposed to do?
>>
>>61861979
>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.
>>
>>61862046
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.
>>
>>61856744
Perl and Ruby exist
>>
>>61860543
Wow

sub erat {
my $p = shift;
return $p, $p**2 > $_[$#_] ? @_ : erat(grep $_%$p, @_)
}
>>
>>61862606
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?
>>
>>61861979
>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.
>>
>>61860598
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.
>>
>>61857692
http://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?
>>
>>61862968
You'll probably enjoy it more than batch shit
>>
Bash>Python
>>
Lua > Python
>>
>>61856744
It is worse for math and plotting then Matlab.
Let that sink in, a language worse then Matlab.
>>
>>61856744
Horrible packaging ecosystem. Why the fuck Python can't into proper dependency management? Learn from npm and maven.
>>
>>61857692
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.
>>
File: 1502235658627 (2).png (276KB, 1062x208px) Image search: [iqdb] [SauceNao] [Google]
1502235658627 (2).png
276KB, 1062x208px
>>61857692
There aren't any pointers in python =^}
>>
>>61857692
Learning python the hard way is like learning Cobol. It's obsolete technology, he refuses to make a version that teaches current python
>>
>>61860598
>>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?
>>
>>61861363
because they're fumbling retards like me who don't know you can do that
>>
>>61861289
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.
>>
>>61865561
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
>>
>>61860543
>absolutely beautiful
>inconsistent capitalization
choose one
>>
>>61861779
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.
>>
>>61856744
>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.
>>
>>61864633
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
>>
>>61863466
>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.
>>
>>61863466
>Let that sink in, a language worse then Matlab.

matlab is an outtaded piece of shit. You may as well use R.
>>
>>61856744
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
>>
>>61866319
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?
>>
https://youtu.be/W9dwGZ6yY0k

watch this
>>
>>61866310
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".
>>
File: 1457548665952.jpg (5KB, 236x285px) Image search: [iqdb] [SauceNao] [Google]
1457548665952.jpg
5KB, 236x285px
>>61866666
Wow
>>
>>61860388
It's got pretty damn good string manipulation, but that's all I've gotten from it.
>>
>>61866666
quints confirm
>>
i'm a big fan of python as a learning tool. are you guys familiar with https://github.com/adafruit/circuitpython
>>
>>61860388
>>61860455
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
>>
>>61866341
Exactly and python is even worse
>>
>>61866310
>What is R?
Hi Rajesh
>>
>>61863737
I feel like Udemy courses are just a meme, or are they actually good?
>>
>>61867149
>>61866989
>>61866422
>>61866341
>>61866319
>>61866310
>>61863466
>science memers thinking they are programmers

Let's talk about things that matter, like real software dev or at least
>>61865664
>>61863481
>>61861969
>>61861817
>>61860570
>>61858410
>>
File: .png (19KB, 2000x1333px) Image search: [iqdb] [SauceNao] [Google]
.png
19KB, 2000x1333px
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:
https://painlessprogramming.blogspot.hr/
Thread posts: 99
Thread images: 15


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]
Please support this website by donating Bitcoins to 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
If a post contains copyrighted or illegal content, please click on that post's [Report] button and fill out a post removal request
All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site. This means that 4Archive shows an archive of their content. If you need information for a Poster - contact them.