Re: wget replacement code review

2010-04-24 Thread Brent Millare
Duly noted, thanks Jonathan. (defn- extract-url-filename [url] (let [filename (.getFile url)] (if (or (blank? filename) (= filename "/")) "index.html" (subs filename 1 On Apr 24, 1:48 am, JonathanMeeks wrote: > It's not answering your idiomatic clojure question

Re: wget replacement code review

2010-04-23 Thread JonathanMeeks
It's not answering your idiomatic clojure question, but extract-url- filename will have problems because of this: user> (.getFile (URL. "http://www.foo.com/";)) "/" On Apr 21, 1:08 pm, Brent Millare wrote: > Technically I didn't write my own cause I just copied pasted it ;) > > For the purpose

Re: wget replacement code review

2010-04-21 Thread Brent Millare
Technically I didn't write my own cause I just copied pasted it ;) For the purposes of this review, just consider that library code or a reference so everyone knows what it does. :) Sean Devlin wrote: > At first glance, you should be requiring c.c.string, and don't write > your own blank? fn. Th

Re: wget replacement code review

2010-04-21 Thread Sean Devlin
At first glance, you should be requiring c.c.string, and don't write your own blank? fn. That's the only low hanging fruit I see. On Apr 21, 1:47 pm, Brent Millare wrote: > Hey all, > > I wrote a clojure version of the simplest functionality of wget. I > basically translated the java version int