News for hackers. Stuff that matters.
Re:The first stable release of PyPy3 by thomasahle on Friday June 20, 2014 @05:10PM (#7922901)
I wish the community would just switch entirely to pypy. Being able to just slightly performance sensitive code in python is a huge win.
Re:The first stable release of PyPy3 by ngoldbaum on Friday June 20, 2014 @06:45PM (#7923323)
It makes sense to use pypy if you're writing pure python code. The second you need a C extension, you're pretty much out of luck. This kills a lot of the appeal for people in the scientific/analytics side of things, who make heavy use of legacy C and Fortran routines.
Re:The first stable release of PyPy3 by dragonwriter on Friday June 20, 2014 @07:11PM (#7923418)
> The second you need a C extension, you're pretty much out of luck.

In theory, shouldn't CFFI be the foundation of the solution to that problem?

Re:The first stable release of PyPy3 by tych0 on Friday June 20, 2014 @07:38PM (#7923486)
In practice it works pretty well. I am nearing completion of a rewrite of X's XCB-based python bindings in cffi, and it has worked out quite nicely.
Re:The first stable release of PyPy3 by rguillebert on Friday June 20, 2014 @07:17PM (#7923437)
yes
Re:The first stable release of PyPy3 by rguillebert on Friday June 20, 2014 @06:55PM (#7923371)
You can use these C and Fortran routines on PyPy, just not with the CPython C extension API.
Re:The first stable release of PyPy3 by takluyver on Friday June 20, 2014 @07:44PM (#7923495)
There's a lot of established code built around the C API. It's not like it can just be rewritten using CFFI over a weekend.
Re:The first stable release of PyPy3 by rguillebert on Friday June 20, 2014 @08:31PM (#7923636)
Well, I'm not talking about every C extension in the world, I'm talking about thin bindings around C routines which is what numpy has for fft for example, someone wrote a basic equivalent for numpypy in a few hours with no prior numpypy/cffi knowledge.
Re:The first stable release of PyPy3 by onalark on Friday June 20, 2014 @11:46PM (#7924098)
Unfortunately, NumPy uses deep knowledge of the CPython API in quite a few places, which is one of the reasons implementing NumPyPy has been so challenging.
Re:The first stable release of PyPy3 by rguillebert on Friday June 20, 2014 @11:58PM (#7924125)
Another approach should be used for those, but to be clear I wasn't talking about the entire numpy library, I'm talking about things like numpy.fft
Re:The first stable release of PyPy3 by sitkack on Friday June 20, 2014 @11:57PM (#7924122)
No, you are wrong. It supports both ctypes and cffi, both of which should be the goto for calling native code. Use PyObject has been the stupid choice for over 4 years.
Re:The first stable release of PyPy3 by masklinn on Friday June 20, 2014 @05:17PM (#7922936)
> I wish the community would just switch entirely to pypy.

What purpose would that serve?

> Being able to just slightly performance sensitive code in python is a huge win.

I think you slightly this phrase, but aside from that pypy does not work for everybody and everything (e.g. at best it's no slower for sphinx, it really doesn't like the way docutils works). It's not like pypy's a magic wand.

Re:The first stable release of PyPy3 by quacker on Friday June 20, 2014 @08:28PM (#7923631)
> What purpose would that serve?

If PyPy became the official/canonical implementation, PyPy would receive more attention and third-party library compatibility would be a requirement. Complaints about Python's slowness would be somewhat less relevant, and Python might see wider adoption. The RPython toolchain would receive more attention and that could be useful to other languages. There are plenty of reasons, but PyPy is usually a free speedup for your Python application. Who's going to complain about that?

> pypy does not work for everybody and everything

True, but as the official implementation of Python, compatibility with PyPy would then be a must, and this situation would be greatly improved.

Re:The first stable release of PyPy3 by BuckRogers on Saturday June 21, 2014 @12:26AM (#7924187)
I agree with you, but it will never happen. GvR wants a as-simple-as-possible reference implementation, for one, he has to maintain it with a volunteer dev team. Also, there's a split in the Python community between guys like me and you- and the scientific squad. Until the scientific stuff works 100% in PyPy you'd lose a significant portion of the Python userbase by dumping CPython.

GvR has done enough damage to Python with Python3. I don't intend to encourage him to do make any more changes. Us Python web developers are better off using what we have (non reference implementations, which don't hurt anyone), or just use Node.js.

Re:The first stable release of PyPy3 by michh on Saturday June 21, 2014 @11:18AM (#7925188)
I don't think it's fair to put the blame of the unfortunate way things have gone with Python 3 solely on the shoulders of GvR. Afaik, a huge part of the community felt this was the way to go. Unfortunely, it wasn't.
Re:The first stable release of PyPy3 by pekk on Saturday June 21, 2014 @12:34PM (#7925381)
Killing Python 3 isn't something a majority of the community wants and it isn't objectively better either.
Re:The first stable release of PyPy3 by Fede_V on Saturday June 21, 2014 @06:58AM (#7924689)
I agree entirely. What's kind of a pity is that until NumPy is ported over, all of the scientific stack is basically unusable on PyPy - and right now, there are several incredibly good NumPy specific JITs (numexpr, numba, parakeet).
Re:The first stable release of PyPy3 by jamespo on Friday June 20, 2014 @06:50PM (#7923343)
Maybe moving libraries & code to Python 3 should be the priority.
Re:The first stable release of PyPy3 by cookiecaper on Saturday June 21, 2014 @03:14AM (#7924411)
Convincing distros to package it as the default "python" should be the priority. Until that happens, Python 3 will see limited adoption. The path of least resistance will always have the most traffic.
Re:The first stable release of PyPy3 by _delirium on Saturday June 21, 2014 @09:24AM (#7924902)
Ubuntu seems to have that as a near-term goal: https://wiki.ubuntu.com/Python/3
Re:The first stable release of PyPy3 by keeperofdakeys on Saturday June 21, 2014 @10:36AM (#7925085)
The first step is to get everything python3 compatible, and have it use a hashbang or other mechanism to select the right interpreter. After this happens, the default interpreter has no real meaning: everything will use the right interpreter.
Re:The first stable release of PyPy3 by cwyers on Saturday June 21, 2014 @08:56AM (#7924852)
It's a chicken and egg problem. So long as most Python libraries run on Python 2 but not Python 3, distros are going to package Python 2.
Re:The first stable release of PyPy3 by cookiecaper on Sunday June 22, 2014 @06:46PM (#7929470)
Someone has to take the first step and break the cycle to get the chicken-egg problem undone. Arch has had Python 3 as the default Python interpreter for a couple of years now and it's been working pretty much fine. Many libraries now support Python 3, and I've done full sites in Py 3. Almost all Python scripts I write these days are Python 3. I don't think I've had to downgrade a script that started in 3 down to 2 for a couple of years now. It's as ready as it's going to get.

The groundwork is done, and I think everyone who is going to support Py 3 without any extra prodding has already done so. Now we need the distros to come through and give that extra nudge to the maintainers that are still slacking, or encourage people to replace those libraries that refuse to update.

Re:The first stable release of PyPy3 by Luyt on Saturday June 21, 2014 @02:09PM (#7925615)
Actually, the majority of PyPI packages are python-3 compatible. For a status overview, see http://python3wos.appspot.com/
Re:The first stable release of PyPy3 by briancurtin on Saturday June 21, 2014 @02:57PM (#7925760)
That's not what that site is saying.

For my PyCon Russia talk, I pulled down the data for all 44,402 packages (as of May 31). 13.5% of all packages on PyPI support some version of Python 3. 75.5% of the top 200 packages by download count claim to support some Python 3 version (according to their setup.py classifiers). Additionally, 64% of the top 500 support some Python 3 version.

Another interesting thing I saw was that of those 44K packages, 44% of them have seen a release within the last 12 months (representing 82% of the last month's download share), and 22% of those packages released in the last year support some version of Python 3.

Re:The first stable release of PyPy3 by ris on Saturday June 21, 2014 @12:00PM (#7925294)
How much memory do you have?
Re:The first stable release of PyPy3 by dagw on Saturday June 21, 2014 @01:45PM (#7925561)
For a sufficient performance increase? As much as it takes. Memory is cheap
Re:The first stable release of PyPy3 by ris on Sunday June 22, 2014 @07:20AM (#7927546)
On servers and especially on virtualized servers it is absolutely not.