Re: doseq vs dorun
Ideally, you wouldn't be using a side effect at all, but something like reducers to return a single computed result after going over the sequence. (If the input's too big for main memory, you'd also need to partition the input seq into reducible-collection chunks small enough to fit in memory.) If side effects are necessary because you're doing I/O for each element of the seq, then the overhead of wrapping in pmap is probably minimal as the task is I/O-bound, but the benefit of pmap may not be significant either. Threaded I/O is generally only useful for 1. preventing I/O from bottlenecking a CPU-bound task by splitting them into separate threads and 2. networking with many remote hosts, so you can usefully do something with host B while waiting for a response from host A, or with one remote host where latency and task orthogonality make several parallel interactions preferable to several sequential ones (e.g. a web browser loading images several at a time from a web server when the throughput is high but so is the latency). If side effects are necessary because you're interacting with a legacy Java API that uses mutable state, you might want to look into pvalues and pcalls. On Wed, Oct 16, 2013 at 10:34 PM, Pradeep Gollakota pradeep...@gmail.comwrote: Hi All, I’m (very) new to clojure (and loving it)… and I’m trying to wrap my head around how to correctly choose doseq vs dorun for my particular use case. I’ve read this earlier post https://groups.google.com/forum/#!msg/clojure/8ebJsllH8UY/mXtixH3CRRsJand I had a clarifying question. From what I gathered in the above post, it’s more efficient to use doseq instead of dorun since map creates another seq. However, if the fn you want to apply on the seq can be parallelized, doseq wouldn’t give you the ability to parallelize. With dorun you can use pmap instead of map and get parallelization. (doseq [i some-lazy-seq] side-effect-fn) (dorun (pmap side-effect-fn some-lazy-seq)) What is the idiomatic way of parallelizing a computation on a lazy seq? Thanks, Pradeep -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: doseq vs dorun
Hi, What is the idiomatic way of parallelizing a computation on a lazy seq? keep in mind, that pmap lazily processes the seq with a moving window the size of which depends on the available cores on your machine. If the processing of one element takes a long time, the parallel work will wait for it to finish before moving on. Thus, pmap may be an easy way to achieve parallel processing but is only suited for problems which take approximately the same time each. Stefan -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: doseq vs dorun
On Thursday, 17 October 2013 10:34:18 UTC+8, Pradeep Gollakota wrote: Hi All, I’m (very) new to clojure (and loving it)… and I’m trying to wrap my head around how to correctly choose doseq vs dorun for my particular use case. I’ve read this earlier post https://groups.google.com/forum/#!msg/clojure/8ebJsllH8UY/mXtixH3CRRsJand I had a clarifying question. From what I gathered in the above post, it’s more efficient to use doseq instead of dorun since map creates another seq. However, if the fn you want to apply on the seq can be parallelized, doseq wouldn’t give you the ability to parallelize. With dorun you can use pmap instead of map and get parallelization. (doseq [i some-lazy-seq] side-effect-fn) (dorun (pmap side-effect-fn some-lazy-seq)) What is the idiomatic way of parallelizing a computation on a lazy seq? I don't think there is a single idiomatic way. It depends on lots of things, e.g.: - How expensive is each side-effect-fn? If it is cheap, then the ovehead of making things parallel may not be worth it - Do you want to constrain the thread pool or have a separate thread for each element? For the later, futures are an option - Where is the actual bottleneck? If an external resource is constrained, CPU parallelization may not help you at all. - How is the lazy sequence being produced? Is it already realised, or being computed on the fly? - Is there any concern about ordering / concurrent access to resources / race conditions? Assuming that side-effect-fn is relatively CPU-expensive and that the runtimes of each call to it are reasonably similar, then I'd say that your (dorun (pmap .)) version is a decent choice. Otherwise you make want to take a look at the reducers library - the Fork/Join capabilities are very impressive and should do what you need. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] Counterclockwise - Clojure plugin for Eclipse
wow this is really polished! really great how this is standalone, and so small! I enjoyed using CCW in eclipse, but this is even better :D great work Laurent! On Thursday, October 10, 2013 9:36:01 AM UTC-4, Laurent PETIT wrote: Hi, a new version of Counterclockwise, the Clojure plugin for the Eclipse IDE, has just been released. Hot new features - auto indentation as you type - available as a Standalone Product: Download, Unzip, Code! - many bug fixes including (hopefully) stability improvements Install = - Software update site for installing into an existing Eclipse: http://updatesite.ccw-ide.org/stable/ Standalone product for: - Windows 64 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-win32.win32.x86_64.zip - Windows 32 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-win32.win32.x86.zip - Linux 64 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-linux.gtk.x86_64.zip - Linux 32 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-linux.gtk.x86.zip - OS X 64 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-macosx.cocoa.x86_64.zip Create a folder, unzip the product inside this folder, and double click on the Counterclockwise executable! (only pre-requisite: Java 7 in your path) Release Note == https://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.20.0 Cheers, -- Laurent Petit -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Are there any GUI based Clojure apps out there?
I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
you mean something like this https://github.com/arthuredelstein/clooj On Thu, Oct 17, 2013 at 4:31 PM, Jonathon McKitrick jmckitr...@gmail.comwrote: I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
Seesaw? https://github.com/daveray/seesaw 2013/10/17 Jonathon McKitrick jmckitr...@gmail.com I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: is PG's imperative outside-in advice any good?
For those who use clojure.tools.logging, there's also the handy spy function. On Tuesday, October 15, 2013 6:41:38 PM UTC-7, dgrnbrg wrote: If this is something you do often, spyscope is a library I wrote to simplify this sort of investigation. You can print an expression by writing #spy/d in front of it. For more information, you can read at https://github.com/dgrnbrg/spyscope On Tuesday, October 15, 2013 10:13:58 AM UTC-4, Brian Hurt wrote: Lifting subexpressions up into lets is actually something I do a lot- for one very important reason: it lets me insert print statements (or logging statements) showing the value of the subexpression. So I'll do; (let [ x (subexpression) ] (main-expression)) because it lets me do: (let [ x (subexpression) ] (println The value of x is x) (main-expression)) If fact, a lot of times I'll do; (let [ x (subexpression) res (main-expression) ] res) because it lets me do: (let [ x (subexpression) _ (println The value of x is x) res (main-expression) ] (println The value of the whole expression is res) res) This is of great value in debugging. Brian On Tue, Oct 15, 2013 at 9:56 AM, Mikera mike.r.an...@gmail.com wrote: I certainly prefer giving names to intermediate results with a let block: having good names and breaking the computation up into logical chunks makes the code much easier to understand and maintain when you come back to it later. PG's example though is bad for different reasons - this is actually mutating variables in an imperative style, which is definitely bad style - both in Lisp and Clojure I think. The Clojure equivalent would be to use atoms (or vars) and mutating them. let on its own is purely functional, and doesn't have this problem. On Tuesday, 15 October 2013 20:29:29 UTC+8, Daniel Higginbotham wrote: I've been going through On Lisp by Paul Graham and on page 33 he recommends against performing intermediate bindings. Does this advice hold for Clojure? Here are a couple examples: ;; Common Lisp (from the book) (defun bad (x) (let (y sqr) (setq y (car x)) (setq sqr (expt y 2)) (list 'a sqr))) (defun good (x) (list 'a (expt (car x) 2))) ;; Clojure (defn bad [x] (let [y (first x) sqr (expt y 2)] (list 'a sqr))) (defn good [x] (list 'a (expt (first x) 2))) Paul Graham explains: The final result is shorter than what we began with, and easier to understand. In the original code, we’re faced with the final expression (list 'a sqr), and it’s not immediately clear where the value of sqr comes from. Now the source of the return value is laid out for us like a road map. The example in this section was a short one, but the technique scales up. Indeed, it becomes more valuable as it is applied to larger functions. In clojure you can't do setq of course but I find myself going against this advice all the time, and I find that it's more important to do so when working with larger functions. I think introducing names makes code clearer. Here's an example from my own code: (defn create-topic [params] (let [params (merge params (db/tempids :topic-id :post-id :watch-id)) topic (remove-nils-from-map (c/mapify params mr/topic-txdata)) watch (c/mapify params mr/watch-txdata) post (c/mapify params mr/post-txdata)] {:result (db/t [topic post watch]) :tempid (:topic-id params)})) To my mind, creating bindings for topic, watch, and post makes the code easier to understand. When you get to (db/t [topic post watch]) you don't have to deal with as much visual noise to understand exactly what's going into the transaction. So, is PG's advice any good? Thanks! Daniel -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Are there any GUI based Clojure apps out there?
The Clojure namespace browser was developed using the Seesaw library: https://github.com/franks42/clj-ns-browser On Thu, Oct 17, 2013 at 6:33 AM, Arie van Wingerden xapw...@gmail.comwrote: Seesaw? https://github.com/daveray/seesaw 2013/10/17 Jonathon McKitrick jmckitr...@gmail.com I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] Counterclockwise - Clojure plugin for Eclipse
Window Preferences General Editors Text Editor Displayed Tab Width change 4 to 2 On Saturday, October 12, 2013 7:21:39 PM UTC+2, Gary Zhao wrote: Great. But I have one thing confusing. Auto indent uses two spaces, but tab uses four spaces. How can I make them consistent? Either 2 or 4 spaces for both. I tried some settings but didn't seem to work. Thanks. On Thursday, October 10, 2013 6:36:01 AM UTC-7, Laurent PETIT wrote: Hi, a new version of Counterclockwise, the Clojure plugin for the Eclipse IDE, has just been released. Hot new features - auto indentation as you type - available as a Standalone Product: Download, Unzip, Code! - many bug fixes including (hopefully) stability improvements Install = - Software update site for installing into an existing Eclipse: http://updatesite.ccw-ide.org/stable/ Standalone product for: - Windows 64 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-win32.win32.x86_64.zip - Windows 32 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-win32.win32.x86.zip - Linux 64 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-linux.gtk.x86_64.zip - Linux 32 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-linux.gtk.x86.zip - OS X 64 bits: http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-macosx.cocoa.x86_64.zip Create a folder, unzip the product inside this folder, and double click on the Counterclockwise executable! (only pre-requisite: Java 7 in your path) Release Note == https://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.20.0 Cheers, -- Laurent Petit -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/go 2. https://github.com/technomancy/s3-wagon-private -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Dependency management
Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
We are using apache archiva. Access through https, custom certificate and username/password, all work flawlessly in lein. JW On Thu, Oct 17, 2013 at 5:56 PM, Ben Mabey b...@benmabey.com wrote: On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/**go http://www.sonatype.org/nexus/go 2. https://github.com/**technomancy/s3-wagon-privatehttps://github.com/technomancy/s3-wagon-private -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscribe@**googlegroups.comclojure%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/clojure?hl=enhttp://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@**googlegroups.comclojure%2bunsubscr...@googlegroups.com . For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
There are also Archiva[1] and Artifactory[2]. [1] http://archiva.apache.org/index.cgi [2] http://www.jfrog.com/home/v_artifactory_opensource_overview Shantanu On Thursday, 17 October 2013 21:26:09 UTC+5:30, Ben Mabey wrote: On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/go 2. https://github.com/technomancy/s3-wagon-private -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
I've used an old version of Archiva, and we currently use Nexus. Nexus was the better experience. On Thu, Oct 17, 2013 at 12:05 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: There are also Archiva[1] and Artifactory[2]. [1] http://archiva.apache.org/index.cgi [2] http://www.jfrog.com/home/v_artifactory_opensource_overview Shantanu On Thursday, 17 October 2013 21:26:09 UTC+5:30, Ben Mabey wrote: On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/**go http://www.sonatype.org/nexus/go 2. https://github.com/**technomancy/s3-wagon-privatehttps://github.com/technomancy/s3-wagon-private -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
Nightcode is also client-side and all Clojure: https://nightcode.info/ Dave On Thu, Oct 17, 2013 at 7:02 AM, Andy Fingerhut andy.finger...@gmail.comwrote: The Clojure namespace browser was developed using the Seesaw library: https://github.com/franks42/clj-ns-browser On Thu, Oct 17, 2013 at 6:33 AM, Arie van Wingerden xapw...@gmail.comwrote: Seesaw? https://github.com/daveray/seesaw 2013/10/17 Jonathon McKitrick jmckitr...@gmail.com I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
I'll +1 Archiva. It's easy to setup and pretty simple to use. For a long time I resisted the idea of running an internal Maven repo at World Singles so we relied on lein-localrepo and other somewhat hacky techniques (that Technomancy regularly ribbed me about :) and once we reached three rogue libraries, it was just easier to bite the bullet and do it the right way. Archiva has definitely simplified our build process and given us more control / robustness, and we haven't even scratched the surface of what it can do. I haven't looked at Nexus. It looked more complex to setup and use (but more powerful?). Sean On Thu, Oct 17, 2013 at 9:04 AM, Jozef Wagner jozef.wag...@gmail.com wrote: We are using apache archiva. Access through https, custom certificate and username/password, all work flawlessly in lein. JW On Thu, Oct 17, 2013 at 5:56 PM, Ben Mabey b...@benmabey.com wrote: On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/go 2. https://github.com/technomancy/s3-wagon-private -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
At work, we're using Jenkins for CI. It happens to have a maven server plugin and a leiningen plugin. I did not participate in the original setup of the Jenkins system, but I was the one who (stealthily at first) installed both plugins, which is doable by just clicking around on the Jenkins webpage. It seems to work very well so far. On Thursday, 17 October 2013, Sean Corfield wrote: I'll +1 Archiva. It's easy to setup and pretty simple to use. For a long time I resisted the idea of running an internal Maven repo at World Singles so we relied on lein-localrepo and other somewhat hacky techniques (that Technomancy regularly ribbed me about :) and once we reached three rogue libraries, it was just easier to bite the bullet and do it the right way. Archiva has definitely simplified our build process and given us more control / robustness, and we haven't even scratched the surface of what it can do. I haven't looked at Nexus. It looked more complex to setup and use (but more powerful?). Sean On Thu, Oct 17, 2013 at 9:04 AM, Jozef Wagner jozef.wag...@gmail.comjavascript:; wrote: We are using apache archiva. Access through https, custom certificate and username/password, all work flawlessly in lein. JW On Thu, Oct 17, 2013 at 5:56 PM, Ben Mabey b...@benmabey.comjavascript:; wrote: On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/go 2. https://github.com/technomancy/s3-wagon-private -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.comjavascript:; Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:; For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com javascript:;. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.comjavascript:; Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:; For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com javascript:;. For more options, visit https://groups.google.com/groups/opt_out. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.comjavascript:; Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:; For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com javascript:;. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from
Confusing ArityExceptions from macros
If you've ever had a confusing ArityExceptionhttp://clojure-log.n01se.net/date/2013-10-16.html#19:37 while working with macros, the reason may be that clojure.lang.Compiler.macroexpand1 rethrows any ArityExceptionshttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6475it catches from a call to a macro, in order to reduce the number of arguments reported. This messes up the stack, potentially destroying information about where the ArityException occurred if it did not occur from the call to the macro itself. For instance: user (do (defn inner [] (assoc)) (defmacro f [] (inner)) (f)) ArityException Wrong number of args (-2) passed to: core$assoc clojure.lang.Compiler.macroexpand1 (Compiler.java:6488) user (use 'clojure.repl) (pst) nil ArityException Wrong number of args (-2) passed to: core$assoc clojure.lang.Compiler.macroexpand1 (Compiler.java:6488) clojure.lang.Compiler.macroexpand (Compiler.java:6544) clojure.lang.Compiler.eval (Compiler.java:6618) clojure.lang.Compiler.eval (Compiler.java:6624) clojure.lang.Compiler.eval (Compiler.java:6597) clojure.core/eval (core.clj:2864) clojure.main/repl/read-eval-print--6596/fn--6599 (main.clj:260) clojure.main/repl/read-eval-print--6596 (main.clj:260) clojure.main/repl/fn--6605 (main.clj:278) clojure.main/repl (main.clj:278) clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn--1251 (interruptible_eval.clj:56) clojure.core/apply (core.clj:617) nil user Note that the call to inner is not in the stack trace, and the number of arguments to it have been reduced by 2, leading to a nonsensical result in this case. The patch at http://dev.clojure.org/jira/browse/CLJ-1279 fixes this bug. Might save you some time, if you're developing macros. Best regards, Alex -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
Seesaw is, of course, the GUI *toolkit* for creating GUI apps. Though, it does come with a lot of examples. Also, speaking of seesaw, it looks like ClojureSphere lists a number of projects which make use of it: http://www.clojuresphere.com/seesaw/seesaw (scroll down to Dependents). -- John On Thursday, October 17, 2013 9:33:28 AM UTC-4, Arie van Wingerden wrote: Seesaw? https://github.com/daveray/seesaw 2013/10/17 Jonathon McKitrick jmcki...@gmail.com javascript: I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
If you mean examples of Clojure apps featuring a GUI, here are a couple of identity generators, both using my own GUI lib directly building on OpenGL (all controllers are VBOs). I've been meaning to release this for a long time, but haven't gotten around cutting a release writing docs... http://www.flickr.com/photos/toxi/sets/72157630719227308/ http://www.flickr.com/photos/toxi/sets/72157636665658583/ There's also an OpenCL raymarching voxel renderer I've been working on, which is completely driven by embedded in a Clojure app (with GUI controls realised w/ the same above mentioned lib) http://www.flickr.com/photos/toxi/sets/72157632697316842/ K. On 17 October 2013 20:42, John Gabriele jmg3...@gmail.com wrote: Seesaw is, of course, the GUI *toolkit* for creating GUI apps. Though, it does come with a lot of examples. Also, speaking of seesaw, it looks like ClojureSphere lists a number of projects which make use of it: http://www.clojuresphere.com/seesaw/seesaw (scroll down to Dependents). -- John On Thursday, October 17, 2013 9:33:28 AM UTC-4, Arie van Wingerden wrote: Seesaw? https://github.com/daveray/seesaw 2013/10/17 Jonathon McKitrick jmcki...@gmail.com I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: doseq vs dorun
I have the same use case: walking a seq of an input file, and doing file/db operations for each row. pmap is working very well, but it has required a lot of attention to the data flow, to make sure that no significant compute is done in the main thread. Otherwise IO blocks the compute. I briefly tried working with the reducers library, which generally made things 2-3 times slower, presumably because I'm using it incorrectly. I would really like to see more reducers examples, e.g. for this case: reading a seq larger than memory, doing transforms on the data, and then executing side effects. On Thursday, October 17, 2013 4:04:51 AM UTC-7, Mikera wrote: On Thursday, 17 October 2013 10:34:18 UTC+8, Pradeep Gollakota wrote: Hi All, I’m (very) new to clojure (and loving it)… and I’m trying to wrap my head around how to correctly choose doseq vs dorun for my particular use case. I’ve read this earlier post https://groups.google.com/forum/#!msg/clojure/8ebJsllH8UY/mXtixH3CRRsJand I had a clarifying question. From what I gathered in the above post, it’s more efficient to use doseq instead of dorun since map creates another seq. However, if the fn you want to apply on the seq can be parallelized, doseq wouldn’t give you the ability to parallelize. With dorun you can use pmap instead of map and get parallelization. (doseq [i some-lazy-seq] side-effect-fn) (dorun (pmap side-effect-fn some-lazy-seq)) What is the idiomatic way of parallelizing a computation on a lazy seq? I don't think there is a single idiomatic way. It depends on lots of things, e.g.: - How expensive is each side-effect-fn? If it is cheap, then the ovehead of making things parallel may not be worth it - Do you want to constrain the thread pool or have a separate thread for each element? For the later, futures are an option - Where is the actual bottleneck? If an external resource is constrained, CPU parallelization may not help you at all. - How is the lazy sequence being produced? Is it already realised, or being computed on the fly? - Is there any concern about ordering / concurrent access to resources / race conditions? Assuming that side-effect-fn is relatively CPU-expensive and that the runtimes of each call to it are reasonably similar, then I'd say that your (dorun (pmap .)) version is a decent choice. Otherwise you make want to take a look at the reducers library - the Fork/Join capabilities are very impressive and should do what you need. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dependency management
We have been using archiva for a long time. Less sophisticated than nexus but a lot simpler to set up, at least that was the state of things more than 2 years ago. Luc P. I've used an old version of Archiva, and we currently use Nexus. Nexus was the better experience. On Thu, Oct 17, 2013 at 12:05 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: There are also Archiva[1] and Artifactory[2]. [1] http://archiva.apache.org/index.cgi [2] http://www.jfrog.com/home/v_artifactory_opensource_overview Shantanu On Thursday, 17 October 2013 21:26:09 UTC+5:30, Ben Mabey wrote: On 10/17/13 9:38 AM, Andrei Serdeliuc wrote: Hi, I was wondering how people handle dependencies that aren't on clojars. We have a couple of clojure libs which are hosted on an internal github enterprise. So far I've been using lein's checkouts feature, but this seems fairly difficult when trying to setup continuous integration. As far as I can tell, lein doesn't support git dependencies. I've been thinking about maybe setting up an internal maven repo, but that seems like overkill. Any suggestions? Thanks! Honestly, my suggestion is to setup a maven repo. Nexus[1] has a free version and is easy to setup. If you really don't want to do that then you can deploy your artifacts to S3 using the lein-wagon[2] plugin. -Ben 1. http://www.sonatype.org/nexus/**go http://www.sonatype.org/nexus/go 2. https://github.com/**technomancy/s3-wagon-privatehttps://github.com/technomancy/s3-wagon-private -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad! -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] Jig
Would it be possible to put up a video of a typical workflow example with pedestal. It's quite difficult for me to piece everything together just by reading the documentation. Chris -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: is PG's imperative outside-in advice any good?
In CL, `let*` works like Clojure's `let`, in that both allow you to bind later variables to valued calculated from earlier ones. (CL's `let` only allows references to things defined before entering the `let`.) A couple of years ago I was hacking on some CL code originally written by someone else, with a lot of `let*`s in it. I started adding bindings, and them more, and after a while I just could not make it work. The order of bindings was crucial, and the right hand sides were referring to multiple variables bound elsewhere in the `let*`. It was driving me crazy. I realized that the whole thing I'd created was an instance of bad coding style.I just pulled things apart and put the code into separate functions that called each other. And I replaced all of my `do*`s (loops with bindings that can refer to each other) with `mapcar` or `mapc` (like Clojure's `map`). Much clearer. I now try to avoid `let*` as much as possible in CL, and when I use it, I make sure that I keep things simple. I'm just learning Clojure. I'm not going to avoid `let`, but I will try to make sure that I use it carefully. I agree with other posters here that sometimes code is clearer and easier to understand if it's broken into sequential bindings, but it depends. I think that often it's better to use a series of separate function calls instead of a big `let`. I would say that for me, a good rule of thumb is that a `let` should bind no more than four or five variables, maximum, and that if there are more variables, their rhs's should usually refer only to the variable defined on the previous line. Otherwise it's too hard to keep track of the dependencies. Maybe the right thing to say is: Follow PG's rule, except when it's better to break it. And then keep it simple. Those aren't rules that anyone else has to follow, of course. Do what works for you. This is how I think about it. On Tuesday, October 15, 2013 7:29:29 AM UTC-5, Daniel Higginbotham wrote: I've been going through On Lisp by Paul Graham and on page 33 he recommends against performing intermediate bindings. Does this advice hold for Clojure? Here are a couple examples: ;; Common Lisp (from the book) (defun bad (x) (let (y sqr) (setq y (car x)) (setq sqr (expt y 2)) (list 'a sqr))) (defun good (x) (list 'a (expt (car x) 2))) ;; Clojure (defn bad [x] (let [y (first x) sqr (expt y 2)] (list 'a sqr))) (defn good [x] (list 'a (expt (first x) 2))) Paul Graham explains: The final result is shorter than what we began with, and easier to understand. In the original code, we’re faced with the final expression (list 'a sqr), and it’s not immediately clear where the value of sqr comes from. Now the source of the return value is laid out for us like a road map. The example in this section was a short one, but the technique scales up. Indeed, it becomes more valuable as it is applied to larger functions. In clojure you can't do setq of course but I find myself going against this advice all the time, and I find that it's more important to do so when working with larger functions. I think introducing names makes code clearer. Here's an example from my own code: (defn create-topic [params] (let [params (merge params (db/tempids :topic-id :post-id :watch-id)) topic (remove-nils-from-map (c/mapify params mr/topic-txdata)) watch (c/mapify params mr/watch-txdata) post (c/mapify params mr/post-txdata)] {:result (db/t [topic post watch]) :tempid (:topic-id params)})) To my mind, creating bindings for topic, watch, and post makes the code easier to understand. When you get to (db/t [topic post watch]) you don't have to deal with as much visual noise to understand exactly what's going into the transaction. So, is PG's advice any good? Thanks! Daniel -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
On Thursday, 17 October 2013 21:31:12 UTC+8, Jonathon McKitrick wrote: I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) I wrote a small game Ironclad in Clojure which has a reasonably complex GUI. https://github.com/mikera/ironclad Mostly written using Swing - so serves as a decent example on how to do the Java GUI interop from Clojure -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Are there any GUI based Clojure apps out there?
DrClojure https://bitbucket.org/ktg/drclojure It is a very simple Clojure IDE. 2013년 10월 17일 목요일 오후 10시 31분 12초 UTC+9, Jonathon McKitrick 님의 말: I'd be interested in seeing some client-side apps with a GUI, if there are any. 'Ants' is a good demo, but I'm looking for something a little more. ;-) -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Using Friend with a proxy
hi, I'm using Friend, and it works very well, except now I've got things set up in production my app server has a reverse-proxy in front and the redirects no longer work for my protected routes. I tried using requires-scheme-with-proxy but without success...am playing around with it now, don't really know what I'm doing...I know that the proxy is Apache, is there anything else I need to know ? Cheers, and BTW thanks for Friend - yet another Clojure Gem that's made my life much easier. -- -- 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 members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.