Live data from Hacker News

Why Python keeps growing, explained

github.blog

101–110 of 459 posts

Re: Why Python keeps growing, explained

#101
post #89

Earlier quoted context omitted.

>"Also if I (a programmer) want to write really really fast code I'm probably reaching for tools like tensorflow, numpy, or jax." Very limited view which ignores way too many areas.

Sure, examples?

Your OS, the linear algebra libraries themselves, much of the user-facing software that you use (latency sensitive rather than throughput sensitive), image/video encoding/decoding, most of the language runtimes that you use, high volume webservers, high volume data processing (where your data is not already some nice flat list of numbers you're operating on with tensor operations), for some examples.

Really, for almost any X, somebody somewhere has to do X with strict performance requirements (or at very large scale, so better perf == savings)

Most of these python libraries are only fast for relatively large and relatively standard operations in the first place. If you have a lot of small/weird computations, they come with a ton of overhead. I've personally had to write my own fast linear algebra libraries since our hot loop was a sort of modified tropical algebra once.

Re: Why Python keeps growing, explained

#102
post #11

Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything. By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves progr…

> it’s the second best language for anything

Anything that doesn't require high performance that is. Is there any 3D game engine for python yet? I guess Godot has gdscript which is 90% python by syntax, but that doesn't quite count I think.

Re: Why Python keeps growing, explained

#103
post #37

Earlier quoted context omitted.

I started in Python, as a Biologist (hooray for Jupyter-lab, coding so visually, in small steps, with output just there is so great when starting to learn Python). I ventured into other languages every now and then. For example I tried to make an Android app in Kotlin that gets info from some API. I expect something like this but with more brackets everywhere: import request data = request.get(https://some.api/get_so…

This isn't really programming though. This is just calling out to seaborn and pandas with an unpleasant interface (Python).

"That's not programming, that's just calling libc with an unpleasant interface"

Re: Why Python keeps growing, explained

#105
post #65

Earlier quoted context omitted.

Realistically something that takes 1 second in C++ will take 10 seconds (if you write efficient python and lean heavily on fast libraries) to 10 minutes in python. But the rest of your point stands

Damn! Is the rule of thumb really a 10x performance hit between Python/C++? I don’t doubt you’re correct, I’m just thinking of all the unnecessary cycles I put my poor CPU through.

Well at least 10x, sometimes more. Not really surprising when you think about that it's a VM reading and parsing your code as a string at runtime.

Re: Why Python keeps growing, explained

#106

I think one reason for Python growing popularity is because it's become the default tool in some domains whether it is the best tool or not. This week our Director ordered a total rewrite of two years of work in Python. His rationale: it's what everyone else uses in this space. No reason specific to our use case, just simply to follow the herd. I realise that a large community translates into easy hiring and rich eco…

... and Python _became_ the default tool because the de facto developer consensus (after years of competing languages) is that an interpreted language should

    = be usable, and 

    = provide a set of data structures that an educated programmer *expects to find when scripting*.
Python literally sucked less than the alternatives.

Re: Why Python keeps growing, explained

#108
post #11

Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything. By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves progr…

> it’s the second best language for anything Anything that doesn't require high performance that is. Is there any 3D game engine for python yet? I guess Godot has gdscript which is 90% python by syntax, but that doesn't quite count I think.

You won't get high performance out of Python directly, but there are a lot of Python libraries that use C or a powerful low level language underneath. The heavy lifting in so much of machine learning is CUDA, but most people involved in ML are writing Python.

Re: Why Python keeps growing, explained

#109
This was already posted at https://news.ycombinator.com/item?id=35000415, I don't know why it didn't detect the duplicate. I'll repost my comment from there:

This is a strange article. It's got the talking point about Python that we were hearing about 10 years ago - "tired of those pesky curly brackets in Java, try this new language you might not have heard of: Python!". Who reading the GitHub blog has not heard of Python?

Also, that snippet used in the "What is Python commonly used for" section is strange:

  import antigravity
  
  def main():
      antigravity.fly()

  if __name__ == '__main__':
      main()
It's overly verbosely written (especially given the example just above about how you don't need main function in Python) and refers just to an insider joke/Easter egg. I can't see that it's going to convince anyone to try Python, only make them feel that they're on the outside of a joke.

It then ends with what seems like it might have been the point of the article, an advert for Copilot. It seems the way to get started writing Python is to write a short comment and then spam and let the AI auto-complete your project.

(Also, and perhaps less importantly, looking at the author's GitHub profile I can't see a single instance of Python there. Though I'm not doing a deep-dive as that feel overly picky and there's plenty of private contributions that could well be Python.)

Re: Why Python keeps growing, explained

#110

I remember when Twitter rewrote the code in Java because Ruby wasn't suited for the task. Probably this will happen to many large Python code bases in the future.

Every codebase will eventually be rewritten in Rust sometime before the heat death of the universe.
Post reply on HN