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…
Why Python keeps growing, explained
191–200 of 459 posts
Re: Why Python keeps growing, explained
#192Comparing 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…
Re: Why Python keeps growing, explained
#193I 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!
I still love Python. Just feel like I'm cheating on it with this new younger model...
Re: Why Python keeps growing, explained
#194This 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…
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
#195Earlier 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.
Re: Why Python keeps growing, explained
#196Earlier 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?
Re: Why Python keeps growing, explained
#197Earlier 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.
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
#198Earlier 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.
Re: Why Python keeps growing, explained
#199That pretty much says it all.