News for hackers. Stuff that matters.
Re:From Python to Go and Back Again by sandGorgon on Saturday October 17, 2015 @01:58AM (#10403538)
what is strange is that everyone seems to be using Python 2.7 in some form. There is all this new work being done in Python 3 asyncio but there is nothing that is being used... and this is from a guy who pretty is a core developer in several python projects.

I look at Ruby or Go... or even Java and every new language feature has a much more rapider adoption curve.

is this a pretty solid statement that the entire Python 3 + asyncio path is a dead end ?

Re:From Python to Go and Back Again by broodbucket on Saturday October 17, 2015 @02:12AM (#10403557)
The difference is that Python 3 is far more backwards incompatible than an update to Ruby, Go or Java. If there's any component of your Python project that was written for Python 2 and it hasn't been ported, your project as a whole is probably staying in Python 2.

I certainly wouldn't call the Python 3 path "dead", as starting a new project you'd be silly not to use Python 3. It's just a very slow process.

Also, porting from 2 to 3 isn't even that hard (there's a script that does 95% of it for you).

Re:From Python to Go and Back Again by sandGorgon on Saturday October 17, 2015 @02:56AM (#10403638)
I understand this in its abstract sense - but I think (IMHO) the fundamental problem is that every framework out there is using Python 2.7.... which means nobody is using it.

I'm not sure if you have worked in the Ruby or Go ecosystem... but if you are starting a new project, you are using latest Ruby+latest Rails. this is not the case in Python. I asked a question here and on the /r/python forums. What framework should one use to build an API using asyncio+postgresql. Nobody seems to be doing it.

the answers I got mentioned using Tornado with Python 3 code on top of it.

People have compared asyncio with goroutines - but even for a project that is a migration from Go -> Python by a fairly advanced developer ... Py 2.7 is being used.

Re:From Python to Go and Back Again by Too on Saturday October 17, 2015 @03:22AM (#10403686)
> every framework out there is using Python 2.7....

That's just FUD, it might have been true many years ago but not any longer. http://python3wos.appspot.com/, there are a few red holes but from what I could tell some of those have substitutes that in many cases are better even. It might also be true for in house libraries but at least there you have the chance to upgrade yourself.

Re:From Python to Go and Back Again by sandGorgon on Saturday October 17, 2015 @04:09AM (#10403756)
I know that. But I'm hard pressed to find anyone who is using this stuff in production.

the ecosystem is still running 2.7. I cant wait to switch to Py3.

Re:From Python to Go and Back Again by azazel75 on Saturday October 17, 2015 @05:51AM (#10403915)
> the ecosystem is still running 2.7. I cant wait to switch to Py3.

Which one? Pyramid and SQLAlchemy work like a charm in Py3. Until you really name what your need is, that's just fud.

Re:From Python to Go and Back Again by azazel75 on Saturday October 17, 2015 @05:46AM (#10403909)
We use ayncio and async/await coroutines of Python 3.5 on each of our packages.

I hope that PyPy will have a Py3.5 compatible interpreter someday, but CPython is good enough for now.

Re:From Python to Go and Back Again by windlep on Saturday October 17, 2015 @02:03AM (#10403546)
We used Python 2.7 for pypy compatibility. I really dig the new async/await primitives added to Python 3.5 and think the asyncio path is the best path forward. I hope the work to get all the latest asyncio stuff working on PyPy picks up some steam.
Re:From Python to Go and Back Again by bpicolo on Saturday October 17, 2015 @04:02PM (#10405830)
The main issue with asyncio is it is incompatible with some of the best packages in the ecosystem atm, e.g sqlalchemy
Re:From Python to Go and Back Again by sandGorgon on Saturday October 17, 2015 @03:00AM (#10403645)
hey - thanks for replying.

if Pypy + asyncio was available, would you have built everything using that stack ? There have been all these benchmarks that asyncio is so much slower than threads [1] How would you compare that with Go ?

[1] http://techspot.zzzeek.org/2015/02/15/asynchronous-python-an...

Re:From Python to Go and Back Again by kintamanimatt on Saturday October 17, 2015 @07:40AM (#10404103)
For certain things that they probably shouldn't be used for, not across the board.