is it a meme language?
Python
python is great
It's hilarious reading their little platitudes about the ideals of the language, and then learning the language and realizing it's a clusterfuck
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
2 was alright, 3 and shit built on top of it is lipstick on a (dead) pig
Some languages people use to write code, other languages, people talk about because everyone else is talking, they're not writing code, they're just, they open up their terminals and they say to themselves "I'm going to be Silicon Valley, I'm the next millionaire," they don't have a real product but they can get funding, there's all this funding that goes nowhere, the government takes it away as taxes, you know, the thing about 20 million is it's only 10 million after taxes, instead of buying everything here, it goes to China, and that's where the next superbowl is gonna be
What does 3 do worse than 2?
Yes. If statements dependent on document formating is a nightmare to handle if the line count is hefty.
Learn Perl6 instant.
Perl 6
running python 2 code
What makes python not practical for your average programmer?
oh and running python 3 code, but that works most of the times (but not always, most recent minor version of major version 3 isnt compatible with every previous minor version of the same major version)
hola anons
The language doesn't matter so much, all of them are about the same, you get functions, objects, variables, all of that
The important part is the libraries and all the libraries for Python are made for 2 so they don't work on 3 so they have to be rewritten but nobody is going to rewrite them in a slightly different language because that's just stupid, they were already made, why would someone make them again? So basically when they made 3 different from 2 they killed all the libraries and they killed the only reason to use Python so they killed Python
It is a "me too" language that tries to be everything and excels at nothing.
so is python used less now than before release of python 3?
Yes it's used zero now
OP here. Any suggestions for a good beginner language?
Assembly you fucking nightcrawler
Objective C
python
VHDL
Assembly x86
JS
Unironically c++ or haskell
Python is a good language.
It's a well-designed version of BASIC/Pascal/Perl etc. Pascal is hot garbage - it's like a slow, useless, ugly version of C.
It's a shame there's limited money in creating programming tools anymore so nobody has created a Python version of VB/Delphi.
java faggot
Visual BASIC
I'm not sure if this is the right thread for it, but where is a good place I can learn Python? Apparently I'll need it for some work on my uni.
VB6 tho
Python is poor man's MATLAB, prove me wrong
>The language doesn't matter so much, all of them are about the same, you get functions, objects, variables
last I remember Python doesn't have homoiconicity and s-expressions
for what? learning programming? Unironically Racket
Not really, Jow Forums hates it because it has an appeal to more people.
It is a simple to learn language that you can use to bodge any personal projects together.
So far its been great, I've made several discord bots with it. And it was fairly easy.
GvR is dying.
Python is dead.
Is it still as slow as molasses?
>The language doesn't matter so much
Python has great syntax, but it has core issues that will plague it for a very long time, like GIL/lack of proper multithreading.
It's sort of the opposite of something like Java, where the syntax is shit but it has the lower-level stuff you need like proper concurrency support.
It's Python, there's probably a library for it
Python is the single most useful language anyone can learn. If you have any sort of actual fucking job that involves computers, you can do it better and faster using python in some way.
I like it
rate my code
If you're trying to evolve out of NEETdom, it's one of the most in-demand languages right now for both dev and ops.
I prefer single threaded for scripting langs. If you want parallelism then run multiple python instances or use a statically typed lang and interface it. Python is glue. You can't make sculptures out of glue
Too much spacing.
Huge-ass if around the entire thing instead of just doing if request.method != 'POST': return render_template('admin/login.html') to de-indent the main function body.
Too many temp variables.
I hope crypto.check_encrypted_password isn't homegrown.
5/10, would maintain but not a stellar example.
Here's how I'd write it btw:
@app.route('/admin/login', methods=('GET', 'POST'))
def admin_login():
if request.method == 'GET': return render_template('admin/login.html')
login_data = db.AMUser.get_login_data(request.form['user'])
if login_data and crypto.check_encrypted_password(request.form['pass'], str(...)) and login_data['roleid'] in (100, 200):
session['logged'] = True
session['user_id'] = login_data['id']
session['user_username'] = request.form['user']
session['user_roleid'] = login_data['roleid']
else:
# TODO: throttling a series of invalid logins
abort(403)
I usually leave that much temp variables to make debugging easier, I'll eventually start trimming it a bit after I got it working as I wanted. Nice tip on != 'POST'. Password checking is just a copied and pasted passlib example, I'm not very good at cryptography yet.
C or BASIC if you're a 5 year old
>I prefer single threaded for scripting langs
Sure, it might work for scripting, but it's unfortunately also used fairly commonly as a web backend language. It's compiled to bytecode and run in a JVM just like Java, but it doesn't have the performance nor proper multithreading.
>then run multiple python instances
But that's horribly inefficient.
>chk_user = bool(...) and then using it in boolean logic later
Unnecessary to bool() it first.
Been using it for work over the past 2 years from scripts to web development to pen testing to petrinent implementations to data analysis. In a professional environment it gets the job done and quickly. At home I use it for scripts mostly to supplement C projects
it's good until you use it in a big project, that's when you discover you just got cancer
Nothing wrong with Python. People here like to complain that it's slow, but that's because they're retarded. If you need speed use something else.
You cannot make websites in MATLAB.
It's faster than whenever you used it but it's still slower than Perl. Nevertheless optimizations come every week so it'll be there soon enough. Of course it is faster than Python. (Then again everything is faster than Python.)
it's a tool, you don't complain about a hammer being ugly, do you?