Pyston 0.3: Self-hosting Sufficiency
blog.pyston.org
blog.pyston.org
Unless I am missing something, the stuff you guys achieved have absolutely nothing to do with "self-hosting".
I am curious - how does this compare to pypy, performance wise? Is there a big win with this approach over pypy?
It basically means "able to host its own development". This means something different in different contexts, e.g. JS JITs "self-host" when some part of their builtin code is written in JS. We share that property with JS JITs, but in this particular case it means we can host our own build/test infrastructure. So we're using pyston to develop pyston. ergo, "self-hosting (qualified)."
---
We're definitely slower than pypy at present - we're only a small fraction faster than cpython after all on our benchmarks, and pypy is scary fast :)
I think we're still in the part of our work where the answer to the "big win with this approach" question is "we don't know." We're confident that we can/will be much faster than we are now, but we have different constraints than pypy, so it will always be something of an apples/oranges comparison.
On a related note, I have to say that I still don't understand the point of this project. Were you guys unhappy with pypy's performance or development?
I understand that in theory, the approach you guys are taking is incompatible with pypy's, but I can't help but wonder how thing would play out if you Dropbox put their weight behind PyPy. Maybe it could've been the start of every Python programmer's wet dream: Python 2.8.
To me it was totally misleading.
Check speed.pypy.org and speed.pyston.org
I remember when Unladen Swallow project was active, they were encountering some issues with LLVM which slowed their progress down. They often had to stop to fix LLVM.
Wonder if Pyston team got a chance to look or learn from Unladen Swallow's idea or even use any of the code?
I have mixed feelings about that.
Currently, Pyston targets Python 2.7, only runs on x86_64 platforms, and only has been
tested on Ubuntu. Support for more platforms -- along with Python 3 compatibility -- is
planned for the future, but this is the initial target due to prioritization constraints.
...but if pypy has taught us anything, surely it's that implementing python3 after you have a working python2 implementation is a seriously huge piece of work.Especially if you're wholesale copying unicode naive cpython code into your code base.
I'm deeply skeptical python 3 support will ever land for this.
Basically, this is 'modernize python 2 and make it faster'; there's been a lot of talk about no one being willing to pickup and maintain a 2.8 version, but this is it, effectively.
Major backer, major new features.
So, lots of good things here, but there no doubt that its going to be divisive in the community, and I'm not sure I really support that. ...promising py3 support nebulously at some point in the future doesn't fix anything.
tldr; If you ever plan on supporting python3, do it already. Otherwise don't make fake promises.
Python3 patches welcome.
There's a reason the python 2.x line is 'patch only' by the developers.
Python 3 made fundamental changes to underlying string operations internally for UFT16, which you can easily argue, was a huge mistake, but there you go.
You can't just 'patch python3 support' in. You literally have to rip out anything that uses char * in the code base and replace it with a unicode supported alternative, which is both more complex, and breaks python 2 backwards compatibility.
Pypy is very clever in how they handle this through rpython, which is why they can kind of support both; but randomly dropping cpython 2.x code into the project is completely not forward looking.
I'd be happy with: "We never intend to support python 3, sorry".
If that's the path you want to walk for all the complicated reasons you choose it, fair enough.
I'm sure Dropbox would appreciate the help more than the soapboxing.
At monthly PyDataLondon meetings I remind the audience to switch to Py3 (a few do each month) as Py2's sunset date is less than 5 years away now.
Back in April 2013 (the last time I saw python.org download stats - where did they go?!) I wrote a blog post noting that fresh downloads of Windows Python 3.3 were greater than downloads of Windows Python 2.7, for 3 months running. Windows is useful as Python isn't bundled (unlike e.g. Linux and Mac). I presume this trend has continued but have no firm evidence either way: http://ianozsvald.com/2013/04/15/more-python-3-3-downloads-t...
What do the PyPI stats say?
Unfortunately its development looks to be ceased.
I ported my main extension to PyPy but had to leave bits of functionality out because of missing parts of the API that CPython had that they didn't.
If he is, that would certainly make the effort carry a lot more weight.
Not downplaying how important our esteemed BDFL Guido is to Python, but I'll be flat out honest, aiming their sights on Python 2 just further entrenches its eventual place as the COBOL of 2050.
Python 2 is DEAD to me. It should be dead to you. It's Dead with a capital D. Node.js wound up with all this fork nonsense in HALF the time Python 2.7 has been stagnating the Python ecosystem.
Python 2 only code is nuclear waste grade technical debt.
I haven't written a line of Python 2 in 6 months after 2 years of slow decline.
I now use Python 2 vs 3 as an interview question.
I run my tests on 3.4.x, 3.5-dev, and versions of HEAD that pass the Python test suite.
Why does Guido working on Pyston do anything but hurt the future of Python by legitimising the position that it's ok as a community of Python programmers, to keep accruing this technical debt ?
I still don't think projects should port to python 3 unless they need to be moved forward or continually developed. Greenfield projects should most definitely start on py3 though.
You mean the kind of DEAD that has thousands of tested libraries supporting it and that runs and makes money in the bank. I like that kind of DEAD. Sign me up.
> Python 2 only code is nuclear waste grade technical debt.
It is nuclear fusion kind of code for me that just keeps making me money.
> I now use Python 2 vs 3 as an interview question.
What could you meangingfully interview about it? "Show me how to read this unicode file"?
> I run my tests on 3.4.x, 3.5-dev, and versions of HEAD that pass the Python test suite.
I run my tests on my code base and make sure they pass and have decent coverage.
> Why does Guido working on Pyston do anything but hurt the future of Python by legitimising the position that it's ok as a community of Python programmers, to keep accruing this technical debt ?
What technical debt. My code is clean and nice looking. There is no technical debt.
But pray tell what are these great features you are using in Python 3 that Python 2 doesn't have and that just call for all this great excitement?
I like me some fancy tuple unpacking and binary literals but not enough to go around yelling Python 2 is DEAD at anyone or to destabilize nice working code for it.
Treating text and ascii as the same thing is bad. Its bad for technological reasons, its bad for economical reasons, and its just plain bad. If you think it "runs", it simply because all those customer who get "invalid character" error has gone over to a competitor and didn't bother to tell you.
Silly, that's not how sales of $500K-$1M products work.
As of release 0.2 he was referring to it as being "built by some of my colleagues"[1]. Looking at the list of contributors for the Pyston repo on github[2], I don't see gvanrossum among them.
[1]: https://twitter.com/gvanrossum/status/510154006564335616