Re: Automate Lein-Exec Deployment

2015-11-03 Thread Daniel Compton
Hi Asim You can add the lein-exec plugin to the :plugins section in your project.clj, people who don't have it in their m2 will download it like any other dependency. Your use case may be better handled by building an Uberjar. What you're describing is one of the primary use cases for using JARs,

Re: how to speedup lein uberjar?

2015-11-03 Thread Sunil S Nandihalli
It was too simple to setup .. I just had not spent time .. and also with respect to running the spark-app in yarn-client mode and connecting to it was a good suggestion. Thank you! Sunil. On Tue, Nov 3, 2015 at 7:46 PM, Asim Jalis wrote: > Hi Sunil, > > Yes. This should work. I have used somethi

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-03 Thread Sean Corfield
So, when using commute the update function is ALWAYS run TWICE! Holey Bovine, Batman! The docs for commute say: clojure.core/commute ([ref fun & args]) Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and re

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-03 Thread Alan Thompson
Hey, I just verified this piece about the commute function and I couldn't believe my eyes! (defn sleep-print-update [sleep-time thread-name update-fn] (fn [state] (Thread/sleep sleep-time) (println (str thread-name ": " state)) (update-fn state))) (def counter (ref 0)) (future (do

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-03 Thread Alan Thompson
Hi Daniel - Just finished the book and think it is one of the best places to start Clojure. Is there anyplace online that you are accepting errata? Thanks again, Alan On Fri, Oct 23, 2015 at 10:10 AM, John Gabriele wrote: > Excellent news! Looking forward to receiving my hard-copy, though have

Re: org-mode Clojure babel

2015-11-03 Thread Karsten Schmidt
Hi Johannes, checkout my leiningen template for org-mode projects here: http://thi.ng/babel and an example project using this template here: http://thi.ng/fabric On 3 November 2015 at 13:03, Stuart Sierra wrote: > Hi Johannes > > I have a working Org babel & Clojure in my Emacs setup. It's idios

Re: Help with decisions in threading macros

2015-11-03 Thread Erik Assum
some->> Erik. -- i farta > Den 3. nov. 2015 kl. 17.05 skrev Timur : > > Hi all, > > Often I need to make decisions in simple threading macros, for instance > consider the following code > > (->> m >:vector >(filterv #(= (:id %) (:id m))) >(reduce #(and %1 %2))) > >

Re: Help with decisions in threading macros

2015-11-03 Thread Atamert Ölçgen
Perhaps you can replace (reduce ...) with (every? true?), which works with empty collections. On Tue, Nov 3, 2015 at 6:05 PM, Timur wrote: > Hi all, > > Often I need to make decisions in simple threading macros, for instance > consider the following code > > (->> m >:vector >(fil

Help with decisions in threading macros

2015-11-03 Thread Timur
Hi all, Often I need to make decisions in simple threading macros, for instance consider the following code (->> m :vector (filterv #(= (:id %) (:id m))) (reduce #(and %1 %2))) In this case, if the result of filter is empty reduce throws an exception as it expects some val

Re: how to speedup lein uberjar?

2015-11-03 Thread Asim Jalis
Hi Sunil, Yes. This should work. I have used something much simpler in the past such as server-socket. This starts listening on a specific port and then you can telnet to that port from your client and start telnet with rlwrap to get history and editing. Asim On Tue, Nov 3, 2015 at 12:00 AM, Sun

Re: org-mode Clojure babel

2015-11-03 Thread Stuart Sierra
Hi Johannes I have a working Org babel & Clojure in my Emacs setup. It's idiosyncratic to my preferences, but maybe it will be useful: github.com/stuartsierra/dotfiles

Re: core.cache limits?

2015-11-03 Thread William la Forge
Sorry to report that after all that, I will need to pull the dependency on core.cache. Dealing with many small items, it is just too slow. Unfortunately I do need a thread-safe cache but really want to avoid sync locks, so I'd rather not roll my own. Guess I can look at the google caches. For n

Re: core.cache limits?

2015-11-03 Thread William la Forge
That is a great post. Unfortunately I had gotten quite flustered by the time I found it and it made little sense to me. But looking at it now it is very well done and quite clear. Sigh. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: core.cache limits?

2015-11-03 Thread Ray Miller
On 3 November 2015 at 01:23, William la Forge wrote: > There was just so much more there than I had ever dreamed. I had looked at > destructuring, but had been unaware of the various directives. :D > > I found this post by Jay Fields a useful resource for learning about destructuring: http://blo

org-mode Clojure babel

2015-11-03 Thread Johannes
Hi, I am looking for a working environment for using org-mode with Clojure babel. Googleing for the issue I can only find some apparently outdated hints. I am using org-mode version 8.2.10, Clojure 1.6.0, Leiningen 2.5.1, and CIDER 0.10.0. Any hints, where I can find the right configuration?

Re: how to speedup lein uberjar?

2015-11-03 Thread Sunil S Nandihalli
I can embed an nrepl-server in a driver program and submit that jar and then connect the nrepl-server to my emacs cider and work with it. I have just never done it. May be it is time to understand how instead of just doing M-x cider-jack-in Thanks Asim for pointing in the right direction. Regards