Re: New string utilities library ready

2009-08-23 Thread Sean Devlin
Stuart, This is a significant improvement over the original str-utils library, and goes a long way towards making string processing kick ass in Clojure. I like the fact that you made some design decisions for the library, and did everything you could to stick with them. That makes the library

Re: New string utilities library ready

2009-08-22 Thread Sean Devlin
Okay, I'm not sure what the correct thing do for the entire library is, but I think I've got a convincing argument for some functions. The following functions share a name with core functions butlast contains? drop get partition repeat reverse take These functions should follow their

Re: New string utilities library ready

2009-08-20 Thread Meikel Brandmeyer
Hi, Disclaimer: personal opinion following... I'm sorry. I don't get the elegance of point-free style. In mathematics f denotes the function, while f(x) denotes the value f takes over x. This is actually a nice and easy to understand notation. But why do I have to clutter my clojure code with

Re: New string utilities library ready

2009-08-20 Thread Chas Emerick
On Aug 20, 2009, at 2:29 AM, Meikel Brandmeyer wrote: Hi, Disclaimer: personal opinion following... I think that's all we have when it comes to matters of style :-) I'm sorry. I don't get the elegance of point-free style. In mathematics f denotes the function, while f(x) denotes the

Re: New string utilities library ready

2009-08-20 Thread Michel Salim
On Wed, 2009-08-19 at 23:29 -0700, Meikel Brandmeyer wrote: Hi, Disclaimer: personal opinion following... I'm sorry. I don't get the elegance of point-free style. In mathematics f denotes the function, while f(x) denotes the value f takes over x. This is actually a nice and easy to

Re: New string utilities library ready

2009-08-20 Thread Stuart Sierra
Seems like opinion is pretty evenly divided here. I'll leave the library as-is for now, give it some time to see how things play out. In the mean time, as a compromise, I've added str-utils2/partial, which is like clojure.core/partial for functions that take their primary argument first.

Re: New string utilities library ready

2009-08-20 Thread Bradbev
On Aug 20, 8:26 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Seems like opinion is pretty evenly divided here.  I'll leave the library as-is for now, give it some time to see how things play out. In the mean time, as a compromise, I've added str-utils2/partial, which is like

Re: New string utilities library ready

2009-08-20 Thread Brian Carper
On Aug 19, 2:16 pm, Sean Devlin francoisdev...@gmail.com wrote: First, I would change the names of functions functions that collide with core to str-take, str-drop, etc.  It's just as much to type, and it is safe to use these names.  Also, it would make it easier for Rich to promote the

New string utilities library ready

2009-08-19 Thread Stuart Sierra
Hey folks, clojure.contrib.str-utils is one of the first libs I wrote, and it's showing its age. I decided to try to start fresh, incorporating some ideas discussed on the list. In general, I'm trying to provide an efficient, functional API for string manipulation. My new attempt is

Re: New string utilities library ready

2009-08-19 Thread Vagif Verdi
I'm using str-utils2 for a couple of months now. Do not care about the old library. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note

Re: New string utilities library ready

2009-08-19 Thread Chouser
On Wed, Aug 19, 2009 at 1:59 PM, Vagif Verdivagif.ve...@gmail.com wrote: I'm using str-utils2 for a couple of months now. Do not care about the old library. Me too. I think it would be helpful to have a recommended namespace alias to help keep different people's code a bit more uniform. I

Re: New string utilities library ready

2009-08-19 Thread Dan Larkin
On Aug 19, 2009, at 2:22 PM, Chouser wrote: I use (require '[clojure.contrib.str-utils2 :as str2]) for now and would recommend just 'str' if the lib name changes. Except, of course, since there is already a str function, 'str' would be a bad alias. 'strutils' or 'str-utils' sound fine to

Re: New string utilities library ready

2009-08-19 Thread Howard Lewis Ship
Have you considered splitting the str-utils2 into two namespaces, one that can be imported, and another that needs to be required with a namespace? On Wed, Aug 19, 2009 at 11:22 AM, Chouserchou...@gmail.com wrote: On Wed, Aug 19, 2009 at 1:59 PM, Vagif Verdivagif.ve...@gmail.com wrote: I'm

Re: New string utilities library ready

2009-08-19 Thread Stuart Sierra
On Aug 19, 3:09 pm, Howard Lewis Ship hls...@gmail.com wrote: Have you considered splitting the str-utils2 into two namespaces, one that can be imported, and another that needs to be required with a namespace? Hi Howard, Hadn't thought of that, actually. There are 9 conflicts, out of 32

Re: New string utilities library ready

2009-08-19 Thread Stuart Sierra
On Aug 19, 5:16 pm, Sean Devlin francoisdev...@gmail.com wrote: I suspect I am in the minority with my next concern.  The library takes the string as the first argument, so that it works well with the - macro.  When I originally wrote my string library, I favored this type of signature too.

Re: New string utilities library ready

2009-08-19 Thread CuppoJava
I'm also looking for a satisfactory answer to this problem. So far I'm slightly in favor of putting the data (ie. the sequence/ collection/object ...) first in the argument list and the parameters following. This is because there's so many core functions that take a function and arguments and

Re: New string utilities library ready

2009-08-19 Thread Stuart Sierra
On Aug 19, 9:56 pm, CuppoJava patrickli_2...@hotmail.com wrote: If I were to have my way, I would redefine all the clojure.core functions to assume the data is the last argument instead of the first. (this includes -) This way they would play nice with both partial and -. That's a really

Re: New string utilities library ready

2009-08-19 Thread Sean Devlin
+1 On Aug 19, 11:02 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Aug 19, 9:56 pm, CuppoJava patrickli_2...@hotmail.com wrote: If I were to have my way, I would redefine all the clojure.core functions to assume the data is the last argument instead of the first. (this includes

Re: New string utilities library ready

2009-08-19 Thread samppi
For me, I'd like it if the core functions had the data as the first argument, but have a special function—I can't come up with a better name than partial-2—so that (partial-2 function opt1 opt2 opt3) is equivalent to (fn [data] (function data opt1 opt2 opt3)). That way, I could do things like

Re: New string utilities library ready

2009-08-19 Thread John Harrop
On Thu, Aug 20, 2009 at 12:45 AM, samppi rbysam...@gmail.com wrote: For me, I'd like it if the core functions had the data as the first argument, but have a special function—I can't come up with a better name than partial-2—so that (partial-2 function opt1 opt2 opt3) is equivalent to (fn