Live data from Hacker News

Why Python keeps growing, explained

github.blog

331–340 of 459 posts

Re: Why Python keeps growing, explained

#331
post #169

One thing I’d add to this conversation, though I’m certain it’s already been stated: As many have mentioned, there is a large subset of the user base that uses Python for applied purposes in unrelated fields that couldn’t care less about more granular aspects of optimization. I work as a research assistant for international finance faculty and I would say that compared to the average Hackernews reader, I’m technologi…

when it comes to slightly more non simple use cases involving parallelism and concurrency python and their imperative kin starts falling quite short of basic needs that are easily satisfied by

fp languages like

ocaml

haskell

racket

common lisp

erlang

elixir

or rust/golang

but even if the code is single threaded and not hampered by GIL limitations python tends to be super slow imho; also debugging dynamic python and imperative stateful python after a certain code base size >10k LOC gets extremely painful

Re: Why Python keeps growing, explained

#332

Earlier quoted context omitted.

In my search for a senior Python developer I have encountered dozens and dozens of resumes whose Python experience consists almost exclusively of Numpy and data entry. Not at all the skill set I’m looking for.

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. :)

Re: Why Python keeps growing, explained

#333
post #57

It's interesting that people keep claiming that indentation-based blocks makes Python easier to learn and read. I've been teaching programming to students in banking, finance and insurance for a few years, using Python, and my experience with them is the opposite. They have been struggling with that a lot. They didn't pay too much attention to white spaces and tabs, probably because they are "invisible", and couldn't…

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.

Re: Why Python keeps growing, explained

#334
post #169

One thing I’d add to this conversation, though I’m certain it’s already been stated: As many have mentioned, there is a large subset of the user base that uses Python for applied purposes in unrelated fields that couldn’t care less about more granular aspects of optimization. I work as a research assistant for international finance faculty and I would say that compared to the average Hackernews reader, I’m technologi…

I hate to admit that I very often start the python repl to just do some simple calculations. I always have multiple terminals open so instead of opening a calculator I just use python in one of the terminals.

> I very often start the python repl to just do some simple calculations.

If you use the python repl a lot and haven't heard of it, ptpython is worth checking out as a repl replacement. I find it to be much more ergonomic.

Re: Why Python keeps growing, explained

#335
post #169

One thing I’d add to this conversation, though I’m certain it’s already been stated: As many have mentioned, there is a large subset of the user base that uses Python for applied purposes in unrelated fields that couldn’t care less about more granular aspects of optimization. I work as a research assistant for international finance faculty and I would say that compared to the average Hackernews reader, I’m technologi…

when it comes to slightly more non simple use cases involving parallelism and concurrency python and their imperative kin starts falling quite short of basic needs that are easily satisfied by fp languages like ocaml haskell racket common lisp erlang elixir or rust/golang but even if the code is single threaded and not hampered by GIL limitations python tends to be super slow imho; also debugging dynamic python and i…

A lot of these problem spaces can get away with single threaded performance because maybe they're generating a report or running an analysis once a day or at even slower frequency. I work in a field where numerical correctness and readability is important for prototyping control algorithms (I work on advanced sensors) and python satisfies for those properties for our analysis and prototyping work.

When we really want or need performance we rewrite the slow part in C++ and use pybind to call into it. For all the real implementations that run in a soft real time system, everything is done in C++ or C depending on the ecosystem.

Re: Why Python keeps growing, explained

#336
post #73

Earlier quoted context omitted.

Meson is a build system written in python: https://mesonbuild.com/index.html Getting python bootstrapped is less easy than getting make bootstrapped, plus python isn't a GNU tool so I don't see them adding a dependency on it to all their packages. GNU Make is really far more sophisticated than people give it credit for and it's not that easy to replace it.

I was thinking of using python as a script (duh). > GNU Make is really far more sophisticated than people give it credit for and it's not that easy to replace it. Since its turing complete, it should be able to do everything make can. For example, to compile a C project involves something like: 1. grab all the C files inside `src/`. 2. join the filenames with whitespace delimiter 3. execute `gcc ` It can also be used…

Well as I pointed out, it does happen e.g. in Meson.

Make doesn't do any of the things you mention - it just works out what targets need to be rebuilt and the code to do it is in the rules that you have to write in a shell language like bash.

I admit you can use builtin implicit rules for C and get away with that up to a point but only a fairly low point.

python is far harder to use than bash when it comes to running processes and doing things with them and doing the file-system manipulation that is usually wanted when building.

There are modules that make it easier but so far as I've seen it's a crap choice plus python takes a long time to start up so there is a cost to running a "clean" environment for every build step but OTOH if you use the same interpreter for the whole build you can introduce all sorts of ordering problems when a build runs on a different machine and doesn't work because it's executing build tasks in a different order.

If you really want to build by "writing a script" (groan - because that's the age old horrible solution) why bother with python?

Re: Why Python keeps growing, explained

#337

Earlier quoted context omitted.

We disagree about whitespace blocks. That's fair. > If you’re having trouble with them, use a programmers editor with indentation guides like notepad++ or geany. Yes, of course. Python makes that pretty much essential, which is one of my complaints about Python. A language that requires a special editor is a language that is deficient, IMO. There are a ton of other, more minor, aspects of Python that makes it unpleas…

It’s not required to use a basic editor from the early 90s, no… but it can help on a big codebase. Why handicap yourself? I make patches once in a while with nano/micro without issue. Maybe your functions are just too long, dunno. A lot of folks can’t survive today without a giant ide awhile you advocate not to use something downright tiny in comparison. Do you hate working with jpeg or blender files because they req…

Again, just to make sure I'm being very clear, note what I said in my original comment. I wish that I enjoyed Python. I did not say, and don't assert, that Python is bad or that nobody else should enjoy it.

I just wish that I did.

> A lot of folks can’t survive today without a giant ide while you advocate not to use something tiny in comparison

I'm not advocating anything. I'm stating my personal preferences. But I also make sure that I don't rely on a giant IDE for any language. I use a couple of different ones at work, but I don't use one at home (even though my hobby projects are no less complex), because I've found that using IDEs encourages me to engage in poor programming practices. I am not saying that nobody should use IDEs or that they make people worse programmers. I'm speaking for myself. I want to deeply understand the languages I use.

> Do you hate working with jpeg or blender files because they require software? Rather move bits with a magnetic needle and steady hand?

Of course not. Those are not human-readable data collections are need a tool to make them understandable by a human. A programming language is supposed to be directly understandable by a human, though, and if you need a tool to make it so, that strikes me as a failure of the design of the language.

> Two ways to delimit blocks is redundant. Either one indents already or the project is a disaster.

Eh, each to his own. Yes, there is a redundancy there, but I think it's a redundancy that brings value and reduces error.

Re: Why Python keeps growing, explained

#338
post #186

Earlier quoted context omitted.

The entire point of doing things the right way is that you end up delivering more value in the long term, and "long term" can be as soon as weeks or even days in some cases. Business owners definitely prefer less bugs, less customer complaints, less support burden, less outages, less headaches. Corner cutting doesn't make economic sense for most businesses and good engineering leadership doesn't have much trouble com…

Try the travel/event booking business (where I'm in) - and no, people don't dump their mistakes on the next guy here - to the contrary, the "hacky" Python solutions are supported for years and teams stay for decades (allthough a decade ago we had not discovered how great Python was) What business owners actually don't like at all is how long is takes traditional software development to actually solve problems - which…

> the dumping and running away is worse in Java and other compiled software. With Python you can at least read the source in production if the team ran away...

Java (and dotnet, the two big "VM" languages) is somewhat of a strange example for that; JVM bytecode is surprisingly stable and reverse engineering is reasonably easy unless the code was purposely obfuscated - a bad sign on any language anyways.

Re: Why Python keeps growing, explained

#339
post #191

Earlier quoted context omitted.

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 almo…

How is it in disagreement with parent?

They're not, those are useful examples.
Post reply on HN