Live data from Hacker News

Python 3 can revive Python

medium.com

201–210 of 242 posts

Re: Python 3 can revive Python

#201

Earlier quoted context omitted.

I use Debian, and python 3 is one "apt-get install python3" away. Ubuntu probably includes the same packages in its repos. SuSE and Fedora are in the same boat (python3 in repos). Arch and Gentoo obviously package python 3. Redhat really is the black sheep here. There is no reason for the assertion that no major distro has more than a half baked python 3 alternative. It is not really important if it is the default py…

> Ubuntu probably includes the same packages in its repos. Ubuntu not only includes python3 in the base repos, I'm pretty sure its on the CD and used by some core packages now -- the conversion project that is ongoing but not yet complete is to completely eliminate python2 from the base install, which is not yet complete.

Do you really think Ubuntu will destabilize their current LTS release by switching to Python3 and removing Python2 ? I don't know what Canonical will do for the next LTS release, but for the near future (read like 4 years) Python3 will not be a first class citizen in the Ubuntu world.

Re: Python 3 can revive Python

#202
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…

Go has pretty neat semantics for channels and goroutines, but it presumes you want threads and blocking IO. Or in other words, "hey kid here's some rope"

Your approach to concurrency matters even more than the tool you use, and python is a great tool for network services. It's my preferred tool actually.

Maybe it's time to start porting twisted to go.

Re: Python 3 can revive Python

#205
post #14

Earlier quoted context omitted.

I agree; I have found that people are super-impressed with Python. Specifically, my experience -- teaching Python to dozens of experienced developers every month, for more than four years -- is that people from the C, C++, C#, and Java world and shocked to the core by the ease with which they can do certain things in Python. Maybe a Ruby or JavaScript developer won't be blown over to the same degree. But there are a…

I agree with you, as a Ruby developer I'm not blown over when I see Python. I shake my head instead and I try to explain why. All those __method__ and all those mandatory (). The : at the end of lines. Can't the parser know when it's over like Ruby does? An else: on a line of itself is a very odd sight. And why must you have built-in functions and methods mixed into the language? Yes len(), I'm looking at you. I won'…

That's funny, as a Python person, I think the same thing about the begin and end in Ruby. After awhile, you just get used to whatever language you use most, and those things fade into the background.

Re: Python 3 can revive Python

#206
post #159
post #96

Earlier quoted context omitted.

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…

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++.

It's possible to close more of the speed gap, but these JITs have to be able to:

* identify and use native primitives (avoid overflow and so forth)

* prefer stack allocation over heap (improved escape analysis)

* inline memory allocation and freeing and remove unused codepaths

* optimize across the boundary between implementation language and hosted language (which I believe requires self-hosting)

Re: Python 3 can revive Python

#207

Earlier quoted context omitted.

> Ubuntu probably includes the same packages in its repos. Ubuntu not only includes python3 in the base repos, I'm pretty sure its on the CD and used by some core packages now -- the conversion project that is ongoing but not yet complete is to completely eliminate python2 from the base install, which is not yet complete.

Do you really think Ubuntu will destabilize their current LTS release by switching to Python3 and removing Python2 ? I don't know what Canonical will do for the next LTS release, but for the near future (read like 4 years) Python3 will not be a first class citizen in the Ubuntu world.

> Do you really think Ubuntu will destabilize their current LTS release by switching to Python3 and removing Python2 ?

I think you are confusing several different things:

1) "switching to Python 3" -- if by this you mean making /usr/bin/python point to python 3, that will never happen on Ubuntu (and probably most other distros that aren't Arch.) They've stated that even when everything that relies on python is moved to python 3, they will follow PEP-349 and keep python 3 at /usr/bin/python3. /usr/bin/python will only exist when python2 is installed and will always be python 2.

2) "removing Python 2" -- obviously, they won't retroactively do this to an existing LTS release. It'll probably be first done in a regular release between now and the next LTS release (it was targetted for this LTS release, but not everything was ported, so currently both python 2 and python 3 are used.)

3) Making Python 3 a "first class citizen in the Ubuntu world" -- it already is.

Re: Python 3 can revive Python

#208
post #151

Earlier quoted context omitted.

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

I think not, I think the problem is that it is a build-time dependency and pip wants to resolve all dependencies before installation begins. See https://github.com/pypa/pip/issues/1386 (oddly, the issue is closed, while the problem is acknowledged).

I see, thanks for pointing to that issue. The other issue referred https://github.com/pypa/pip/issues/988 is still open, so I guess they work on sorting this out.

Re: Python 3 can revive Python

#209
post #177

Earlier quoted context omitted.

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…

Go was never a class of C and Rust. Maybe it becomes once, but at the moment I observe it as a kind of server-side Java replacement: by the current design it simply can't be as low level as C and Rust. The main difference with Java is that it compiles to he native code and not bytecode. Still it is dependent on its own special conventions, GC and libraries. The confusion comes from the announcements of the Go team wh…

> the only group who saw possible benefits were programmers that would otherwise use languages like Python but liked extra speed and convenience of a compiled language.

To say "the only group" is far from true. Go has a lot of uptake among people who would otherwise use C++ or Java, for example. And yes, actually there is overlap in the audience of Go and the audiences for C or Rust. Go has its own advantages but really lacks the advantages of a very high-level interpreted language.

Re: Python 3 can revive Python

#210
post #188

Earlier quoted context omitted.

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 add that Python is excellent at data representation and transformation Indeed! It's a very practical extraction and reporting language.

When it comes to Unix glue jobs, it's certainly no Perl.
Post reply on HN