Re: How do you process this over multiple values?

2015-10-16 Thread Francis Avila
There are only two steps: filter to select maps to use (e.g. :name = "abc"), map to transform them (e.g. extract :value). Here are some examples: (def xs [{:src "a.png", :name "abc", :value "a"} {:name "def", :src "b.gif", :value "b"}]) => #'user/xs (->> xs (filter (comp #{"abc" "def"} :na

How do you process this over multiple values?

2015-10-16 Thread Mike
I'm still new at this, thanks for any help. The following line extracts a value from a data structure: (:value (first (filter #(= (:name %) "abc") input-attrs))) *input-attrs* is a seq of hashes that for example looks like: ({:src "a.png", :name "abc", :value "a"} {:name "def", :src "b.gif", :v

Re: is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Robert Levy
Many use s3-wagon or a hosted maven. Or you could install dependencies locally, but that's a pain. On the other hand putting AWS credentials in CI for example to use s3-wagon can be annoying too. What about depending on a specific git remote / commit? This library might be worth giving a shot: ht

Re: is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Shantanu Kumar
We are using Artifactory for our internal Maven repo (supports enterprise Single-Sign-On): https://www.jfrog.com/open-source/ Shantanu On Saturday, 17 October 2015 02:47:29 UTC+5:30, Lawrence Krubner wrote: > > I know this question has been asked before, but when I went searching I > mostly fou

Re: is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Sean Corfield
We use Apache Archiva to run a Maven-like repo on an internal server for this sort of scenario (then you specify that repo endpoint in project.clj for Leiningen to see). Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not real

Re: is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Gary Trakhman
I've used Nexus and Archiva, and I feel nexus is a better experience: https://maven.apache.org/repository-management.html There is a stopgap solution involving s3 that might be easier to set up: https://github.com/technomancy/s3-wagon-private On Fri, Oct 16, 2015 at 5:17 PM Lawrence Krubner wrot

is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Lawrence Krubner
I know this question has been asked before, but when I went searching I mostly found old entries that were on a somewhat different topic, such as "How to add a java library (that is not in maven) as a dependency for a clojure library?" I wrote a Clojure app and my co-worker wrote a Java app. I

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Lawrence Krubner
> Is it possible that this-users-converstation *does* have > an :incoming-message key with a nil value? Good catch! I feel like an idiot for not realizing that. On Friday, October 16, 2015 at 2:43:14 PM UTC-4, Francis Avila wrote: > > Not-found is not the same is not-nil. Is it possible that

Clojure and Financial Tech Talk @Funding Circle!

2015-10-16 Thread jesse . harrison
https://www.eventbrite.com/e/funding-circle-speaker-series-zach-tellman- clojure-and-financial-tech-tickets-19000393689 Register now, Spots going fast! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

Re: Ted Dziuba: The S in REST

2015-10-16 Thread Bobby Calderwood
Shameless (but very relevant) plug: come check out my talk at Clojure/conj! http://clojure-conj.org/speakers#bcalderwood On Wednesday, October 14, 2015 at 7:25:35 AM UTC-4, Patrick Kristiansen wrote: > > On Wednesday, October 14, 2015 at 5:49:06 AM UTC+2, James Reeves wrote: >> >> Of course, the

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Ambrose Bonnaire-Sergeant
Is it possible :incoming-message is mapped to nil? On Fri, Oct 16, 2015 at 2:33 PM, Lawrence Krubner wrote: > What am I doing wrong here? I want to call clojure.string/lower-case on > the :incoming-message of this-users-conversation. If there is no message, I > return an empty string. > > > (de

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Francis Avila
Not-found is not the same is not-nil. Is it possible that this-users-converstation *does* have an :incoming-message key with a nil value? See the difference between these two cases: (get {} :a :not-found) => :not-found (get {:a nil} :a :not-found) => nil Notice also that records always "have

"get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Lawrence Krubner
What am I doing wrong here? I want to call clojure.string/lower-case on the :incoming-message of this-users-conversation. If there is no message, I return an empty string. (defn discern-current-state [this-users-conversation] (cond (= (clojure.string/lower-case (get this-users-conversat

Re: [ANN] Clojure 1.8.0-beta1

2015-10-16 Thread Mike Rodriguez
Yes a `map-entry?` predicate was sort of the direction I was leaning in that would help avoid issues like this around these changes. On Friday, October 16, 2015 at 10:58:47 AM UTC-5, Alex Miller wrote: > > Perhaps having a "map-entry?" predicate that was smarter would be helpful. > > On Friday, O

Re: recombining results from clojure.data/diff

2015-10-16 Thread Robin Heggelund Hansen
You can also take a look at patchin or differ (differ is my project) for this usecase. torsdag 15. oktober 2015 23.26.01 UTC+2 skrev JvJ følgende: > > I just discovered clojure.data/diff, and it's great. However, I'm not > sure how to recombine the results to get back the original. > > For inst

JavaOne Meetup

2015-10-16 Thread Steven Yi
Hi All, I was wondering if anyone here will be attending JavaOne and would like to meet up. If interested, feel free to email me off-list and maybe we can work out a place for coffee/dinner/drinks/etc. Thanks! steven -- You received this message because you are subscribed to the Google Groups

Re: [ANN] Clojure 1.8.0-beta1

2015-10-16 Thread Alex Miller
Perhaps having a "map-entry?" predicate that was smarter would be helpful. On Friday, October 16, 2015 at 9:39:09 AM UTC-5, Mike Rodriguez wrote: > > Yes, I am in support of the fact that size=2 vectors now can now have > `key` and `val` called on them. This not working prior to Clojure 1.8 was

Re: [ANN] Clojure 1.8.0-beta1

2015-10-16 Thread Mike Rodriguez
Yes, I am in support of the fact that size=2 vectors now can now have `key` and `val` called on them. This not working prior to Clojure 1.8 was occasionally the reason why I just used `first` and `second` instead of `key` and `val` before since some function transformations could result in siz

Re: Newbie trying HTML parsing

2015-10-16 Thread edbond
Hello Mike, Take a look at hickory, it's more straightforward than enlive if you want to find something in html: https://github.com/davidsantiago/hickory (ns .. (:require [hickory.core :as h] [hickory.select :as hs] [cljs.core.async :as a])) let [html (:

Re: [ANN] Clojure 1.8.0-beta1

2015-10-16 Thread Alex Miller
On Friday, October 16, 2015 at 3:32:43 AM UTC-5, Pierre-Yves Ritschard wrote: > > Hi Mike, > > The code at here seems to contradict you: > > https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentVector.java#L448-L460, > > > as does "(key [:a :b])" in the REPL. > > Th

Re: [ANN] Clojure 1.8.0-beta1

2015-10-16 Thread Pierre-Yves Ritschard
Hi Mike, The code at here seems to contradict you: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentVector.java#L448-L460, as does "(key [:a :b])" in the REPL. The only limitation is that vectors need to be of size two to act as IMapEntries (otherwise an IllegalOpera

Re: Where I can learn this?

2015-10-16 Thread benedek fazekas
also for some of the magic (rename symbol, extract function etc) in that awesome series can be achieved with the refactor nrepl middleware: https://github.com/clojure-emacs/refactor-nrepl added to your profiles.clj if you use leiningen same way as cider-nrepl. Also see extensive wiki for refact