This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-15
Channels
- # admin-announcements (3)
- # aws (1)
- # beginners (1)
- # boot (73)
- # cider (1)
- # clojure (146)
- # clojure-japan (4)
- # clojure-nl (3)
- # clojure-russia (90)
- # clojurescript (72)
- # community-development (17)
- # core-async (10)
- # cursive (60)
- # datomic (15)
- # devcards (7)
- # emacs (5)
- # events (5)
- # hoplon (3)
- # instaparse (3)
- # ldnclj (48)
- # leiningen (5)
- # off-topic (27)
- # om (120)
- # onyx (31)
- # re-frame (7)
- # reagent (7)
- # ring-swagger (17)
- # yada (3)
yeah, I've tried that
but I need the .m2 during build
@ericnormand: yeah the build server does the same thing.
Keeping the ‘building’ and ‘packaging’ step separate is a good idea imo, since the tools to do those things are different.
In fact, someone already has: https://github.com/sarnowski/lein-docker
@ericnormand: "but I need the .m2 during build" you mean your build server? which starts over with a clean .m2? We cache it there, so it's the same from build to build. But perhaps you mean a different thing?
Is it a bad idea to make my own Closeable-like protocol which is the same as Closeable but doesn’t return void
? I want to communicate to the caller whether the timeout has been exceeded. The alternative would be to throw a TimeoutException, though i’m not sure if that’s the Clojure’y way
I guess it is a pure design decision, where returning conveys that part of the protocol is to give back a result...imho now Closeable reads: "ok, I will perform the side effect of closing the resource, I will return nil"
but yours would read: "look, I am closing, but here is something back to you"
don't know if it's clear but for me it makes sense
sorry, i missed a not
it does not makes sense 😄
if Closeable is a purely side-effecting function
it should return nil
I think I’m being guided toward throwing an exception
@nberger: we're building the war in the docker build
. We're starting with a lein
docker image to guarantee we have clojure
note, this is only "my honest opinion" , it'd be great to listen to others 😄
@nberger, @lfn3: it's actually quite annoying because any time we do a docker build after changing the project.clj, it has to fetch all dependencies again
hence me trying to fix it somehow
@ericnormand: so is there any reason you don’t want to do the build outside the container?
@ericnormand: Perhaps you could COPY the m2 repository before COPYing project.clj... but that might bring you some new problems, not sure...
@lfn3: i guess the reason is so you can do docker build
, use docker-compose
etc to build your containers
@nberger: that might work, but we don't have an .m2 dir yet. it's all in the building containers
@ericnormand: well you’d just be using lein uberjar && docker build .
I mean up to you, but personally I really wouldn’t want to be deploying lein along with my app if I can avoid it.
yeah, I see what you mean
we have a weird deployment
Hi, I have a skeleton app with a postgres db but everytime I try to do the connection it is being refused im doing a docker
docker-compose
build is there a specific db url I must use?
I am current using this one jdbc:
@ericnormand: Every deployment is a unique and beautiful snowflake. Why else would we build so many complicated tools to handle them?
I know
it's kind of crazy
we should just use the war!
it's already packaged up
we do have a crazy deploy
unfortunately I was very new to Docker when we started and didn't understand what was happening
we spent a lot of time trying to get things to work properly using just the Dockerfile (no env vars for instance).
do you start with a java image?
@roberto: I don't know of anything myself, but I'm sure there's something out there
I just googled around a little
been looking around, but all the docs I’ve found make a lot of assumptions about what I know
what do you know? what's your level?
thanks
i have to dig into a lot of the source code for the libraries out there everytime I want to use one
ok, cool
I dig a lot, too
have you read this? http://stackoverflow.com/questions/29070883/how-to-use-stuart-sierras-component-library-in-clojure
@ericnormand: yeah so we just use the java8 image from docker hub
ok, interesting
I may be advocating for that the next time we tweak our deployment
it would save a ton of time
Yeah go for it. Tell them some random dude who looks like a doge on the internet told you to do it 😏
what sort of Session stores are people using for Ring? I don't want them in memory, since that forces logouts on people during redeploys.
@ul: with this middleware? https://github.com/paraseba/rrss
yeah rrss requires a background process to clean up expired sessions, carmine is smarter with this
Actually I think rrss might be more lightweight in memory given how redis performs the ttl on normal keys, but more risky with the background process thing if you have a ton of opened session, and a tiny bit slower with expiration time updates. small tradeoffs, but I still prefers carmine's
@mo-love everything, really I've got several static websites built with clojure, three clojure web apps running in production, two of them for paying clients, as well as writing tools and stuff for myself - on top of creating a few web games with it.
@magnars cool. I am using it for natural language processing and generation. Lotsa fun.
Are there any clojure libraries that are easy to use from Java w/o having to get a Var and invoke it? I'd like to study how people are doing it.
It's a Clojure-flavored screencast http://www.parens-of-the-dead.com/
@ska getting a Var an invoking it is probably the best way to use Clojure from Java. The other way is to use gen-class / AOT compilation but IMHO that is more complicated and more difficult to maontain
@ska typically you'd wrap the "get a var and invoke it" in some java stuff I think.
@tcrayford: that is actually what I am looking for. I'd like to find a lib doing just that so that I can have a look at the rough structure and how to build it in the end.
@ska the other other way to do it is to create a Java interface and implement it on the Clojure side - in some ways this provides the highest quality Java API (java doc, types, etc)
@alexmiller: I am aware of that way, too. But thanks for pointing out . Still the question remains: are there any libraries where I could study how others have done it before?
@ska I can't think of a good example to point to, I've mostly done it in closed-source projects
Storm was a Clojure project with a Java API, not sure if it still is
prob a pretty complicated example
@ska does it count if I call a java function from clojure with a deftype that implements a java interface
@ska here is a video of rich hickey giving a lightning talk on building shims to call clojure from java: https://skillsmatter.com/skillscasts/3864-impromptu-rich-hickey-lightning-talk
user=> (subvec [1 2 3 4 5 6] 3 5)
[4 5]
user=> (subvec (apply vector (range 100)) 3 50)
[3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49]
hello
anyone familiar with leiningen and repo mirrors?
I'm trying to get mirrors to work with plugin-repositories
@ericnormand: you mean like s3-wagon?
I mean I'm using :plugins [[lein-immutant "2.0.1"]]
and it's downloading it and all of its dependencies from clojars and maven central
but all of the other dependencies are being downloaded from my mirror
:mirrors
{#"clojars" {:name "Artifactory Clojars", :url ""},
#"central" {:name "Artifactory Central", :url ""}}
a wrinkle
if I move the :mirrors
into the project, it works!
i had it in the profiles before
well, that's less than ideal but I can live with it
well, debugging's been done
I've been trying to get this working for a few hours now
eehm, I have a weird problem. I’m on a OS X El Capitan hackintosh, just did a fresh install with brew install boot-clj
Exception in thread "main" org.sonatype.aether.resolution.DependencyResolutionException: Failed to collect dependencies for [#<Dependency org.clojure:clojure:jar:1.7.0 (compile)> #<Dependency boot:boot:jar:RELEASE (compile)>]
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:371)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
….
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
at org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:270)
at org.apache.http.impl.AbstractHttpClientConnection.flush(AbstractHttpClientConnection.java:275)
at org.apache.http.impl.conn.AbstractClientConnAdapter.flush(AbstractClientConnAdapter.java:197)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:258)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:645)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:674)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:793)
... 8 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
... 24 more
looks like it was a poorly timed maven central issue