This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-17
Channels
- # admin-announcements (3)
- # announcements (1)
- # aws (3)
- # beginners (41)
- # boot (109)
- # braid-chat (2)
- # braveandtrue (5)
- # cider (11)
- # cljs-dev (38)
- # cljsjs (15)
- # cljsrn (5)
- # clojure (87)
- # clojure-berlin (16)
- # clojure-ireland (1)
- # clojure-japan (10)
- # clojure-madison (3)
- # clojure-nl (3)
- # clojure-poland (6)
- # clojure-russia (115)
- # clojure-sg (1)
- # clojurebridge (35)
- # clojured (8)
- # clojurescript (36)
- # core-async (24)
- # cursive (18)
- # datavis (1)
- # datomic (27)
- # dirac (22)
- # editors (1)
- # emacs (3)
- # events (19)
- # hoplon (149)
- # ldnclj (7)
- # lein-figwheel (1)
- # luminus (1)
- # off-topic (70)
- # om (196)
- # onyx (63)
- # parinfer (155)
- # proton (36)
- # re-frame (69)
- # reagent (2)
- # ring (2)
- # ring-swagger (1)
- # slack-help (4)
- # spacemacs (9)
- # testing (11)
In reference to this potential bug: https://github.com/weavejester/medley/issues/13#issuecomment-184967348 ... what operations on a collection are supposed to maintain the metadata, and which are not?
hi guys how do I get the value from a key with namespace attached to it. For example :interior.category/floorings
I want to get floorings
(name it)
http://clojuredocs.org/clojure.core/name http://clojuredocs.org/clojure.core/namespace
thanks @robert-stuttaford , didn't know that name would strip out the ns part in keyword too.
I can’t get compojure-api to read the request body. The body remains nil. I have `(POST "/" [] :return SignUp :body [data (describe SignUp "The sign up data")] :summary "Saves sign up data" (ok data))`
@slotkenov: How are you sending the request? What type is your request body?
what’s the content type of the request?
yeah that should work...
@slotkenov: Are you using 1.0.0-RC? Have you checked the route is working correctly (println or something)?
I get a 400 back indeed. Chrome dev tools, however, tells me I’m sending a nice JSON body
@slotkenov: tested with the sample app lein new compojure-api signup
, updated to 1.0.0-RC2
& changed the line 33 to :body [pizza (describe Pizza "pizza”)]
. Seems to be the same case and works as expected when tested from the swagger-ui.
could there be multiple json-middlewares mounted? the api
function wraps ring-middleware-format
already.
I had the same problem when I tried to bolt on compojure-api onto and app with already defined middleware
(defn wrap-middleware [handler] (-> handler (wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false)) wrap-json-response wrap-json-params wrap-exceptions wrap-reload))
great. I would be nice if we could figure out the double-wrapping somehow in ring-middleware-format.
People, we need a prisamtic schema cheat sheet!
@edlich: the clarango guy? 👋
(sorry, one of them)
Indeed. I’m a contributor to Clarango as well.
I want to start a lein repl that will use selenium to do some tests, but need to use xvfb in the server.
huh? xvfb has very little to do with lein
I assume you have an xterm or something running in xvfb, and that has lein running in it
what does the terminal say in that case?
you're missing a -run
it would help to see the output
that's all? but xclock works?
try it with -e /path/to/errorlog
and check the exit status (compare it to http://manpages.ubuntu.com/manpages/wily/en/man1/xvfb-run.1.html)
I wonder if it's because lein is a script
or not in the path
@roberto: try -a to xvfb-run to have it pick the X display automaticaly
what is the value of $GEOMETRY?
x600 is weird
the second one
Any idea why my ring app will not serve png’s? getting 404??
@echristopherson: X11 has finally got the support for 3D-displays, apparently.
Hey all, can anyone point me in the right direction of how to attach a custom ring handler to my figwheel setup for a re-frame app? Details here-> https://github.com/bhauman/lein-figwheel/issues/344
Not sure if I'm doing this the best way or not, but I'm pulling in data from SQL using clojure.java.jdbc, and when I try to divide the numbers from the SQL data pull I get the error message
CompilerException java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
I'm just converting the values to double
before dividing them now, is that the best way of dealing with this or am I missing something?@shaun-mahood can we see the code?
@val_waeselynck: Putting in the values, it ends up being essentially (/ 1234M 12345678M)
, which gives me the error, and (/ (double 1234M) (double 12345678M))
to get it to give me back the decimal I'm looking for
hey @shaun-mahood : use with-precision, e.g. (with-precision 10 (/ 1234M 123456789M))
What is meant by the "signature" of a clojure function? I've seen this term thrown around some, and it seems to be used to reference the structure/type of the input arguments of a function (excluding the functions return value). Is this correct?