Python

python general
bonus:
whats our official opinion of python

Other urls found in this thread:

stackoverflow.com/questions/1825857/how-much-of-numpy-and-scipy-is-in-c
pastebin.com/vwRrMfdS
pythonprogramming.net/
twitter.com/NSFWRedditGif

I had to use python for a university assignment once.
I didn't like it.

Comfiest language in existence

Based language. Triggers the unemployable half of Sup Forums like a boss for being so easy and useful.

Was able to make my first full program using python. Its simple to use yet powerful enough to be useful.

trying to git gud at it. Have done some stuff here and there.
I have a hard time seeing the use for anything serious, mostly because of performance.
It's nice to prototype in, but am I better off just going all out C++ so I can prototype faster in that and not go down on performance?

I also have some security concerns, though that's entirely there in C++ too, but it's easier to avoid because your use of memory and types (thinking int overflows) is more transparent.

Thoughts?

good high-level language for writing easy APIs for automating low-level processes

shit slow and sucks with arithmetic tho

i use it frequently to automate running blocks of reusable SQL queries. SQL handles the number crunching, Python just makes it dead simple to glue the blocks together in whatever order you want

>sucks with arithmetic
Numpy

Python is very comfy for scripting, but I wouldn't write any projects in it.

It has it's niche.

numpy is effectively just a big wrapper class for C scripts, basically what i described except i used SQL as an example

stackoverflow.com/questions/1825857/how-much-of-numpy-and-scipy-is-in-c

>using python to auto download torrents, based on what day it is

Feels comfy

>improving keylogger for windows in python.

pandas is the best library in existence

my nigga

got the same issues atm dont really know where to start looking into more advanced stuff
been trying to find stuff like programming challenges but didnt find any good ones yet, anyone knows whats good to do in this situation?

i should mention ive been told i need to improve my python for an upcoming job and trying to cover as much as possible in the next 2 weeks

Python allows you to write a correct solution quickly.
If you're interested in performance you're using the wrong language.
HOWEVER, you can gain a boost if you write in Cython, use JIT plugins, etc.
If you need an even greater boost you can write the business logic you require in C or C++
If that still doesn't help, consider using another language for the project, or for the specific process which is performance critical.

What sort of job are you applying for?
Have you tried Codewars?

...

Fast, sleek, modern.
Everything you could want in a programming language.

jython anyone? :^)

I don't think Yuki would use it, although you could say she is already an interpreter.

I've used it for like 2 hours

>try to learn java
>this shit's fucking ridiculous
>learn python instead

yes/no?

mind to share keylogger?

If you're just learning to program, it doesn't matter much what language you start out with.

Fucking slow as shit. Even meme languages like Lisp are faster, and more sane.

redit was built with python

>Python is literally redit

>Python:
Simple and useful, slow though

>C
Fast and useful, complex and unintelligable

>Julia
best of both worlds.

Fuck python, Julia is superior.

I swear to god if only employers didnt force you to write shit in a specific language, or atleast if all the other languages were more popular I would be so fucking happy. Julia is indeed pretty nice, but like no one uses it for codebases etc. So if you actually wanna make some money you're stuck with the same old bullshit

want python but superior speed?
Try Julia:
>same syntax as python
>execution time comparable to C (and sometimes faster)

Is there anyway to undo the travesty we have set ourselves in?

If I wanted to use a niche language, I'd just use Common Lisp.

Looks like Sub-Zero hugging Scorpion in the thumbnail.

but common lisp is slower?

Does Julia use Lisp syntax?

>meme languages like Lisp
Your opinions are invalid

lemmie check

Why shill a language you don't know?

nope, It uses python syntax.
i know the language. i don't know lisp though which is shy i had to check if the syntax is the same or not.

I want to FUCK that anime girl

>Fast

fucking hate python. every single time i write something longer than a few lines, the code becomes unmanageable and i have never ending 'unexpected indentantions' just because i fucked up my spaces on one line. and it's slow as shit

i just wanna fuck something

wish my dick fit in the optical drive

Pick one for me to learn
>go
>rust

lisp

I bet it does

>Julia.
If not then:
>Go

I'm trying to learn python but once I start reading about coding I immediately go crosseyed, start yawning, I can't think straight. What the fuck is wrong with me.

>whats our official opinion of python
Slow ass dog shit.

I'm incredibly new
How feasible is it to write out all your functions in a faster language and then using Python to call them?
That was me a week ago, just start and don't look back. It's pretty interesting once you can start seeing all the examples and break down what each line does

I just can't get the syntactical whitespace

Would picking a project and then learning how to make it work be a good idea to learn Python? Sort of picking it up as I go along instead of following a guide?

I've always remembered the most while actually makings something.

I usually just got a good guide, but instead of reading it front to back, used it to look up and understand the different concepts as I needed them.

What do you have to lose by giving a shot?

reddit is literally python*

IDEs will take care of it like they do with brackets

have you tried not being retarded and writing legible code?

its pretty good, im stating on python and even that i feel like a retarded hitting the water with a stick python is a good language

Doesn't get much easier than print('shit')

I can do both. Why do you assume code can be written only one way.

It doesn't make it a bad language because I don't like one aspect of it.

Don't be an asshat.

>Whitespace syntax

desu its kind of messy, I like to have title of the window (web browser or whatever) along with what they're typing, so its kind of clunky, but here you go.

The paste expires in one week.
>pastebin.com/vwRrMfdS

>features I still want to add
>mutex
>remote output
>detect uppercase letters (by default all keystrokes are in uppercase, but this is problematic if you need a password that require case sensitivity) but I had the string convert them to lower case. I just picked it up again, hopefully I can make it more elegant.

>being a brainlet

Python & django = best for web development

If you use it to make applications then you're retarded. But vpython is a ok my guy

Python is much more complex than C. It's easier to write in Python.

How to package a python application for running on other machines?

Seems line a python fork based om pypy JIT.

Q: Does anyone actually use Type Hinting?
For what? Is it nice?

9/10 language.

Reminder that Kobayashi from no maid dragon literally uses Python

Had to do a few assignments in Python for one of my lectures and I like it more than the other shit languages I had to use for my other lectures (Haskell/Java).

Great for system administration. I find C more fun to use, though.

D for dragon
P for programming

C
>Spending 5h writing a simple function
>Spend the next week bug fixing.

Python
>Spend 1h writing a simple function
>Spend 30 bug fixing

Ye C sure is more fun user

- (really) bad performances
- poorly designed plt wise
- lot of libraries are poorly written
- python2 vs python mess
- most of python programmers are mediocre
- no more interesting to adopt
- stuff being continually added to the language (async, typing, ...)
- insignificant in both amateur and pro game development

+ stuff being continually added to the language (yeah, it's also a positive)
+ huge adoption in both the industry and the academics
+ great and friendly community
+ employment
+ has a builtin package manager
+ it's just works
+ forced indentation of code

honestly, clisp/scheme/racket blow out python

i highly doubt that.

Julia: 19.321510121 seconds time elapsed
Common Lisp SBCL: 3.015000773 seconds time elapsed

Name an example program that Python is supposedly slow in.
Preferably something I can try out myself.

Not quite as good as Ruby.

Ok, now put out the type annotations of your CL code and put them into your Julia code and turn on optimizations in Julia.
Tada, CL is beaten.

It's all right. As a C++ guy I don't like the way it boxes you into certain ways of doing things, but I appreciate the stronger typing than other scripting languages and code tends to be very readable.

Anything that requires math really.
You might then start to Wonder, why does big-data and scientists use it then?
The answer being that python has great libs that compiles to c and therefore enableing math at near c

I love python, string.split is my jam

iterating through for loops.
nesting them naturally multiplies the problem. try writing insertion sort as an example

Is pythonprogramming.net/ any good?

I'm trying to implement some simple NLP work into a webapp and that web doesn't stop popping on internet searches.

They only have one article about what I'm trying to do and it's awful. I haven't used the site apart from that.

> flat is better than nested
Using iterators and the itertools library can cut down on the ugliness.
Preferably, you should never index a list or a tuple in python.

But about single threaded performance unless you want to rape your memory.
I still hadn't tried using blaze with subprocess but I guess the world will crash and burn if I do

Currently trying to make a python testing script at work using pyserial and some other assorted bullshit for a nodemcu chip

Python is great for scripting, but I'm not entirely sure why my coworker decided to use pyserial for this shit instead of C or C++

setup.py

Python is great. Use it for scientific computing. Most people who have a negative opinion about it usually don't understand what it's supposed to be and how to use it. Especially shit opinions such as "It's slower than C" is something only idiots would ever say. You are never actually implementing any algorithms in Python, if you do, you don't use it correctly. If you take advantage of the huge amount of libraries in Python, then you usually end up with code that is a LOT faster than anything you could come up with in C in the same time.

>Haskell
>shit
You're just too new to get it.

>I'm too stupid to write in a real language so I'm going to rely on dogshit slow libraries other people wrote
If you're not a programmer, at all, sure, use python libraries to crunch data.
If you can program in any capacity, then you're a fucking retard if you use that god awful language.

Maybe if you have lots of time to waste, but certainly not if you've got shit to do. Anybody who implements any kind of number crunching in a low level language, is a fucking idiot. It's only an option if you really have to implement algorithms that are not available anywhere. And that is rather rare usually.

So much this. I use Python for work and my boss loves how fast I can implement stuff in it.

Newsflash for neckbeards. The customer doesnt care if a program takes 5 second to start or if a task takes 200ms instead of 20ms, to complete. Everybody cares about the time it takes to get a product ready.

Okay. Thank you.

What should I read after 'Automate the Boring Stuff'?

Some people care about running 1 server instead of 50, so there's that.

This is probably the best thread to ask in.

Every time that I try to work in python I spend ages sitting there trying to work out if i'm meant to use python 2 or 3. I really strongly dislike that they have two different versions out there.

I'd really like to get better at python for some of the reasons mentioned in the thread (fast to write in etc.) but this issue annoys me a lot.

Am I the only one?

Which version is best to use? is 2 going to die soon?

bump.

Use 3. The only excuse for using python 2 for a new project is that you NEED a library that is python 2 only, and that's pretty rare now

bump

This is a lie that Python users keep telling noobs, that *everyone* uses Python 3 when actually almost no one uses 3 as all the libraries are all in Python 2 and the Python community is not going to rewrite the entire Python libraries for no appreciable difference

try starting a project, or solving python questions on SO or reddit /learnpython

>and that's pretty rare now
That's not even remotely accurate