ANN: Vhector, client for Apache Cassandra

2011-05-01 Thread Damien Lepage
Hi, I just published a Clojure wrapper for the java library Hector, client for Apache Cassandra. https://github.com/damienlepage/vhector This is my first project with Clojure so the internals are certainly far from optimal. However I'm very happy with the API I've been able to put together. --

Re: SubVector's (via 'subvec') do not support 'transient'

2011-05-01 Thread Krukow
On Apr 30, 8:16 pm, Nathan Sorenson n...@sfu.ca wrote: Yes but the contract of subvec is that it returns a persistent vector and the resulting data structure returns true under the vector? predicate. I know that subvec returns a different type because I've looked at the Java source code but

Re: 2D graphics options with Clojure?

2011-05-01 Thread stu
On Apr 30, 5:54 pm, Nathan Sorenson n...@sfu.ca 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

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

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

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

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}, ;--

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

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

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

Re: Closures in macros

2011-05-01 Thread Alan
On May 1, 4:42 pm, André Thieme splendidl...@googlemail.com 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

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 [USA