lein2 - lein version fails due to org.apache.http.impl.client.DefaultRequestDirector

2014-03-31 Thread Andrew Xue
my lein started not working mysteriously. i can't even get lein version to work w/o a weird error: lein version Mar 31, 2014 3:11:38 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect INFO: I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host:

a join function that can be used in a reduce

2013-01-14 Thread Andrew Xue
Hi -- Building some generic joining functionality on top of cascalog, the clojure package for big data. I have a join function that is defined like this: (defn join [lhs rhs join-ons] ..implementation ...) lhs and rhs are subqueries. the join returns then another query that is a join of the

error in classloading because not converting hyphen to underscore

2012-05-04 Thread Andrew Xue
hi all -- i am running a clojure based library (cascalog) on top of hadoop. i started getting errors on loading a class with the follow stack trace: Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: views.visit-facts, compiling:(views/

Re: is there some way to extract the parameter list from a function

2012-01-14 Thread Andrew Xue
that is exactly what i was looking for ! thanks! On Jan 14, 1:33 am, Baishampayan Ghose b.gh...@gmail.com wrote: Something like (:arglists (meta #'my-func)) ? Regards, BG On Sat, Jan 14, 2012 at 12:01 PM, Andrew Xue and...@lumoslabs.com wrote: given something like (defn my-func

destructing a map with a vector of keys?

2012-01-13 Thread Andrew Xue
trying do something like this (def my-keys [a b c]) (defn my-func [m] (let [{:keys my-keys} m] (prn a b c))) (my-func {:a 1 :b 2 :c 3}) tried '[a b c], ['a 'b 'c], and [a b c] for my-keys but they all give a Don't know how to create ISeq from: clojure.lang.Symbol error thanks andy -- You

is there some way to extract the parameter list from a function

2012-01-13 Thread Andrew Xue
given something like (defn my-func [a b c] (str a b c)) is there something like (extract-parameters my-func) which returns (a b c)? thanks, andy -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

java interop question: how to access Class object statically

2011-09-15 Thread Andrew Xue
Hi all -- Trying to basically do something like Integer.class -- but ... user= (Integer/class) user= java.lang.NoSuchFieldException: class (NO_SOURCE_FILE:2) user= (Integer/getClass) java.lang.NoSuchFieldException: getClass (NO_SOURCE_FILE:4) Some (not so pretty) workarounds are (.getClass

is there some gotchas with the contains? function and strings?

2011-08-24 Thread Andrew Xue
the below seems odd user= (contains? [1 2] 1) true user= (contains? [a b] a) false am i missing something? -- 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 that posts from new members

why is it necessary to use identity to check for nils in an if statement

2011-08-23 Thread Andrew Xue
this doesn't work: user= (defn if-a [a b] (if (a) (str a) (str b))) #'user/if-a user= (if-a nil b) java.lang.NullPointerException (NO_SOURCE_FILE:0) user= (if-a a nil) user= java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) this does work: