Re: CRUD application backed only by immutable facts

2012-06-05 Thread nicolas.o...@gmail.com
It is not totally clear in your post how you want to keep the data? Is it in memory (with a transactional log somewhere)? If it is the case, you can do better than reducing the whole data set when executing a query: you can keep a cache of query results, or indexed data and maintain it, while

Creating a hashmap

2012-06-05 Thread Christian Guimaraes
Hello all, I'm studying a little bit of Clojure and facing a doubt here. I hava a list (a b c) and want to create a hashmap using the elements from this list. The keys will be a sequential number, and the values will be the values from the previous list. 1. list: (a b c) 2. desired hashmap:

Re: Creating a hashmap

2012-06-05 Thread Jay Fields
(zipmap (range 1 4) [a b c]) On Tue, Jun 5, 2012 at 7:59 AM, Christian Guimaraes cguimaraes...@gmail.com wrote: Hello all, I'm studying a little bit of Clojure and facing a doubt here. I hava a list (a b c) and want to create a hashmap using the elements from this list. The keys will be

Re: Creating a hashmap

2012-06-05 Thread Jay Fields
Also, if you're looking to learn this kind of stuff, 4clojure.com is an excellent resource. On Tue, Jun 5, 2012 at 8:02 AM, Jay Fields j...@jayfields.com wrote: (zipmap (range 1 4) [a b c]) On Tue, Jun 5, 2012 at 7:59 AM, Christian Guimaraes cguimaraes...@gmail.com wrote: Hello all,

Re: Creating a hashmap

2012-06-05 Thread Ambrose Bonnaire-Sergeant
Or: (zipmap (map inc (range)) '(a b c)) Thanks, Ambrose On Tue, Jun 5, 2012 at 8:02 PM, Jay Fields j...@jayfields.com wrote: (zipmap (range 1 4) [a b c]) On Tue, Jun 5, 2012 at 7:59 AM, Christian Guimaraes cguimaraes...@gmail.com wrote: Hello all, I'm studying a little bit of Clojure

Re: Friend: an extensible authentication and authorization library for Clojure Ring webapps and services

2012-06-05 Thread DAemon
Hi Chas, Was wondering whether there's been any work on extending Friend to OAuth stuff yet - I'm looking at implementing something that requires authentication with Twitter or Facebook, and haven't quite got my head around all the steps required to implement it myself... Thanks! - David On

Re: Creating a hashmap

2012-06-05 Thread Christian Guimaraes
Awesome... I'm studying lists manipulation. Solidifying this concept. The basic in Clojure, in my point of view. Thanks again. On Tue, Jun 5, 2012 at 1:03 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Or: (zipmap (map inc (range)) '(a b c)) Thanks, Ambrose On Tue,

Re: Creating a hashmap

2012-06-05 Thread Baishampayan Ghose
Or: (zipmap (drop 1 (range)) '(a b c)) :-) Regards, BG On Tue, Jun 5, 2012 at 5:33 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Or: (zipmap (map inc (range)) '(a b c)) Thanks, Ambrose On Tue, Jun 5, 2012 at 8:02 PM, Jay Fields j...@jayfields.com wrote: (zipmap

Re: Creating a hashmap

2012-06-05 Thread Jay Fields
If I needed the range to be infinite I'd probably use: (zipmap (iterate inc 1) '(a b c)) On Tue, Jun 5, 2012 at 8:13 AM, Baishampayan Ghose b.gh...@gmail.comwrote: Or: (zipmap (drop 1 (range)) '(a b c)) :-) Regards, BG On Tue, Jun 5, 2012 at 5:33 PM, Ambrose Bonnaire-Sergeant

Re: user.clj not working with lein 2.0

2012-06-05 Thread Jim - FooBar();
Does the :injections key replace the init.clj found in /.lein/? If I understood correctly, I had roughly the same problem...my code in init.clj (some debugging functions I always need available) is no more being loaded with lein2...should I use the :injections key instead? Thanks in

Re: Creating a hashmap

2012-06-05 Thread Meikel Brandmeyer (kotarak)
And a completely different approach: (into {} (map-indexed #(vector (inc %1) %2) [a b c])) Kind regards Meikel -- 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

Re: user.clj not working with lein 2.0

2012-06-05 Thread Phil Hagelberg
On Tue, Jun 5, 2012 at 5:20 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: Does the :injections key replace the init.clj found in /.lein/? If I understood correctly, I had roughly the same problem...my code in init.clj (some debugging functions I always need available) is no more being loaded

Re: user.clj not working with lein 2.0

2012-06-05 Thread Jim - FooBar();
On 05/06/12 17:10, Phil Hagelberg wrote: On Tue, Jun 5, 2012 at 5:20 AM, Jim - FooBar();jimpil1...@gmail.com wrote: Does the :injections key replace the init.clj found in /.lein/? If I understood correctly, I had roughly the same problem...my code in init.clj (some debugging functions I always

Re: user.clj not working with lein 2.0

2012-06-05 Thread Jim - FooBar();
On 05/06/12 18:00, Jim - FooBar(); wrote: On 05/06/12 17:10, Phil Hagelberg wrote: On Tue, Jun 5, 2012 at 5:20 AM, Jim - FooBar();jimpil1...@gmail.com wrote: Does the :injections key replace the init.clj found in /.lein/? If I understood correctly, I had roughly the same problem...my code in

Re: user.clj not working with lein 2.0

2012-06-05 Thread Phil Hagelberg
On Tue, Jun 5, 2012 at 10:00 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: Ok I see... then why can I not use my debug-repl, which is located in init.clj ? It only works when I'm in the 'user' namespace...I think this worked perfectly ok in lein1...at any given time I could do (debug-repl)

Re: Creating a hashmap

2012-06-05 Thread Tim Visher
On Tue, Jun 5, 2012 at 7:59 AM, Christian Guimaraes cguimaraes...@gmail.com wrote: I hava a list (a b c) and want to create a hashmap using the elements from this list. The keys will be a sequential number, and the values will be the values from the previous list. 1. list:   (a b c) 2.

Re: Creating a hashmap

2012-06-05 Thread Christian Guimaraes
Thanks for the tip, Timmy. This is a very interesting Vector feature. -- christian On Tue, Jun 5, 2012 at 7:13 PM, Tim Visher tim.vis...@gmail.com wrote: On Tue, Jun 5, 2012 at 7:59 AM, Christian Guimaraes cguimaraes...@gmail.com wrote: I hava a list (a b c) and want to create a hashmap

Re: user.clj not working with lein 2.0

2012-06-05 Thread Jim - FooBar();
On 05/06/12 18:17, Phil Hagelberg wrote: On Tue, Jun 5, 2012 at 10:00 AM, Jim - FooBar();jimpil1...@gmail.com wrote: Ok I see... then why can I not use my debug-repl, which is located in init.clj ? It only works when I'm in the 'user' namespace...I think this worked perfectly ok in lein1...at

Re: CRUD application backed only by immutable facts

2012-06-05 Thread Kevin Lynagh
Jonas, Definitely inspired by the ideas in Datomic. My question was partially: how can I implement the core immutability semantics of Datomic in plain Clojure?. (Say, hypothetically, that I need a Clojure datastore with flexible schema and immutability semantics but cannot actually use Datomic

(and clojure clodiuno fun)

2012-06-05 Thread eniotna
Hi, I just wanted to throw a message in the mailing list to THANK all the clojure dudes out there which does a magnificent job. Thank you guys. I'm having fun with it. It's fun to learn a language which aims to simplify things. I like to think of Clojure for the developer as the Force to the