Re: Sorting a collection on multiple fields

2013-09-12 Thread ulsa
Probably just a style pref though. > > On Wed, Sep 11, 2013 at 6:07 PM, ulsa > > wrote: > > Interesting. You used recursion, where I tried to see it as a sequence. > Any > > other differences? > > > > My solution was: > > > > (defn comp

Re: Sorting a collection on multiple fields

2013-09-11 Thread ulsa
>(sort-by (juxt :name :age) (multi-comparator [compare >])) >) > > On Sat, Aug 31, 2013 at 9:04 AM, Leonardo Borges > > wrote: > > Would this help? > > > > (sort-by (juxt :key1 :key2) your-list-of-maps) > > > > On 31/08/2013 7:57 P

Re: Sorting a collection on multiple fields

2013-09-11 Thread ulsa
> 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

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

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
This is good advice. I think you can cover a lot of ground using this approach, which I guess you need to do when writing a book. As I mentioned in another post, I believe I have to choose between covering a lot of ground and building them a foundation that they can experiment on further. On

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
lojure by playing and by reading idiomatic code. > Until then, however, Clojure development can be VERY frustrating . Maybe > this will all go away once we have better IDEs (LightTable, Session) full > developed, but until then don't just "assume" that people understan

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
I have used the isBlank example in presentations. It's not a bad starting point. Might look at how it could be used in a workshop. Thanks. On Thursday, 20 December 2012 17:16:19 UTC+1, Thomas wrote: > > If you need to touch on the why of Clojure I found the example in the > beginning Stuart Hall

Re: How to structure a Clojure day for noobs?

2012-12-21 Thread ulsa
about Clooj? > http://dev.clojure.org/display/doc/getting+started+with+Clooj > > Is it too buggy, or lacking in features, to start out with? > > On Tue, Dec 18, 2012 at 11:27 AM, ulsa > > wrote: > >> Good point. >> >> I really would like themselves to be able

Re: How to structure a Clojure day for noobs?

2012-12-18 Thread ulsa
Good point. I really would like themselves to be able to set up their own environment. I think it gives them a sense of control. However, as a fallback, it would be great with a virtual machine with everything working. I'll consider that. I believe you can get a similar level of interactivity

Re: How to structure a Clojure day for noobs?

2012-12-16 Thread ulsa
Interesting idea. Let me ponder that. When one starts pulling on a thread like metadata for example, all kinds of interesting facets pop up. That's what I meant with my comment about the XP practices graph thing. Different Clojure capabilities support and enable other capabilities, and you need

Re: How to structure a Clojure day for noobs?

2012-12-16 Thread ulsa
Thanks, I won't forget the REPL. I think, however, that there is a risk of a disconnect, where newcomers don't really grasp that there is a JVM running and that code is actually compiled and injected into it, and that it's for real. They are used to mickey mouse interactive tools that don't pr

Re: How to structure a Clojure day for noobs?

2012-12-16 Thread ulsa
at their > own pace. Allow enough time for the slowest ones to get through the basic > part of the exercise, but have a stash of extra stuff for the quicker ones, > so they don't get bored and frustrated while waiting on others. > > On Saturday, December 15, 2012 11:13:21 PM U

How to structure a Clojure day for noobs?

2012-12-15 Thread ulsa
In a couple of months, I'll have a whole day of teaching Clojure to ten of my colleagues. They are experienced Java programmers, but otherwise Clojure rookies. Any tips on how to structure such a workshop day? -- You received this message because you are subscribed to the Google Groups "Clojure