ropes
ropes copied to clipboard
Port to cljc? and some other minor remarks
Hello!
Giving a little look to this library that looks great. I've got a couple of minor, and overall very positive remarks:
- What would you think about porting it to cljc? The imports doesn't look super tied to the JVM, but I'm not sure.
- I can see that
java.util.List
is imported and used only once butCharSequence
is used more than once and not imported? - As your rope implements
CharSequence
, is it also usable from Java for free, bar a few usage examples? A cross-platform/language datastructure sounds quite a big thing :-) - A rope seems to be a high-performance data structure. Would you think about using https://github.com/jgpc42/jmh-clojure or https://github.com/hugoduncan/criterium to write some performance tests and compare it to vanilla Clojure strings? I think some results in the
README.md
would look quite neat. - Any plan to give it a semantic version number and publish it on Clojars or GitHub packages?
- What about adding some badges to help visitors get a quick glimpse of this project? If I may, I would suggest
,
,
,
,
- Also, what would you think about expanding the
README.md
a bit with a one-sentence definition, a short description, a few examples, a couple of usecases, and then a longer introduction? I have found that such structure is quite helpful, for example on https://github.com/BrunoBonacci/safely and https://github.com/BrunoBonacci/mulog.
Thank you very much for contributing this! It looks quite promising and I look forward to using it next time I deal with super long string manipulation! Let me know if you would you consider a PR from an external contributor on any item :-)
Cheers, Piotr
Hey, glad you have some interest in the project! I'll answer questions point by point.
- I'm definitely interested in porting it to cljc, I just hadn't put in the work yet, since this library is in more or less an alpha state and I'm not quite done with feature implementations I think.
- List is imported and CharSequence is not because CharSequence is in java.lang and imported as a part of the ns prelude.
- Yeah, the CharSequence implementation was pretty important to me because it means that the Clojure regex functions work on ropes without modification.
- I have actually done some performance comparisons on my own time and have used them to tune what exactly I'm doing, but as this is alpha software I haven't decided to post them yet, as changes I make still can have big impact on performance (e.g. I am considering making an IEditableCollection implementation for the rope)
- I have no plans to give it a semantic version number, as semantic versioning is not useful in the Clojure community. I will be giving it a version number and publishing via Clojars in the future however. I'm not familiar with GitHub packages though, I can take a look at it later.
- Badges I am interested in, and you can probably see my other libraries have a few of them. I don't consider a build or license badge in particular to be useful as github already shows license in a clean way and I do not use CI style builds for libraries. I don't see much point in them.
- The readme will be expanded once I'm closer to having finished software, you can see from my other projects (see https://github.com/IGJoshua/coffi, https://github.com/IGJoshua/farolero, https://github.com/discljord/discljord) that I'm usually rather prolific in my readmes.
As for external contributors, I am definitely open to contributions, e.g. from someone with more CLJS experience helping to port it to CLJC, or for just adding a CLJS version with feature parity (although I will likely do this myself at some point). I think since this is still relatively alpha software I may be a little more strict about what contributions I accept since I still have design ideas for this that simply aren't implemented yet.