Live data from Hacker News

Ask HN: Why you use python most?

news.ycombinator.com

31–39 of 39 posts

Re: Ask HN: Why you use python most?

#31
post #28

Python is my go-to language and I write big batch jobs in it and profile them and use PyPy. I do it because it's so clean and concise. Recent C++ with lambda and auto is much improved but still not nearly as productive as Python. Likewise lambda has really made Java better, but lack of type inference really makes it clunky to write. I really want a statically typed Python. But because I don't have it, I choose Python…

> I really want a statically typed Python. You need to give type annotations a shot! https://www.python.org/dev/peps/pep-0484/#abstract pip install mypy mypy script.py

(I am the author of https://pypi.python.org/pypi/obiwan ;) )

Re: Ask HN: Why you use python most?

#32

Python is my go-to language and I write big batch jobs in it and profile them and use PyPy. I do it because it's so clean and concise. Recent C++ with lambda and auto is much improved but still not nearly as productive as Python. Likewise lambda has really made Java better, but lack of type inference really makes it clunky to write. I really want a statically typed Python. But because I don't have it, I choose Python…

Give Kotlin a try. The syntax should be quite familiar to someone coming from python, whilst you have access to full jvm ecosystem

Re: Ask HN: Why you use python most?

#33

I'm in ops and python is pre-installed on debian and fedora so besides writing stuff in bash, python is my next best thing without installing other languages. I would like to do more advanced things in python but I don't have any big projects / automation in my head yet.

ops is a great place for Python. How about backups? Backup monitoring? Don't roll your own monitoring solution, but tie Python scripts into Nagios, etc..

> Don't roll your own monitoring solution, but tie Python scripts into Nagios...

Why should a sysadmin use Nagios at all?

Re: Ask HN: Why you use python most?

#36
post #5

Earlier quoted context omitted.

if python is the language of ML and ML is the future, i dont think the snakes are going extinct.

1. There's no reason that Python has to be "the language of ML", especially not with so many new Python-inspired languages, like Go. ML is a performance-sensitive sector. Python's strong/established C FFI is its selling point here, since Python gives such nice icing on the cake buried in a C module like NumPy, but this will only matter as long as the newer languages are not fast enough for the performance-sensitive b…

there is no reason that python has to be the language of ML.

there is no reason that english has to be the language that is spoken when foreigners interact with each other. but somehow, it is. and it doesnt really change.

Re: Ask HN: Why you use python most?

#37
I have been using Python to interact with APIs, download data and files, then manipulate the data and put it into a database. Then I set up my own APIs (Python cgi-bin scripts) to access the data. I also use the PIL library for image thumbnailing.

Years ago I would have done all of this with Perl 5. I started using Python because so many people were talking about it. What really got me using it was that a programmer told me he thought Python pip libraries were as good as Perl CPAN libraries. He was right, although in some instances one particular library can be superior to the other's equivalent.

Re: Ask HN: Why you use python most?

#38
post #33

Earlier quoted context omitted.

ops is a great place for Python. How about backups? Backup monitoring? Don't roll your own monitoring solution, but tie Python scripts into Nagios, etc..

> Don't roll your own monitoring solution, but tie Python scripts into Nagios... Why should a sysadmin use Nagios at all?

Why not? Why wouldn't they? Real question. I'd think SySAdmins would use Nagios more than any other role, no?

Re: Ask HN: Why you use python most?

#39

Earlier quoted context omitted.

ops is a great place for Python. How about backups? Backup monitoring? Don't roll your own monitoring solution, but tie Python scripts into Nagios, etc..

Yea i'm tying python into that stuff where I can. But i'm hoping to do something not ops related with Python eventually. Maybe implement my own monitoring dashboard with django and some other front end framework.

Write a React app with Flask. You can write something in <1000 LOC that actually does something.
Post reply on HN