
google-highly-open-participation-psf - issue #239
Write nice Python classes for PyPy Ropes algorithm
See
http://morepypy.blogspot.com/2007/11/ropes-branch-merged.html
Write Python classes that expose the ropes algorithms in PyPy as two classes, one behaving as much as possible as the builtin str type, the other as the builtin unicode type. Write unittests for these classes to check them for correct behaviour.
The PyPy rope algorithms can be found here:
https://codespeak.net/svn/pypy/dist/pypy/rlib/rope.py
This doesn't involve any knowledge of PyPy, the classes written should be just completely normal Python code.
Task duration: please complete this task within 5 days (120 hours) of claiming it.
Comment #1
Posted on Dec 16, 2007 by Happy BirdComment deleted
Comment #2
Posted on Dec 16, 2007 by Helpful DogDoes this task mean writing a ropes implementation for CPython in Python or something else?
There is already a Python implementation of all the ropes algorithms in the second file linked above. However, the interface to these algorithms is not very nice, no operator overloading, a lot of functionality is implemented as module-functions etc. For PyPy this is enough, but for general use it would be much better to have Python classes that wrap these algorithms and behave as much as possible as the builtin string and unicode types.
Comment #3
Posted on Dec 17, 2007 by Happy Birdso does this mean I could use the pypy classes and simply modify them or do I have to write a new implementation?
Comment #4
Posted on Dec 17, 2007 by Helpful GiraffeNo writing new ones! Just modify existing ;)
Comment #5
Posted on Dec 17, 2007 by Helpful DogMaybe modifying the existing classes is not enough, maybe you need to inherit from them or even delegate to them. Anyway, somebody interested in this should probably work in the PyPy repository (we give out commit access freely).
Comment #6
Posted on Dec 22, 2007 by Happy BirdThis is last Ropes task. I come to take my part of fun:) I claim this task.
Comment #7
Posted on Dec 22, 2007 by Helpful DogHi!
I think it would be best if you would work within the PyPy repository. Would you privately send me your Name, email-Address and the username you want? Then I can make an account for you and give you commit-rights to PyPy. My email is cfbolz@gmx.de
Cheers,
Carl Friedrich
Comment #8
Posted on Dec 22, 2007 by Helpful KangarooThis task is due Thursday, December 27, 2007 at 09:45:00 UTC.
Comment #9
Posted on Dec 23, 2007 by Happy BirdBy suggestion of Carl, I'm working in brunch of pypy repository. You can track my work there: https://codespeak.net/svn/pypy/branch/ghop-ropes-classes/ I will publish resulted patch there after finishing work.
Comment #10
Posted on Dec 28, 2007 by Happy BirdHi all. There is my status report for this time. I'm implement wrapper class that pass 6 from 10 Carl test cases. Currently i have some question about other 4 test cases and will post it to python ghop list soon. But now i want ask to extension of my deadline because i'm now on vacation before 5th January and have limited internet connection.
Comment #11
Posted on Dec 29, 2007 by Helpful DogWhat's the usual approach to deadline extensions? Pavel's work is quite good so far, so I am interested in having him work a bit longer :-).
Comment #12
Posted on Dec 29, 2007 by Helpful KangarooWe haven't been very formal about it. If he continues to submit incremental work, you could extend the deadline for a couple of days at a time. At some reasonable point, you need to cut it off and either call it good enough or not finished, though. We don't want to string him along or make it seem like we're adding requirements after the task was begun. :-)
Comment #13
Posted on Dec 31, 2007 by Happy BirdI'm committed my last work on this task - to show that i continue my work. I need some suggestion from Carl about some parts of code.
Comment #14
Posted on Dec 31, 2007 by Helpful Dog(No comment was entered for this change.)
Comment #15
Posted on Jan 6, 2008 by Happy BearExtending till 01-08.
Comment #16
Posted on Jan 6, 2008 by Happy BirdThanks for extending my time. Now Carl evaluated my work as finished and i'm attach resulted diff.
- ropewrapper.patch 4.89KB
Comment #17
Posted on Jan 6, 2008 by Helpful DogI am content with the state of this. Alexandre, do you want to/have time to take a look? Otherwise I would mark it as completed.
Comment #18
Posted on Jan 6, 2008 by Massive OxLooks good to me.
Quick question though: shouldn't the base rope class support str?
Comment #19
Posted on Jan 6, 2008 by Helpful Doghuh, I guess they should, yes. Otherwise it is hard to nicely get a string back. Pavel, would you quickly add it? I will commit a test in a few minutes. Afterwards you can upload again and then we can close this.
Comment #20
Posted on Jan 7, 2008 by Happy BirdFixed in svn. Attach updated patch.
- ropewrapper_1.1.patch 5.03KB
Comment #21
Posted on Jan 7, 2008 by Helpful DogLooks good to me, marking as finished. Thanks for the good work!
Status: Completed
Labels:
hard
coding
ClaimedBy-fastnix
Due-20080108.0945
expired