Live data from Hacker News

Python Is Eating the World

zdnet.com

801–810 of 993 posts

Re: Python Is Eating the World

#801

It's so refreshing to not see anyone here whining about Python forcing them to indent their code properly. The kind of people who think that's a PROBLEM instead of a FEATURE really should not be ever writing any new code, and instead should be punished by forcing them to maintain other people's code written with that same lazy misguided attitude, until they recognize how self indulgent, inconsiderate, and disrespectf…

As much of a fan of Python's syntax as I am, there are real problems with whitespace-sensitive syntax.

It's not that it's hard to parse or necessarily to write.

The trouble is that generic tooling around text is really bad, especially various websites and chat boards still haven't figured it out.

Code is a way to share ideas, which was one of GvR's key insights. People share a ton of code in discussions and such and WSS makes it a bear; even here I have to tediously type in four spaces to share a snippet of Python.

> The kind of people who think that's a PROBLEM instead of a FEATURE really should not be ever writing any new code, and instead should be punished by forcing them to maintain other people's code written with that same lazy misguided attitude, until they recognize how self indulgent, inconsiderate, and disrespectful that is not just to other people who have to read their code, but also to themselves.

Having gotten worked up like this myself plenty of times, I think you're treating someone doing a bad job as an injustice to you.

Unless there's a malign intent, it's simply not. And elevating it to an injustice is creating stress and strife for yourself (which you're venting here) that you don't need.

Re: Python Is Eating the World

#802

Earlier quoted context omitted.

It's not my project; I'm just a collaborator. My experience has been that a very tiny minority of Python code out there is written in this style, so unless you're only starting projects from scratch, you can't benefit from it.

you can gradually type (probably don't use --strict in that case). It might not be a ton of benefit if you aren't actually writing new code though. There's a good document on this: https://mypy.readthedocs.io/en/latest/existing_code.html

And that'd be fine if everyone were on board with it and that were the general direction of the project, but I don't think that's true.

I've never seen a strict, type-annotated Python project out there in the wild, and I've seen a decent amount of them. A random non-primary-contributor isn't going to have much luck stepping into an established project and getting everyone to go along with adding annotations to the whole thing.

And if I were starting a project from scratch, rather than coercing the language to do something it wasn't really designed for, I'd just use a language that has first-class support for types directly in the compiler, like Java or Go.

Re: Python Is Eating the World

#803

Earlier quoted context omitted.

I honestly think you've just worked on bad projects. Python isn't the perfect language but the quality of the available libraries makes it awesome. The individual quality of projects in any language will always vary.

My criticism is mostly aimed at the language (and its standard library) itself. The major projects I worked on, I architected from the beginning. It is when designing and architecting reliable systems that Python's terrible nature hits you in the face, especially if you're used to better languages. Take the nonsensical but alluring Python motto "There should be one -- and preferably only one -- obvious way to do it."…

Don't get me wrong, it is obviously your right to dislike a language.

I've designed plenty of reliable systems in Python without much issues whatsoever with making them reliable.

I have had some problems with code organization over the years (Python certainly lets you "do your own thing" which can lead to issues with organization over time) however I haven't had reliability, stability, or speed issues for 95% of the problems I've worked on.

Only times I've ever personally needed a faster language - when submitting problems in Python to online courses (algo). Then I used C#. Whatever, not a big deal :)

Python says the goal is to have "one right way" to do things, but certainly there are many, many ways to do any of those things.

> I want modeling flexibility, the ability to examine a problem from multiple perspectives and explore the solution space in-parallel from multiple angles of attack.

Can you give an example of where Python doesn't allow you to do this? I've never had this issue. Actually the opposite: mocking solutions are extremely easy with Python IMO and the tooling available (even the uber-free stuff) is awesome and easy to debug with (much easier than using Visual Studio for example - not saying VS is a bad app, it is great).

Re: Python Is Eating the World

#804
post #659

Earlier quoted context omitted.

Yes, funny, but seriously, where's the threat model where you've analyzed the risks of installing code from GitHub over HTTPS and found it to be less secure?

To be clear, either of these methods can have problems, it's not unique to curl and your shell of choice. Some of the better open source projects will say up front that if you are concerned about this kind of thing, feel free to read the installer script and decide for yourself if everything's kosher.

Yes, my point was that if you're worried about running someone else's code the answer is to audit that code rather than the transport layer. There are valid concerns with HTTP or in scenarios where something could be targeted to a single user, but neither of those are relevant to 99% of the time people raise this complaint.

Re: Python Is Eating the World

#805
post #367

Earlier quoted context omitted.

I sometimes have a tendency to focus only on the negative aspects of some things, while ignoring that all in all, those things are fine. I don't think I'm alone in that, certainly not in our line of work. A call to "snap out of it" seems that it can help in such situations. Python is not a programming language that should make people burn out or angry. Very few languages should be capable of that, so I think this iss…

The programming language is one of the central tools though, the very language in which you express programs. If you don't care about that , caring about "building good software" feels hollow.

The key point is that there are many languages that are more than good enough for almost any kind of problem solving.

Building good software is firstly about process and skills.

Re: Python Is Eating the World

#806

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Agreed. I really don't understand all these buckets filth being poured on Python in this thread. It's a first language I worked with in my life that just clicked with my brain and doesn't just drain me. I would take a Python job over a Java/C/C++/Go/Rust any day. There's some languages that could pull me away from Python (Nim, Crystal) but they're nowhere popular enough to move wholesale to them.

> I would take a Python job over a Java/C/C++/Go/Rust any day.

Why do you group those languages like they’re similar but different from nim and crystal? They’re wildly different in terms of their target domain, runtime models, etc. Go and Java are general purpose application languages and the others are more suited for systems or performance critical applications.

Re: Python Is Eating the World

#807
post #791

Earlier quoted context omitted.

It's not just about speed. Great mature libraries have been written in C over the decades. Rewriting them in a new language is a herculean effort. Writing bindings to them lets you use the fruit of all that labor.

What you say is true, yet, I observe that people undertake that herculean effort with some frequency. Whether that's a good idea, and why that is, those would be entirely separate conversations. But it's just an observable fact that languages pick up native implementations of core functionality over time, subject to certain performance restrictions (e.g., I'm sure that if it wouldn't be unusably slow, Python would ha…

The effort I'm familiar with is the many attempts to make a decent linear algebra library in haskell. There are a number of libraries with huge work put in, but none has reached blas/lapack parity. Nothing's remotely comparable to numpy in ease of use yet. It picks up more libraries as time goes on, and the existing ones mature, but it's so slow that I'm skeptical they'll ever match numpy's usefulness a decade ago.

Re: Python Is Eating the World

#808

Earlier quoted context omitted.

Pycharm is pretty excellent in terms of IDEs. It's quite literally IntelliJ for python.

Python’s lack of typing means the IDE heavily uses heuristics. It’s nowhere near as good as Intellisense on C#. Take refactoring a variable name as an example.

>Take refactoring a variable name as an example.

I've only ever really used intellij and pycharm, so I don't know what intellisense can offer for refactoring a variable name, but I'm curious. Can you explain what you mean?

Re: Python Is Eating the World

#809
post #598

Earlier quoted context omitted.

> curl ... | python Ah goddamnit. 868 lines, including os.rmtree calls and stuff. Also installable via pip, but... "not recommended", and: [RuntimeError] Poetry was not installed with the recommended installer. Cannot update automatically.

It’s running over HTTPS from an auditable source. Is that _really_ so much worse than a pip install, and can you explain in detail why you believe that to be true?

it's pretty easy to detect only when you are being piped and then only include malicious code then

Re: Python Is Eating the World

#810
post #513

Earlier quoted context omitted.

Agreed. I really don't understand all these buckets filth being poured on Python in this thread. It's a first language I worked with in my life that just clicked with my brain and doesn't just drain me. I would take a Python job over a Java/C/C++/Go/Rust any day. There's some languages that could pull me away from Python (Nim, Crystal) but they're nowhere popular enough to move wholesale to them.

> I would take a Python job over a Java/C/C++/Go/Rust any day it's funny, I feel the exact opposite. I work on a team that maintains a digital catalog, and a lot of what we write is about taking in asset- and metadata files, asynchronously processing them, and then publishing that to a denormalized read-optimized data store. We often joke that we mostly take data from 'over here' and put it 'over there'. All our stuf…

Interesting that you mention the difficult problems being around CI/CD and operations. I had to get our Python application’s CI/CD pipeline off the ground and it was much harder than it would have been in Go, for example. Notably, figuring out how to manage dependencies and run tests in a way that was reasonably performant was a massive challenge. We made the mistake of using pipenv, but downloading dependencies took half an hour. We should use something like Bazel to solve those problems, but it doesn’t support Python3 (allegedly some folks have hacked things together to get it working, but I haven’t managed to reproduce it). Further, packing dependencies into a lambda function is tough because Python libs are often bloated and static analysis tools are lacking, making it hard to trim the tree. I’m sure they’re are solutions, but they’re hard to find relative to Go. Not sure about Java or other languages.
Post reply on HN