Re: Is This Function Idiomatic Clojure?

2010-10-06 Thread Per Vognsen
Your manual composition of concat and map is the same as the built-in function mapcat. Anyway, all this is what (for ...) does for you under the covers. -Per On Thu, Oct 7, 2010 at 1:52 PM, Michael Gardner wrote: > On Oct 7, 2010, at 1:29 AM, Stefan Rohlfing wrote: > >> Following an Enlive tuto

Re: Is This Function Idiomatic Clojure?

2010-10-06 Thread Per Vognsen
Sorry, the 'in' is obviously a typo and should be left out. I tested the code in the REPL but then retyped it from memory rather than copy and pasting. :) -Per On Thu, Oct 7, 2010 at 1:53 PM, Per Vognsen wrote: > Try something like this: > > (defn dmap [& args] >  (for [[head items] args] >    

Re: Is This Function Idiomatic Clojure?

2010-10-06 Thread Per Vognsen
Try something like this: (defn dmap [& args] (for [[head items] args] item in items] [head item])) -Per On Thu, Oct 7, 2010 at 1:29 PM, Stefan Rohlfing wrote: > Dear Clojure Group, > > Following an Enlive tutorial I wanted to implement a function 'd-map' > that takes an arbitrary

Re: Is This Function Idiomatic Clojure?

2010-10-06 Thread Michael Gardner
On Oct 7, 2010, at 1:29 AM, Stefan Rohlfing wrote: > Following an Enlive tutorial I wanted to implement a function 'd-map' > that takes an arbitrary number of [:key (list of values)] parameters > like this: > > (d-map [:headline ["this" "is" "me"] ] > [:points [1 2 3] ] > [:co

Is This Function Idiomatic Clojure?

2010-10-06 Thread Stefan Rohlfing
Dear Clojure Group, Following an Enlive tutorial I wanted to implement a function 'd-map' that takes an arbitrary number of [:key (list of values)] parameters like this: (d-map [:headline ["this" "is" "me"] ] [:points [1 2 3] ] [:comments [10 20 30] ]) and returns a coll

Re: Generating "special" classes

2010-10-06 Thread mac
On Oct 6, 4:00 pm, Christian Vest Hansen wrote: > Actually... what I *really* want is your clj-native library :D > > Is this it?http://github.com/bagucode/clj-native > Yes, that's it. :) I'm not actively working on it now but I will fix any errors reported so please just shoot me a mail if you h

Re: ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread James Reeves
2010/10/6 Cédric Pineau : > One thing : I'm new to clojure and gathering information about the whole > ecosystem, including web frameworks, but find it hard to figure what to > choose. It would help to have clues of funkyweb's "positioning" regarding > other frameworks such as compojure, compojure-

Re: ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread Michael Ossareh
2010/10/6 Cédric Pineau > > One thing : I'm new to clojure and gathering information about the whole > ecosystem, including web frameworks, but find it hard to figure what to > choose. This has been raised quite a few times recently. Is this a sign of some critical mass starting to form? > It

Re: ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread Cédric Pineau
Looks nice indeed ! Very REST oriented, isn't it ? One thing : I'm new to clojure and gathering information about the whole ecosystem, including web frameworks, but find it hard to figure what to choose. It would help to have clues of funkyweb's "positioning" regarding other frameworks such as c

Re: ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread Patrik Hedman
2010/10/6 Scott Jaderholm > Very nice. I really love the docs. Covers how to use almost everything with > plenty of example code and short descriptions. > Thanks, I'm happy they aren't too confusing :) > I like variadic args, type hints. > > Doesn't cover how to test a handler (from code) and

Re: appengine-magic: using Clojure with Google App Engine

2010-10-06 Thread Constantine Vetoshev
On Oct 4, 10:52 pm, Glen Stampoultzis wrote: > On 21 September 2010 07:15, Constantine Vetoshev wrote: > > I'd like to announce the release of a working version of appengine- > > magic, a library designed to make it easier to get started with Google > > App Engine using Clojure. > > .. chop .. >

Re: Cross-referencing objects?

2010-10-06 Thread ka
@Alan I'm trying to understand why you find the solution you gave "gross" > I could construct all the objects and have a single "global" map, with > mappings for both set-id=>[objects] and object=>set-id, but this seems > kinda gross and obscures what is actually meant (objects belong to > sets)

Attribution in the cookbook

2010-10-06 Thread David Sletten
As I mentioned before, I have no intention of being the sole contributor to the Clojure Cookbook site. In a few days we plan to open it up so that anyone may contribute recipes (or fix mine :-) ). However, in the meantime I have already included a little bit of material from other people. Speci

Re: ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread Scott Jaderholm
Very nice. I really love the docs. Covers how to use almost everything with plenty of example code and short descriptions. I like variadic args, type hints. Doesn't cover how to test a handler (from code) and see response. Maybe move query-string request docs up to where query-string params intr

cut Conj costs, share rooms/cars/vessels

2010-10-06 Thread braver
Greetings -- I'm paying my way to Conj and would like to split the hotel with someone who doesn't snore! Driving is probably too far from NH, but in case you sail your boat down the coast, I'd like to jump in, too. Let's split the room at least! Cheers, Alexy -- You received this message becau

Re: List folders/ Files recursively

2010-10-06 Thread B Smith-Mannschott
On Wed, Oct 6, 2010 at 16:59, Justin Kramer wrote: > On Oct 6, 8:39 am, B Smith-Mannschott wrote: > > On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > > > ; prints all files > > > (import 'java.io.File) > > > (defn walk [dirpath] > > > (doseq [file (-> dirpath File. file-seq)] > > > (println

Re: VimClojure 2.2.0 released

2010-10-06 Thread Wilson MacGyver
On Wed, Oct 6, 2010 at 11:04 AM, Meikel Brandmeyer wrote: > The future will probably be nREPL which was started recently by Chas > Emerick. It will provide a common backend server for all > (participating) IDEs. One main problem is - surprise - Windows. I have > no simple solution to just pipe inp

Re: VimClojure 2.2.0 released

2010-10-06 Thread Jeff Rose
Sorry, I'm blind. Using the patched nailgun it works fine. I'm looking forward to nRepl, it looks like a good long-term solution. -Jeff On Oct 6, 5:04 pm, Meikel Brandmeyer wrote: > Hi, > > On 6 Okt., 16:44, Jeff Rose wrote: > > > I've just installed the new version, but it isn't connecting

Re: List folders/ Files recursively

2010-10-06 Thread Justin Kramer
I should mention that Ben's solution is still nice and is basically how tree-seq is implemented under the hood. It is more idiomatic than using loop/recur (for most use cases). Justin On Oct 6, 10:59 am, Justin Kramer wrote: > On Oct 6, 8:39 am, B Smith-Mannschott wrote: > > > On Wed, Oct 6, 20

Re: VimClojure 2.2.0 released

2010-10-06 Thread Meikel Brandmeyer
Hi, On 6 Okt., 16:44, Jeff Rose wrote: > I've just installed the new version, but it isn't connecting to > nailgun using either my ng-server script or using lein nailgun, which > both work with the previous version.  Do we need to change port > numbers or do something differently when starting n

Re: List folders/ Files recursively

2010-10-06 Thread Justin Kramer
On Oct 6, 8:39 am, B Smith-Mannschott wrote: > On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > > ; prints all files > > (import 'java.io.File) > > (defn walk [dirpath] > >  (doseq [file (-> dirpath File. file-seq)] > >     (println (.getPath file)  ))) > > This doesn't do what you said you wanted

Re: VimClojure 2.2.0 released

2010-10-06 Thread Michael Wood
On 6 October 2010 16:44, Jeff Rose wrote: > Great, thanks a lot! > > I've just installed the new version, but it isn't connecting to > nailgun using either my ng-server script or using lein nailgun, which > both work with the previous version.  Do we need to change port > numbers or do something d

Re: VimClojure 2.2.0 released

2010-10-06 Thread Jeff Rose
Great, thanks a lot! I've just installed the new version, but it isn't connecting to nailgun using either my ng-server script or using lein nailgun, which both work with the previous version. Do we need to change port numbers or do something differently when starting nailgun now? This also remin

Re: List folders/ Files recursively

2010-10-06 Thread Abraham
Thanks a lot .. really good On Oct 6, 5:39 pm, B Smith-Mannschott wrote: > On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > > Dear All , > > > I wanted to list  the files of a folder , if a folder within , then it > > should list the files of that folder and so on.. ie recursively list > > files o

Re: Generating "special" classes

2010-10-06 Thread Christian Vest Hansen
Actually... what I *really* want is your clj-native library :D Is this it? http://github.com/bagucode/clj-native On Wed, Oct 6, 2010 at 07:21, mac wrote: > There is always clojure.asm if you don't mind getting your hands dirty > with bytecode generation. That's what I did when I needed exactly w

Re: List folders/ Files recursively

2010-10-06 Thread B Smith-Mannschott
On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > Dear All , > > I wanted to list the files of a folder , if a folder within , then it > should list the files of that folder and so on.. ie recursively list > files of folders > > I tried with recur & loop and could not do it . Then i searched the >

Re: VimClojure 2.2.0 released

2010-10-06 Thread Jose Figueroa Martinez
Hello Meikel, Thank you very much for your work. Vim is my prefered text/code editor and thanks to your work I can use Clojure in an eficient and enjoyable way :-) I use my own plugin (Vicle http://www.vim.org/scripts/script.php?script_id=2551) to work with the clojure repl, but it is just my pr

ANN: funkyweb 0.1.0 - The clojure webframework with route inference

2010-10-06 Thread Patrik Hedman
I'm pleased to announce the 0.1.0 release of funkyweb, my ring based clojure webframework. It provides the following main abstractions: Controller: Controllers work somewhat like namespaces in that they define the base of the route so any actions defined under a controller will have routes genera

List folders/ Files recursively

2010-10-06 Thread Abraham
Dear All , I wanted to list the files of a folder , if a folder within , then it should list the files of that folder and so on.. ie recursively list files of folders I tried with recur & loop and could not do it . Then i searched the internet for the code , i got the code , but i am not able to

Re: CDT in Eclipse/CCW

2010-10-06 Thread Lee Spector
On Oct 6, 2010, at 6:42 AM, Laurent PETIT wrote: > Hello, > > from the main clojars page ( http://clojars.org/ ), link "Browse the > repository" : http://clojars.org/repo/ , and given the groupId and artifactId > of the CDT : http://clojars.org/repo/cdt/cdt/ . Choose your version ! :-) Ah --

Re: CDT in Eclipse/CCW

2010-10-06 Thread Laurent PETIT
Hello, from the main clojars page ( http://clojars.org/ ), link "Browse the repository" : http://clojars.org/repo/ , and given the groupId and artifactId of the CDT : http://clojars.org/repo/cdt/cdt/ . Choose your version ! :-) 2010/10/6 Lee Spector > > On Oct 4, 2010, at 9:40 AM, Laurent PETIT

Re: CDT in Eclipse/CCW

2010-10-06 Thread Lee Spector
On Oct 6, 2010, at 6:05 AM, George Jahad wrote: > > I haven't tested out Laurent's proposal (and I suspect he hasn't > either). It will almost certainly work, but may require a bit of > tweaking on your part. Anyways I have uploaded the latest jar to > clojars. If you use lein or maven you ge

Re: CDT in Eclipse/CCW

2010-10-06 Thread George Jahad
I haven't tested out Laurent's proposal (and I suspect he hasn't either). It will almost certainly work, but may require a bit of tweaking on your part. Anyways I have uploaded the latest jar to clojars. If you use lein or maven you get it by adding it as a dependency to your project. Otherwis

Re: ANN: SQLRat - A Clojure 1.2 library to access Relational Databases using DataTypes

2010-10-06 Thread Shantanu Kumar
On Oct 6, 8:39 am, nchubrich wrote: > > So, the question is -- is SQLRat doing more or less the same thing as > > ClojureQL? Partly "yes", but mostly "no". > > Thanks Shantanu!  So I suppose one way you could use them both is > simply use the SQL compilation feature of ClojureQLyou could pas