[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 | Free Show | Home]

Thoughts on python?

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: 62
Thread images: 4

File: opengraph-icon-200x200.png (8KB, 200x200px) Image search: [Google]
opengraph-icon-200x200.png
8KB, 200x200px
Thoughts on python?
>>
pros: minimalistic, no semicolons, whitespace matters, snake_case, good ecosystem for scientific stuff

cons: too much "magic", strange syntax sometimes, hard to debug (this is common for all dynamic language), 2 vs 3 problem
>>
I really hate the __keyword__ pattern. It is ugly.
>>
>>62097705
>hard to debug
really?, REALLY?
>>
>>62097733
in dynamic languages you very often run into errors that wouldn't exist if in static languages where the IDE/compiler can help
>>
>>62097631
gay shit for noobs

C or ASM
>>
>>62097631
Overall pretty shitty language that nevertheless has a good feature set to act as a console scripting or "duct tape" between other languages.

Definitely not really a fan of it, though.
>>
>>62097768

it's very easy in python to detect type errors compared to javascript for example
>>
Great for scientific stuff.
>>
>>62097781

>i don't know anything about programming
>i don't program
>i just post memes and opinions i found online

Disconnect from the internet and never post again, you absolute retard.
>>
>>62097631
good for fast and dirty, also good as wrapper for other widgets.
>>
>>62097807
how so? i am genuinely curious.
i had the misfortune of using node.js for a large project. we used the best possible dev tooling that existed, yet we would still have to constantly deal with the most trivial shit breaking our code (casual typos and type mismatch were probably 75% of all errors, sometimes you wouldn't know until it's in prod)
>>
>>62097807
Python is very annoying to deal with as compared to statically typed languages.

JS is almost the same, though I guess strictly speaking you could call it worse because it's even weakly typed you get almost all errors anyhow.

Dynamic duck typing is just such a shitty idea...
>>
It's not good but you can't really go wrong with it if you want to do stuff.

A lot of big projects use it and even better, the standard library is fuckhuge which helps in some cases when you need to deploy some generic script to different computers, kind of like what ansible does.
>>
>>62097895
>Dynamic duck typing is just such a shitty idea

and it's one of the main causes of slow execution, because you have to determine the type in runtime
>>
>>62097891

yeah, I meant that javascript is much harder for detecting type bugs compared to many languages.
but using typscript or flow from the beginning will solve it
>>
Literally the only language that's fun to write. Quick, intuitive, powerful. That it's three MS slower than autistic garbage like C is utterly irrelevant to me.
>>
>>62097631
>language with devs so bad there's no official multithreading
It's fucking shit. Python dev solution to lolnomultithreading? Just call a fucking C library with computationally intensive shit. Why not just fucking write it in C from the start then?
>>
>>62097968
you can use jsdoc, and have jetbrains warn you for type mismatch
>>
>>62097631
It's OK. I don't hate it.
>>
good syntax and language choices, horrible performance and compatibility btw versions
>>
>>62098086
>That it's three MS slower than autistic garbage like C is utterly irrelevant to me.

Oh sweetie, if you had any idea the amount of overhead python has to make it "fun and intuitive" you wouldn't be shitting so much on C.
>>
>>62097631
For what it is, it's probably the best dog in the race overall atm.
>>
>>62098912
not arguing with you, just curious. What do you feel are the downfalls of GO?
>>
>>62098919
Dynamic typing sucks.

Static typing without generics sucks even worse.
>>
anybody know what the type hint for functions is?

for example:
def x(y: int, z: str, callback: ???)
....


Please help
>>
>>62098919
I wouldn't say Go is at all comparable to Python regarding its use cases.
>>
I don't program professionally, and as a hobby I have a hard time having fun with languages like Python because I feel like I'm not really doing much myself, even if you limit the number of libraries you use everything is so heavily abstracted that it doesn't feel as if you're really doing anything. I much prefer to write in C because the additional challenge of having to figure out how to implement everything with the limited standard library as you go along. Say you want to write an IRC bot in Python, even if you don't use a preexisting IRC library it has all the data structures and simple abstractions prebaked for you and in the end all you've done is implement the IRC protocol. I get that this is a good thing for productivity, but I hate it from a hobbyist perspective. It's the equivalent of being into model planes for example, and instead of getting the parts of the plane and building/painting it yourself, it arrives prebuilt and you just need to paint it.

Overall I just don't find Python "fun", even if I can see its' value where productivity is concerned.
>>
>>62097788
these dubs don't lie
>>
>>62097631
sucks ass and slow as dick
>>
>>62097631
It's shit, has bad performance, majority of users/devs are stuck on older versions. It's the windows 8 of programming languages.
>>
It's ok but people need to stop recommending it as a tool to "learn programming". When you learn Python all you do is learn Python, outside of the very basic core concepts nothing you learn in Python can carry over to most other popular programming languages and there are better ways to learn those.
>>
>>62099113
I kind of see your point. Writing something in C from scratch is kind of what is fun to me in programming itself. But when you reach a point when the things you are programming are much more interesting and fun to you than the technicalities, you kind of learn to love Python or whatever similar interpreted language you are into. When all you want to do is implement ideas quickly and draft algorithms, then you just don't want to spend hours to get it running in C.
>>
>>62099286
I wouldn't say that. Learning Python teaches you a much more modern and useful programming style than learning how to fiddle with pointers in C. I think in the end you need to learn about both sides, but I would say pretty much everything you do in 2017 is much closer to what you can learn in Python.
>>
>>62099286
Why do you say nothing carries over? It's rare that I've done stuff that's only a thing in Python.
>>
>>62098093
there's still interest in removing the GIL, pypy/gilectomy/pyparallel, hopefully one will catch on finally
>>
Good for network automation, I enjoy using it.
>>
>>62100546
The point is this was such a half-assed (relatively) modern language that multithreading has to be hacked onto it.
>>
I don't know Python, but I was able to cobble a script together and use Numpy, Pandas and Matplotlib to analyse some data. The syntax was very simple to understand.
>>
It's my quick & dirty language of choice. Except the code isn't dirty at all, it's quite readable and can be very concise without being confusing.
>>
>>62098945

What is Callable.
>>
>>62098945
Reading docs is hard.
>>
>>62100857
>The syntax was very simple to understand
the problem is when your project becomes bigger than 10,000 or 20,000 lines or something, who cares about the language syntax except students and hobbyists? I dealt with VHDL, TeX, c/c++, javascript, python, Golang, Makefile and HTML, it's never about the syntax after the first month of using the language
>>
>>62098945
Even if you type hint it as a callable, the language should let you type hint as the arguments and return type of the callable, otherwise you don't know what type it will return

Also, Hindley-Milner faggots. Learn it.
>>
Ruby or Python for small scripts ?
>>
>>62101295
ruby is a dead language, while python is a top 5 language, so guess
>>
>>62097768
If you integrate something like flake8 or pyflakes with your text editor / IDE it'll usually throw warnings and errors about incompatible data types or if you're trying to call methods which don't exist.
>>
>>62101352
>ruby is dead
not sure if srs
can people that don't have a job never comment again?
>>
File: author.png (1010KB, 800x1029px) Image search: [Google]
author.png
1010KB, 800x1029px
>>62101645
fuck off coraline
>>
>>62101664
good one. you sure showed me
>>
>>62097631
I wrote a file rename script in it that I frequently use. I don't think any other language would let me do it as easy as python, all I had to do was import os and the rest wrote itself.
Also great cause I can use the script on any OS, which is not something I could get from a bash script (writing it in bash was my original plan).
That aside, I wouldn't really use it for anything more though. It's great at what it does, and it's support for little convenient things like that seems unrivaled.
>>
>>62097631
That fact that what variables are in scope at a particular point is a dynamic property of the program makes me uncomfortable. Also lambdas are borked.
Otherwise, seems pretty standard for a dynamic imperative scripting language.
>>
>>62101645
ruby will be totally dead within a decade, that's for sure
>>
>>62097631
Good for datashit but I hope Julia kills it off.
>>
>>62102193
Nah, Go is it's true killer for actual applications. People will only use it for small scripts.
>>
>>62102193
>julia killing anything

julia is soon to be nonfree and it basically irrelevant.
>>
File: 1502653492250.jpg (41KB, 659x317px) Image search: [Google]
1502653492250.jpg
41KB, 659x317px
>>62097807
To be fair, having better typing than JS isn't really an achievement.
>>
>>62102871
Javascript finally got me to understand christianity
>>
>>62097631
Its an inconsistant and hacked together language. Its ok for learning by people who dont actually want to learn the language and just start coding by taking a quick look at a tutorial. The people who like Python are usually not programmers but people in other fields who have to use a programming language in their job, ie in biology, statistics. So it has a bunch of hand holding libraries like numpy, scikit, etc. Once you learn Python at a deep level you see that the language was just mashed together ad hoc. If you know the history of Python you would see that Guido built the language just by adding features that users who were trying out his language were requesting. Compared to Ruby the module system and scoping are an absolute mess. Syntax rules simply have to be memorized as their is no coherent design in how different syntax structures behave. Anyone who really enjoys the art of programming and want a language they can understand the entire unified design at a deep level will use Ruby. Pretty much everyone who uses Ruby loves it, but only if you take the time to learn it well.
>>
>>62102985
>Terry was secretly trying to teach /g/ theology
>>
>>62098086
>That it's three MS slower than autistic garbage like C is utterly irrelevant to me.
As someone who programs in both you are objectively incorrect
>>
>>62097631
Spyder is a nice IDE for it
Thread posts: 62
Thread images: 4


[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]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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 RandomArchive shows their content, archived.
If you need information for a Poster - contact them.