Live data from Hacker News

Why Python keeps growing, explained

github.blog

451–459 of 459 posts

Re: Why Python keeps growing, explained

#451
post #86

Earlier quoted context omitted.

I use the same combo: lots of Python to analyse problems, test algos, process data, etc. Then, once I settle on a solution but still need more performance (outside GPU's), I go to rust.

Genuinely curious, why do you need Rust?

I'm simulating an audio speaker in real time. So I do the data crunching, model fitting, etc. in python and this gives me a godd theoretical model of the speaker. But to be able to make a simulation in realtime, I need lots of speed so rust makes sense there (moreover, the code I have to plug that in is rust too, so one more reason :-)). (now tbh, my realtime needs are not super hard, so I can avoid a DSP and a real time OS :-) )

I don't need rust specifically. It's just that its memory and thread management really help me to continue what I do in python: focusing on my core business instead of technical stuff.

The less I code the better I feel :-)

Re: Why Python keeps growing, explained

#452

I have been a heavy Python user now about 15 years, but for me now I'm increasingly reaching for modern JavaScript and particularly TypeScript to do the things I would have traditionally done with Python. ES modules, fat arrow expressions, and all the other nice new syntax and library features have made the language so more pleasant to use. In many ways the ergonomics of TypeScript in particular are far superior to P…

If you're looking for a Django replacement, check out Adonis. Laravel in PHP was heavily inspired by Django but is much better and Adonis is an exact clone of Laravel. I think you'd like it.

Re: Why Python keeps growing, explained

#453

Earlier quoted context omitted.

I have no idea why you say that it's a scratchpad or a toy language consdering that far more production lines of code are getting written in Python nowadays than practically any other language with the possible exception of Java.

But that's the same with Excel: massive usage for throwaway projects with loose or non-existing requirements or performance bounds that end-up in production. Python is widely used, but not for substantial programming in large projects - say, projects over 100 kloc. Python hit the "quick and dirty" sweet spot of programming.

This is absolutely not true. I’ve made my living working with Python and there’s an astounding amount of large Python codebases. Onstage and YouTube alone have millions of lines of code. Hedge funds and fintechs base their entire data processing workflows around Python batch jobs. Django is about as popular as Rails and powers millions of websites and backends.

None of those applications are toys. I have no idea where your misperception is coming from.

Re: Why Python keeps growing, explained

#454

Earlier quoted context omitted.

>Two ways to delimit blocks is redundant. It isn't redundant though because without delimiting symbols for a code block you lose the ability to have your code autoformatted in certain situations. Here's a trivial example to illustrate the point: def example(): x = 5 print("Hello world") What's the mistake here? Depending on whether the print is part of the function, it should either be indented or have a newline befo…

The first example is a syntax error, which must be fixed, and takes a second. Not a PITA, just a part of normal day to day refactoring. I see how a formatter could help you out in this specific situation. However you are trading typing of redundant characters every few seconds and readability per minute, to avoid an issue that happens once or twice a day, per week on a mature project. In other words we generally don’…

> Readability is definitely a strength of Python, not a weakness.

I find Python to be on the lower end of average in terms of readability.

Re: Why Python keeps growing, explained

#455

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…

Agree, I thought it was a pretty low-effort article until I got to the end and realized it was just an ad for CodeSpaces and CoPilot.

I find CoPilot to be super useful, but I would not use CodeSpaces due to safety concerns and limitations in team management.

Re: Why Python keeps growing, explained

#456

Earlier quoted context omitted.

As a pretty experienced python dev who has never worked professionally with Django / Flask or Numpy, I have a hard time finding job postings without those seemingly hard requirements.

I'm curious as to what you've worked on in your career? I mainly ask because we are 100% Django/Flask. :)

It's been split between three areas - writing mathematical code that wouldn't really benefit from numpy, at least not at first (think engineering design codes - step-by-step calculations where the output has to be verifiable by a human; charts and graphs aren't the focus (I'm not at this company anymore)), writing testing infrastructure for a legacy client/server application that was designed around the time Ethernet was invented (well before I was born), and writing library code for my QA team to write tests for said application.

Most of these domains are sort of document-oriented - for the math stuff, the hard part is just defining the model, and there is only one "thing" to operate on. For testing, the units of work are test cases and steps, which _could_ be database entries, but work better in practice as a document that a non-technical QA team member could edit by hand. Results are fed to a SaaS that keeps all the historical test result data.

Not that I couldn't pick up either one of these tools and use them (I'm a mechanical engineer by training and got into Python because I didn't like using Matlab/Octave), I've just never needed them professionally. But that doesn't get me past the resume filters :(

Re: Why Python keeps growing, explained

#457
post #333

Earlier quoted context omitted.

Code is still completely unreadable with explicit block markers, if it is without appropriate indentation and newlines. That's like trying to read minified javascript. And python forces you to have these, to some extent.

I used to think the same, but go fmt totally changed my mind on this. Most languages now have a code formatted that is integrated in all popular text editors and IDEs.

I agree. Beyond go fmt, I'm a huge fan of terraform fmt (for terraform) and `black` for python.

Re: Why Python keeps growing, explained

#458

Earlier quoted context omitted.

But that's the same with Excel: massive usage for throwaway projects with loose or non-existing requirements or performance bounds that end-up in production. Python is widely used, but not for substantial programming in large projects - say, projects over 100 kloc. Python hit the "quick and dirty" sweet spot of programming.

This is absolutely not true. I’ve made my living working with Python and there’s an astounding amount of large Python codebases. Onstage and YouTube alone have millions of lines of code. Hedge funds and fintechs base their entire data processing workflows around Python batch jobs. Django is about as popular as Rails and powers millions of websites and backends. None of those applications are toys. I have no idea wher…

I guess I'm more than a little prejudiced from trying to maintain all sorts of CI tools, web applications and other largeish programs somebody initially hacked in Python in an afternoon and which grew to become "vital infrastructure". The lack of typing bytes you hard and the optional typing that has been shoehorned into the language is irrelevant in practice.

All sorts of problems would simply have not existed if the proper language was used from the beginning, as opposed to the one where anyone can hack most easily.

Re: Why Python keeps growing, explained

#459

Earlier quoted context omitted.

I'm curious as to what you've worked on in your career? I mainly ask because we are 100% Django/Flask. :)

It's been split between three areas - writing mathematical code that wouldn't really benefit from numpy, at least not at first (think engineering design codes - step-by-step calculations where the output has to be verifiable by a human; charts and graphs aren't the focus (I'm not at this company anymore)), writing testing infrastructure for a legacy client/server application that was designed around the time Ethernet…

Appreciate the response. Thanks!
Post reply on HN