Live data from Hacker News

Python 3 can revive Python

medium.com

151–160 of 242 posts

Re: Python 3 can revive Python

#151
post #18

Earlier quoted context omitted.

If a package doesn't get all its dependencies installed via pip its because of missing information in the package itself. That's neither a flaw of pip or Python but will cause problems for any package manager. I find the combination of virtual environments and pip very convenient to work with. When I run into trouble with missing dependencies I often find the project on GitHub and can send a pull request. Regarding N…

Not necessarily. pip cannot resolve all dependencies. For example, if a package specifies both numpy and pandas as a requirement, installation will fail. This is because pandas in turn requires numpy, and pip does not resolve the dependencies in a single step, you need to install numpy first and then go on with pandas.

In that case, couldn't you just specify Pandas as a dependency and Numpy would automatically be installed?

Re: Python 3 can revive Python

#152
post #54
post #49

Python needs to be revived? I always thought of Python as being a great utility programming language. It's not really a specialist, more of a jack of all trades. For example PHP is all about web development. Ruby is probably most well known for Rails and also widely used for web development. Python is widely used for web development, but that's not necessarily the first thing you think of for Python. What's going to…

> I'm always skeptical to hear that a developer has moved from X programming language to Go. I see what you mean. Also, presumably those that didn't switch, that use and love Python, are not very compelled to write a "We are still staying with Python" blog. And I think they should. Marketing and perception is important.

Spot on. Id love to see a bunch of 'I swapped to python 3 and it was amazing because... [reason]' posts.

If nothing else It'd illustrate clearly either the python 3 folks haven't got a leg to stand on (unable to come up with any tangible real life [reason]) or that there are actually compelling reasons to swap over to python 3; in which case we can point people to those posts in threads like this.

(personally I forayed into 3 but couldn't find any [reason] to stay there; I keep dropping into threads like this hoping to find one...)

Re: Python 3 can revive Python

#153
post #76

My perspective is as a researcher in academia. From here Python is far from needing to be revived, it is gaining ground. Also, Python 2 is still king and I suspect will remain popular - researchers rarely have the luxury/incentive to go back and improve it to comply with a language update. A few reasons Python is gaining ground in academia. Firstly, Python is _great_ for teaching undergraduate programming (see [0] fo…

I add that Python is excellent at data representation and transformation. You can easily write some test data and just include it in python, then transform it any way you feel you like to get intelligence out of it. With the standard library you can easily load a CSV file you exported form a data-set and then aggregate and evaluate it with only a few lines of code without much language overhead. Schema-less mixed con…

I don't get why is Go defined as a competitor to Python. Go documentation itself places Go in the systems programming language class. The same class as C or Rust. The language advantages are defined by comparison to C. Heck, it starts by stating it compiles quickly.

I know Go is the language of the moment. Fashionable. I assume I take a cautious stance approaching fads, so I may tend to dismiss new stuff rather than all-in adopt every new tool. Having said that, my quick survey of the language features a couple of years ago produced nothing eye catching.

The concept of channels is nice, it lends itself easily to data pipelines and to SIMD parallel programming. It is not a breakthrough, though. SIMD is easily done in many many languages. Other than that, it's pretty down to earth. There's a myriad nice things (first class functions, closures, garbage collection, strong(ish) typing), but nothing ground breaking. There are also some choices that smell, namely the lack of inheritance due to the flat type hierarchy (and the obvious need for a fix), or the inability to overload methods and operators.

All in all, there's not enough in Go to warrant the level of attention the language gets. It's a nice language, it's not groundbreaking.

On the same class, Rust is looking rather nice. The memory management model alone is enough for me to keep an eye on how its ecosystem develops.

Re: Python 3 can revive Python

#154
post #76

My perspective is as a researcher in academia. From here Python is far from needing to be revived, it is gaining ground. Also, Python 2 is still king and I suspect will remain popular - researchers rarely have the luxury/incentive to go back and improve it to comply with a language update. A few reasons Python is gaining ground in academia. Firstly, Python is _great_ for teaching undergraduate programming (see [0] fo…

The question is: is the Python community OK with it becoming a niche language for scientific computing, or do we want to to keep being used as a general purpose language?

Python is also the modern sysadmin's Perl. This is a huge niche, to the point of not being a niche at all. Just take a look at the number of system tools used in a Redhat install that use python.

Coincidentally, Redhat's python tools are one of the major reasons for continuing support of Python 2.

Re: Python 3 can revive Python

#155
post #54

Earlier quoted context omitted.

> I'm always skeptical to hear that a developer has moved from X programming language to Go. I see what you mean. Also, presumably those that didn't switch, that use and love Python, are not very compelled to write a "We are still staying with Python" blog. And I think they should. Marketing and perception is important.

I'm using Python 3.4. All the libraries I need are available, including the world's best database library, SQLAlchemy. It's a more pleasant experience than Python 2.x. And I have the peace of mind knowing that I'm not stuck on a legacy, deprecated platform. I used to stick up for Python 3 on HN and other places but I've given up. I have no interest in converting people going to Go. And no matter what Python (or any o…

I thought I was alone. I also stopped trying to convert people to Python 3. It is a much better language. By this point, it should be obvious. After taking it for a test lap, and after cursing at forgetting parenthesis on print for the hundredth time, you get it. Anyone who uses python and, by this time, hasn't taken python 3 for a test run isn't worth my advocacy time.

Re: Python 3 can revive Python

#156
post #81
post #49

Python needs to be revived? I always thought of Python as being a great utility programming language. It's not really a specialist, more of a jack of all trades. For example PHP is all about web development. Ruby is probably most well known for Rails and also widely used for web development. Python is widely used for web development, but that's not necessarily the first thing you think of for Python. What's going to…

We see Golang in production in our practice pretty regularly. Not many shops use it exclusively, but it pops up in backend systems. You're right that there are things Python does that are painful in Golang (SQL databases are a good example), but the things Golang does better than Python/Ruby, it does way, way better than Python/Ruby. Python is, of course, ubiquitous among startups and west coast tech companies; it is…

We switched some of our services from Python to Go and are very happy. To be more precise - we chose Go over Python for new projects that would have been developed in Python a year ago; we didn't rewrite anything from scratch in Go - though we'll probably do it for a couple of services.

I don't see us stopping using Python any time soon and not just for the legacy factor and cost of switching. It has its place, and Go has its shortcomings, and together they make a nice balance.

BTW we'd also love to move to Python 3 because of Unicode issues, but currently we have so many 3rd party libraries that are Python 2.7 only, that it's not feasible.

Re: Python 3 can revive Python

#157
The best thing Python has going for it is that it's an exceptionally good learning language. It's very easy to go from zero coding experience at all to making a simple hangman type game, and from there introduce OO concepts and so on.

And if you stick with it, unlike with most 'proper' educational languages, by the end you've learned a language that's actually useful for all kinds of stuff.

I don't think there's any other language out there with such a nice, even learning curve, with that kind of payoff. Javascript is, let's be honest, a bit weird. PHP is enough rope for anyone to hang themselves. Ruby is quick to get started on, but gets conceptually dense pretty quickly. (Sure, we all complain about having to write 'self' everywhere in Python, but compared with the way 'self' dances around in a Ruby class definition, it's much easier to learn.)

I note, on topic, that most newer beginner's Python books etc target 3.x nowadays - maybe the RPi generation will force things along. Maybe not.

Re: Python 3 can revive Python

#158
To have Python 2 and 3, and then CPython and PyPy and all kind of other similar flavors of the same thing is not really in line with `there should be only one obvious way to do it' don't you think? Do we see something that needs to be fixed in there?

Re: Python 3 can revive Python

#159
post #96
post #36

Earlier quoted context omitted.

"People are leaving Python for Go because people have always left Python for fast compiled languages." I think the angst about Go comes from the fact that someone who leaves Python for Java may still come back, because you can develop far more quickly in Python than Java. But someone who leaves Python for Go probably isn't coming back... my experience is that it is slightly slower (10-20%, YMMV but we're certainly no…

I don't know why people are leaving Python for Go when they could be using PyPy or Shedskin. There are plenty of ways to be fast using Python.

It's easy to lose track of this in the torrent of "PyPy Benchmarks Show It Sped Up 2x!!!!" and "Latest Javascript Engine 50% Faster Than The Last One!!!! OMG!! Node!!!!", but in absolute terms, the dynamic language JITs are still quite slow. It's an urban legend that they are anywhere near compiled performance. Except LuaJIT. "Faster Python" is still slow. Unless you're in a tight loop adding numbers together, but I'm not.

Moreover, a plot of their performance over time rather strongly suggests that they've plateaued. Personally, barring any major JIT advances, I'm considering the book closed on the topic of whether JITs can take a dynamic language and make it as fast as C or C++: No.

(Recall that a Java JIT is another issue; it starts with the static typing of Java, and then JITs from there. It has a much larger array of much more powerful guarantees to work with, that the dynamic languages simply don't. Go will be running at straight-up C speeds (which it does not currently) long before Python will.)

Re: Python 3 can revive Python

#160

Earlier quoted context omitted.

I can tell that proper Unicode support is a reason to discounting a language/library if you're not a native English speaker and/or writing programs that have to be localized.

Python was created by a non-native English speaker.

Before Unicode existed
Post reply on HN