Multi-level bucketing problem

2011-05-01 Thread Bhinderwala, Shoeb
Hi fellow clojurers: I need help to group my data at multiple levels (currently 4) using a tree structure and perform aggregate calculations at each level. I have the below clojure code to generate a list of test records for me (using the get-rec function). (def reg-cntry-list {"America" ["US

Re: Closures in macros

2011-05-01 Thread Alan
On May 1, 4:42 pm, André Thieme wrote: > I am currently writing a neat logging lib and want it to support dynamic > and static logging. When I activate (static-logging!) then the log macro > (log :warn "message") will check during macro expansion time which log > level is currently set and decides

Closures in macros

2011-05-01 Thread André Thieme
I am currently writing a neat logging lib and want it to support dynamic and static logging. When I activate (static-logging!) then the log macro (log :warn "message") will check during macro expansion time which log level is currently set and decides based on that if code will be generated that l

Clojure Facebook Page with Wall Feature

2011-05-01 Thread john.phi85
Hi everyone, I have created a Facebook page for Clojure: http://www.facebook.com/pages/Clojure/182846995098761 Do drop by to like the page and contribute wall posts hence promoting Clojure to others on Facebook! Cheers, John -- You received this message because you are subscribed to the Googl

Re: Any best practices for clojure + java mixed language projects?

2011-05-01 Thread gaz jones
you can set the source path in leiningen to be whatever you like. the sample file is quite useful for finding these things out: https://github.com/technomancy/leiningen/blob/master/sample.project.clj they key is :source-path. there is also a :java-source-path. cant say i have ever used that, but

RE: Merging two maps based on ids

2011-05-01 Thread Bhinderwala, Shoeb
Thanks Ted. Using your approach I could write the following function which will allow me to merge any number of data sets very easily: (defn merge-by-ids [& args] (reduce #(merge %1 %2) (map #(index % [:id]) args))) Example: (def data1 ; lowest priority '({:id 2 :a2 34 :a3 76 :a4 87}, ;<--

Any best practices for clojure + java mixed language projects?

2011-05-01 Thread Dave Snowdon
Hi folks I'm a long time Java/C++ developer who's been experimenting with toy clojure programs for a few of months. I've at last decided to give clojure a try for a more significant project but, given this will incorporate components written in java I'm not sure about the way to structure and bui

Re: 2D graphics options with Clojure?

2011-05-01 Thread fyuryu
Processing has PDF exporting capabilities via one of the standard libraries that ship with it: http://processing.org/reference/libraries/pdf/index.html I haven't used it myself, but I remember seeing nice stuff rendered with it. -Roland -- You received this message because you are subscribed t

Re: Parallelism

2011-05-01 Thread Bojan Jovičić
Dear all, thanks for help and pointers. Introduction of independent range instead of partitioned parts of lazy sequence helped achieve parallelism (tested and works 4x faster (4 cores) then normal version). Here is the code (modified parts in bold): (def range-end 2) (def is-dividable

Re: 2D graphics options with Clojure?

2011-05-01 Thread stu
On Apr 30, 5:54 pm, Nathan Sorenson wrote: > Batik can serialize to both PNG and PDF.http://xmlgraphics.apache.org/batik/ > > I currently use Batik in a clojure project doing a lot of drawing of > 2d vector-based images. It's a very extensive library but it suits my > needs well. Do you have a