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
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
> 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
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
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
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,
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
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
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
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
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
11 matches
Mail list logo