News for hackers. Stuff that matters.
Re:Python 2.x vs 3.x use survey by Groxx on Tuesday December 31, 2013 @03:23PM (#6992626)
Why not write it yourself, as a utility method rather than something built-in? Granted it would be nice to be built in, but that shouldn't stop anyone. Or is there some other reason?
Re:Python 2.x vs 3.x use survey by jordigh on Tuesday December 31, 2013 @03:51PM (#6992765)
Speed is another big concern. You want your DVCS to be as fast as possible. You don't want to wait even half a second to see the output of "hg status" just to see which files you've modified.
Re:Python 2.x vs 3.x use survey by Groxx on Tuesday December 31, 2013 @04:07PM (#6992848)
Mercurial is a big project. Surely there's one skilled C programmer who could write a relatively-portable, efficient, limited version of this feature (or find one, I assume something extremely similar exists in several flavors). Once that's done, have a Python fallback for those esoteric systems where it doesn't work, and move on with life. Since it's apparently a critical code-path, that's normal development for great performance.

I could easily be underestimating the difficulty of integrating C with Python - I've never done it personally, but I gather that's one of its strengths. But this seems like a pretty simple problem, which has a pretty simple implementation in any language (there's an included Python implementation on the linked page, ~20 LOC?), and if it's a critical performance piece it's surely worth the cost to make that piece.

Re:Python 2.x vs 3.x use survey by jordigh on Tuesday December 31, 2013 @04:29PM (#6992939)
It's more work than it appears. And it's work that doesn't seem to have immediate benefit, since Python 2 is still around. Augie Fackler has started tackling it, but even if we do get the change to Python 3 itself, it also requires a substantial rewrite of the hg codebase, since we use strings everywhere. And again, it's a lot of work with no huge payoff.
Re:Python 2.x vs 3.x use survey by Groxx on Tuesday December 31, 2013 @04:39PM (#6992981)
>It's more work than it appears.

I completely believe that, and good point about Python 2. I wasn't considering that side of things.

Is it a complicated rewrite, or just big? Superficially it seems pretty mechanical, `bytes.format` to `bytes_format` (though finding them might be hard). I never feel like I have free time, but I don't tend to get exhausted from things like that, maybe I can contribute a bit. It would be good to get exposed to some decent, real Python code :)

Re:Python 2.x vs 3.x use survey by jordigh on Tuesday December 31, 2013 @05:01PM (#6993067)
Come join us in #mercurial in Freenode or in [email protected] if you're interested in solving this problem.