Live data from Hacker News

Why Python keeps growing, explained

github.blog

191–200 of 459 posts

Re: Why Python keeps growing, explained

#191

Earlier quoted context omitted.

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

How is it in disagreement with parent?

Re: Why Python keeps growing, explained

#192

Comparing Python to Java 8 and saying it’s more readable isn’t showing much. And it’s not very portable the second dependencies with native code (which is common since pure Python is too inefficient for many tasks) are used. I think Python is popular for two reasons: - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? - it has an enormous set of librari…

I agree comparing hello world code in Python and Java is a bit pointless. Hello worlds might be much shorter, but at scale, this becomes less relevant. Also, comparing to a language that hates change is unfair, if you compare it to C#, which is improving over time, you'll see the hello world also takes one line (but is 13 characters longer, so Python still wins!)

Re: Why Python keeps growing, explained

#193

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…

I don't mean this to be insulting, but I find it really strange that you find TypeScript more pleasant to use than Python!

Oh, I wouldn't say TypeScript is more pleasant than Python, but it is more pleasant than old JavaScript. But I increasing precise the productivity I have with TypeScript and some of the ergonomics than Python.

I still love Python. Just feel like I'm cheating on it with this new younger model...

Re: Why Python keeps growing, explained

#194

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…

I read the article and had the same feeling that it's a fluff piece without substance. If you've to compare anything, compare it with the vibrant JVM ecosystem. Using the same tired argument of `System.but.Println()` shows the author has no original idea. Python is great but JVM is no lackey, it is a marvelous piece of battle tested engineering.

In the end it is just an ad for Github products and not worthy of being on HN frontpage.

Re: Why Python keeps growing, explained

#195

Earlier quoted context omitted.

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.

Sure, but what's not really python per se. One could also call C++ libraries from java via JNI and pretend java is super fast. If people write program logic in python it will run at python speeds. Otherwise you're not really writing python, like nobody says some linux native program is bash because it happens to be launched from a bash script.

Java is super fast though, it almost never uses JNI as it doesn’t need it as opposed to Python. It uses JNI for integrating with the C world (e.g. opengl bindings).

Re: Why Python keeps growing, explained

#196

Earlier quoted context omitted.

> it's a VM reading and parsing your code as a string at runtime. Commonly it creates the .pyc files, so it doesn't really re-parse your code as a string every time. But it does check the file's dates to make sure that the .pyc file is up to date. On debian (and I guess most distributions) the .pyc files get created when you install the package, because generally they go in /usr and that's only writeable by root. It…

Aren't those pyc files still technically just string bytecode, but encoded as hex?

Well bytecode isn't the same as the actual code you write in your editor.

Re: Why Python keeps growing, explained

#197
post #75

Earlier quoted context omitted.

If the 1 second is spent waiting for IO, it will take 1 second in whatever language. But yes python is slow. However I've seen good python code be faster than bad C code.

Well, to be fair the "good python code" is probably just executing something written in c lol. But lots of python is backed up by stuff written in c.

Not necessarily. Just using a better optimized sort or hash algorithm can make a big difference.

I was talking specifically of pure python code (except the python's standard library itself, where it really is unavoidable).

Re: Why Python keeps growing, explained

#198
post #146

Earlier quoted context omitted.

Not for everything. There are plenty of Python operations that are not 10x slower than c.

That is true, but there are relatively few real world applications that consist of only those operations. In the example I mentioned below, there where actually some parts of my python rewrite that ended up faster than the original C++ code, but once everything was strung together into a complete application those parts where swamped by the slow parts.

Most of the time these are arithmetic tight loops that require optimisations, and it's easy to extract those into separate compiled cython modules without losing overal cohesion within the same Python ecosystem.
Post reply on HN