Bug in clojure.java.io

2010-09-01 Thread abhinav sarkar
Hi, I noticed a bug in the clojure.java.io namespace at Line 57: URL (as-url [u] u) (as-file [u] (if (= file (.getProtocol u)) (as-file (.getPath u)) -- (throw (IllegalArgumentException. Not a file: u ++ (throw (IllegalArgumentException. (str Not a file:

Re: Removed Clojure binaries from contrib 'complete' jar

2010-08-25 Thread abhinav sarkar
I think what Stuart meant is that the class files compiled from the core clojure library will not be incide the clojure contrib uberjar. Only the class files compiled from the clojure contrib libs will be in there. On Wed, Aug 25, 2010 at 8:20 AM, ataggart alex.tagg...@gmail.com wrote: Pardon

Wrong package name of record classes

2010-08-18 Thread abhinav sarkar
Hi, I noticed that when I define a record (using defrecord) in a namespace having hyphen in its name (like abc.d-ef) and compile the clj file using AOT, a class file corresponding to the record defined is created in the package with the name same as the namespace it is defined in, with hyphen (in

Re: Speeding up equals using the cached hash code?

2010-08-05 Thread abhinav sarkar
If two objects are equal, they must have same hash code. But it does not imply the other way too. Two objects having the same hash code may be not equal (see, hash collision). So this approach may give false positives. - Abhinav On Thu, Aug 5, 2010 at 1:45 PM, Nicolas Oury nicolas.o...@gmail.com

Re: How to do multiple trys

2010-08-01 Thread abhinav sarkar
-format-wo-tz short-date-format-wo- tz])) WARNING: SimpleDateFormat is not thread-safe, so it's probably a bad idea to stick one in a shared context like def. On Jul 29, 10:35 pm, abhinav sarkar abhinav.sar...@gmail.com wrote: Hi, I am just starting to learn Clojure by writing a small

How to do multiple trys

2010-07-30 Thread abhinav sarkar
Hi, I am just starting to learn Clojure by writing a small library. I came across a situation in which I have to parse a String for getting a Date. Now the string can be in one of the three formats. So I wrote this functions to parse it: (def #^{:private true :tag SimpleDateFormat}