Clojure On Java Friendly Microcontrollers, Beaglebone, etc

2013-08-31 Thread Jeremy Wright
I recently watched Carin Meier's OSCON talk The Joy of Flying Robots with Clojure and it made me wonder about Clojure on embedded systems. A quick search on this list didn't turn up much so I thought I'd ask. How much work has been done with Clojure o

Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-08-31 Thread Paul deGrandis
I'm definitely available to help out merging in code and maintaining a contrib. Let me know however you'd like to go forward! Paul On Sun, Aug 25, 2013 at 7:05 PM, gaz jones wrote: > Hey, i am the current maintainer of tools.cli - i have very little time to > make any changes to it at the mom

Re: Selecting subsets of maps

2013-08-31 Thread Baishampayan Ghose
Alex, Very cool! Thanks. ~BG On Fri, Aug 30, 2013 at 4:58 PM, Alex P wrote: > @ Baishampayan > @ Christophe > > Accidentally crossed over this post, turned out I've had exactly same need > (about a year after you though), and decided to write a little library, > Balagan: https://github.com/cloj

Re: Sorting a collection on multiple fields

2013-08-31 Thread Jay Fields
I would solve it like this- (defn multi-compare [[c & cs] [x & xs] [y & ys]] (if (= x y) (multi-compare cs xs ys) (c x y))) (defn multi-comparator [comparators] (fn [xs ys] (if (= (count xs) (count ys) (count comparators)) (multi-compare comparators xs ys)

Re: Sorting a collection on multiple fields

2013-08-31 Thread Leonardo Borges
Would this help? (sort-by (juxt :key1 :key2) your-list-of-maps) On 31/08/2013 7:57 PM, "ulsa" wrote: > I wanted to sort a sequence of maps using a spec consisting of an ordered > map of key and order, like this: > > (array-map :name 1 :age -1) > > I couldn't find a ready-made solution, so I rol

Sorting a collection on multiple fields

2013-08-31 Thread ulsa
I wanted to sort a sequence of maps using a spec consisting of an ordered map of key and order, like this: (array-map :name 1 :age -1) I couldn't find a ready-made solution, so I rolled my own. I ended up with three functions with a total of 10 lines of code. Two of them are generic, and one i