Fork me on GitHub
#clojure
<
2015-09-17
>
al3x00:09:17

anyone using s3-wagon-private with a recent Lein project?

danielcompton00:09:42

I’m maintaining too

al3x00:09:38

In a project with the latest Lein/Clojure/everything, I see:

Could not transfer artifact blah:common:pom:0.1.0-SNAPSHOT from/to releases (): No connector available to access repository releases () of type default using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

danielcompton00:09:57

can you share your whole project.clj?

al3x00:09:57

It looks like for a while you had to manually register the wagon connector?

danielcompton00:09:24

Perhaps previously, shouldn’t need to with the new plugin though?

al3x01:09:34

Right, that’s what I read on mailing lists and such. Moving to DM.

rory09:09:00

Hi all, I’m trying to work out an issue I’m having with Compojure & @cemerick ’s Friend. I want to have two different login-uris, and redirect to one for routes requiring one role, and the other URI for routes requiring the other role. Do I need to create a custom workflow function, or is there a simple way I can influence the existing interactive form workflow to make it behave the way I want?

malabarba14:09:09

Quick question, maybe someone can help.

malabarba14:09:48

Unlike swap!, the doc for send doesn't mention any concern with side-effects. Does that mean it's safe to assume that the function passed to send will only be called once?

Alex Miller (Clojure team)14:09:01

yes, it will be called once and can have side effects

Alex Miller (Clojure team)14:09:36

send (and send-off) produce functions that are applied (one at a time) to the agent state, so there is no possibility of a conflict that would cause retries

malabarba14:09:09

k! Thanks Alex

curtosis15:09:41

is there a current best practice for folding config parameters into building a WAR file (i.e. via lein ring uberwar)? I have to deploy to tomcat currently and have to embed config parameters that vary between dev and prod. lein-filegen, maybe?

nha15:09:09

I just launched my first uberjar live today simple_smile Any recommendations regarding JVM arguments ? (like Xmx256m or else ?). I launch it with java -jar my-uberjar.jar for now.

curtosis15:09:36

lein-resource appears to still be sufffering from the clojure.data/priority-map / :aot bug.(https://github.com/m0smith/lein-resource/issues/15)

mocker16:09:47

(def my-list {:web01 {:ip "192.168.0.1"
                      :tags ["web" "production"]}
              :db01 {:ip "192.168.0.2"
                      :tags ["database" "production"]}})
I want to look up servers by tags. Is this a good structure? How would I find db01 by looking for the tag database?

Alex Miller (Clojure team)16:09:55

@mocker: you'll likely find using a set rather than a list for your tags makes it easier to check whether the tag set contains a particular value

Alex Miller (Clojure team)16:09:41

because you have not indexed by tags (something you could do in addition if you like), you will need to examine every map entry and filter just the entries that have a particular tag in their tag set

Alex Miller (Clojure team)16:09:32

if you changed tags from [ ] to #{ }, you could do something like (filter (fn [[k {:keys [tags]}]] (contains? tags "database")) my-list) to produce a sequence of map entries with the tag database

Alex Miller (Clojure team)16:09:40

depending what you're going to do with the results, there might be other things that would be better

mocker18:09:44

@alexmiller: Thanks, I'll play around with that.

estsauver19:09:22

Hey, I’m using test.check to generate values for some tests. Is there a way to specify that I want a unique set of values over a test run?

tcrayford19:09:55

wait: you mean inside an individual generate, or over the whole set of like 100 or whatever runs?

tcrayford19:09:05

if inside an individual generate: use gen/fmap to uniquifiy it

estsauver19:09:42

Inside of an individual deftest.

estsauver19:09:05

I’m running tests inside of a transaction, but I occasionally am violating uniqueness constraints.

estsauver19:09:05

i.e., an error like

actual: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "emails_value_key"
  Detail: Key (value)=() already exists.
will pop up.

jeremy21:09:35

heyyyy pierre