Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Dave Pawson
On 26 May 2010 23:09, Eric Schulte schulte.e...@gmail.com wrote: Mark Engelberg mark.engelb...@gmail.com writes: If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be better to call them triml, trim, trimr so that they show up next to each other in the alphabetized

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread ka
Stefan Kamphausen writes: sorry, I'm a little late. However, to me it is not clear what the trim functions shall do. If they become a replacement for chomp they are clearly misnamed. In many applications and languages (like Excel, several SQL variants, oh, and Java, ...) trim means

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Daniel Werner
On May 26, 8:12 pm, Mohammad Khan beepl...@gmail.com wrote: personally, I like strip or trim [rather] than chomp/chop. +1 from a mostly-Python programmer :-) On May 26, 8:15 pm, Mark Engelberg mark.engelb...@gmail.com wrote: If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Michael Gardner
On May 27, 2010, at 2:45 AM, Stefan Kamphausen wrote: Hi, On May 26, 11:00 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: The people have spoken! The trims have it! sorry, I'm a little late. However, to me it is not clear what the trim functions shall do. If they become a

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Stefan Kamphausen
Hi, On 27 Mai, 15:35, Michael Gardner gardne...@gmail.com wrote: On May 27, 2010, at 2:45 AM, Stefan Kamphausen wrote: Hi, On May 26, 11:00 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: The people have spoken! The trims have it! sorry, I'm a little late.  However, to me it is

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Stuart Halloway
Hi Brian, (1) Other than split-lines, what other non-promoted fns do you think are common enough to deserver promotion? (2) upper-case and lower-case are there for symmetry with capitalize. It's a judgment call, but one I am still comfortable with. (3) nil-handling is on the list of things to

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Stuart Halloway
Thanks to everyone for feedback on this thread. I have updated the ticket to include a list of changes and open questions, and will be working on a patch for review. Stu -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Sean Devlin
Oh, and following the tradition of clojure.java.io, you'll probably want to name it clojure.java.string, since it relies heavily on interop. Sean On May 27, 11:55 am, Stuart Halloway stuart.hallo...@gmail.com wrote: Thanks to everyone for feedback on this thread. I have updated the ticket to

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Stuart Halloway
You also mention making the string argument first in some of these fns. I believe Will Smith's catch phrase says it best: Aw hell no. String fns are like any other seq fn, and they need to be partial'ed, comp'ed and chained appropriately. I can't even begin to count the number of point

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread B Smith-Mannschott
On Thu, May 27, 2010 at 19:28, Sean Devlin francoisdev...@gmail.com wrote: Oh, and following the tradition of clojure.java.io, you'll probably want to name it clojure.java.string, since it relies heavily on interop. If bits of Java poke through the public interface, yes. This is certainly the

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Sean Devlin
Stu Halloway, I used the reasoning from your thread to convince Stuart Sierra to switch argument order between str-utils2 str-utils3: http://groups.google.com/group/clojure-dev/browse_thread/thread/7ab69b1d43012917 Args go last. Sean On May 27, 3:16 pm, Stuart Halloway

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Stuart Halloway
Stu, What happened to *not* promoting string? Changed our mind. It helps keep the people with prerelease books busy. ;-) Seriously: I did an audit of several third-party libraries, and concluded that for some libs, the presence of these string functions in core could be the make-or-break

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Mark Engelberg
Are these going to be in their own namespace (clojure.string), or in core? I hope the former, because many of these names (replace, reverse, join, split) are too valuable to be dedicated only to strings. -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Stuart Halloway
Definitely! It will be clojure.string. Ticket updated to reflect this. Are these going to be in their own namespace (clojure.string), or in core? I hope the former, because many of these names (replace, reverse, join, split) are too valuable to be dedicated only to strings. -- You received

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Sean Devlin
Stu Halloway, Changes like this are a nuisance as a documentation guy :| It makes Beta seem further away, but it's a tough call and someone has to make it. Such is life on the edge. As far as technical feedback goes, it seems like a VERY useful list to promote to core. There are a few things

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Fogus
Changed our mind. It helps keep the people with prerelease books   busy. ;-) Oh great! I'm going to have to cancel my appearance on The View because of this. I have mentioned my gripes in the IRC, but for public view I would love better names for chomp and chop. In isolation those names are

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Peter Schuller
chomp = rtrim (rtrim foo\n) = foo is much more clear to me, plus it leaves the door open for trim and ltrim functions should the need arise. I like this. And in general I often fine the entire trio useful, and adopting the ltrim/trim/rtrim naming makes it nice and tidy. While I recognize the

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Brian Carper
On May 26, 8:16 am, Stuart Halloway stuart.hallo...@gmail.com wrote: If you are a user of clojure.contrib.string, please take a look at the   proposed promotion to clojure [1]. Feedback welcome! It is my hope   that this promotion has enough batteries included that many libs can   end their

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Mike Meyer
On Wed, 26 May 2010 19:47:25 +0200 Peter Schuller peter.schul...@infidyne.com wrote: chomp = rtrim (rtrim foo\n) = foo is much more clear to me, plus it leaves the door open for trim and ltrim functions should the need arise. I like this. And in general I often fine the entire trio

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Brian Carper
On May 26, 10:29 am, Fogus mefo...@gmail.com wrote: I have mentioned my gripes in the IRC, but for public view I would love better names for chomp and chop.  In isolation those names are meaningless, so I suggest: Almost every name in a programming language is meaningless in isolation. But we

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Fogus
chomp has a clear meaning to anyone who's touched Perl/Ruby/shell- scripting. Believe me I can sympathize with this, but just because they are well- known to some doesn't mean that they are good names. On that note, just because rtrim and less make sense to me... you know the rest. :-) :f

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Mohammad Khan
This thread has potential to be the longest thread of clojure mailing list! personally, I like strip or trim than chomp/chop. On Wed, May 26, 2010 at 2:08 PM, Fogus mefo...@gmail.com wrote: chomp has a clear meaning to anyone who's touched Perl/Ruby/shell- scripting. Believe me I can

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Praki Prakash
personally, I like strip or trim than chomp/chop. +1 Seeing how Clojure dropped/changed many classic Lisp monikers, there is no reason to use comp/chop which may be familiar to somebody with Perl/Python but confusing to others. -- You received this message because you are subscribed to the

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Justin Kramer
I've done Perl coding and I still mix up chomp and chop. The meaning of trim, ltrim, and rtrim is immediately clear to me. trim, ltrim, and rtrim could take an optional argument for characters to strip: (rtrim foo) ;; strip trailing whitespace (rtrim foo \r\n) ;; equivalent to chomp If

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Stuart Halloway
The people have spoken! The trims have it! Stu I've done Perl coding and I still mix up chomp and chop. The meaning of trim, ltrim, and rtrim is immediately clear to me. trim, ltrim, and rtrim could take an optional argument for characters to strip: (rtrim foo) ;; strip trailing

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Stuart Sierra
On May 26, 12:42 pm, Sean Devlin francoisdev...@gmail.com wrote: I'd like to see a specific proposal for replace replace-first. Stuart Sierra put a lot of effort into getting those fns the way they are in contrib, and we should be careful to not undo any lessons learned in the process. Yes,

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Eric Schulte
Mark Engelberg mark.engelb...@gmail.com writes: If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be better to call them triml, trim, trimr so that they show up next to each other in the alphabetized documentation? +1 for modifiers at the end Let's not forget those of us who