Re: Proposed Change to str-utils

2009-03-28 Thread Sean
Yesterday a coworker need a few excel spreadsheets (tab delimited) stitched together. I took this as an opportunity to test run my proposed string functions. Here's what I found: Good stuff * Having re-split be lazy is awesome. This made partially traversing a row super quick. * The str-before

Re: Proposed Change to str-utils

2009-03-25 Thread Tom Faulhaber
Having great string and regex manipulation is a must for anything that will be used as a scripting language and I think this should be conveniently available in Clojure. So, yes, I agree that these functions are ones that it makes sense to wrap. I'm not (yet, at least) commenting specifically on

Re: Proposed Change to str-utils

2009-03-25 Thread linh
> Hi, > > I would generally agree with Stuart that wrapping Java functions is > not a good idea. > > However, string functions come up so often that I think that this is > one area where the rule should be broken, if only for readablility. > I agree, I use these string functions frequently. Mayb

Re: Proposed Change to str-utils

2009-03-25 Thread Sean
Perry, 1. Thanks for the tip on using type hints! I just added them to my code and pushed it to github 2. If you take a close look at my re- * methods, I actually tried to enforce an arity of 2 on as many methods as I could. This way the methods would read like so (re-split input-sting

Re: Proposed Change to str-utils

2009-03-25 Thread Perry Trolard
Whatever it's worth as a datum, my experience is that I usually find myself writing upcase, downcase, titlecase functions in most applications, because (1) they're prettier & more succinct when passed as first-class (downcase vs. #(.toLowerCase %)) (2) I can add type hints once, in the downcase

Re: Proposed Change to str-utils

2009-03-24 Thread pc
Hi, I would generally agree with Stuart that wrapping Java functions is not a good idea. However, string functions come up so often that I think that this is one area where the rule should be broken, if only for readablility. Making str-utils kick-ass is a great idea. pc On Mar 24, 7:05 pm,

Re: Proposed Change to str-utils

2009-03-24 Thread Sean
Okay, I've made some changes to my proposed str-utils. I've also got a few answers to some of the issues Stuart raised. New Changes 1. re-strip is now lazy I re-wrote this method to used the re-partition method in str-utils. This enables the laziness, and helped be consolidate my Java interacti

Re: Proposed Change to str-utils

2009-03-24 Thread Stuart Sierra
On Mar 23, 9:46 pm, Sean wrote: > http://github.com/francoisdevlin/clojure-str-utils-proposal/tree/master > > I'm not sure what the directory structure should be for everything > still.  Perhaps somebody can point out how it should be done. > > I'll put the original post in the README > > Long st

Re: Proposed Change to str-utils

2009-03-23 Thread Sean
Okay, it's up. Still new to github. Sorry about that. I *think* it's here: http://github.com/francoisdevlin/clojure-str-utils-proposal/tree/master I'm not sure what the directory structure should be for everything still. Perhaps somebody can point out how it should be done. I'll put the origi

Re: Proposed Change to str-utils

2009-03-23 Thread David Nolen
Looks interesting and maybe even very useful. Why not put your code on Github or some other public repo of your liking. It's much nicer than pasting all this code ;) On Mon, Mar 23, 2009 at 9:18 PM, Sean wrote: > > Hello Everyone, > I've been reviewing the str-utils package, and I'd like to prop

Proposed Change to str-utils

2009-03-23 Thread Sean
Hello Everyone, I've been reviewing the str-utils package, and I'd like to propose a few changes to the library. I've included the code at the bottom. USE MULTI-METHODS I'd like to propose re-writing the following methods to used multi- methods. Every single method will take an input called in