This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-20
Channels
- # admin-announcements (5)
- # alda (1)
- # aws-lambda (1)
- # beginners (74)
- # boot (62)
- # cider (29)
- # cljs-dev (36)
- # cljsjs (15)
- # cljsrn (34)
- # clojure (58)
- # clojure-android (3)
- # clojure-austin (15)
- # clojure-austria (11)
- # clojure-dusseldorf (25)
- # clojure-germany (6)
- # clojure-greece (26)
- # clojure-quebec (8)
- # clojure-russia (50)
- # clojure-spec (12)
- # clojure-uk (8)
- # clojurescript (46)
- # core-async (11)
- # cursive (22)
- # datomic (2)
- # devcards (27)
- # dirac (5)
- # hoplon (109)
- # jobs (1)
- # kekkonen (2)
- # lein-figwheel (12)
- # leiningen (2)
- # microservices (1)
- # off-topic (3)
- # om (70)
- # onyx (17)
- # planck (21)
- # re-frame (3)
- # reagent (2)
- # rum (1)
- # spacemacs (12)
- # spirituality-ethics (9)
- # untangled (44)
- # vim (2)
- # yada (8)
@leifp the Clojure repl in clojure.main/repl
is highly customizable (perhaps too customizable even :)
Thanks, @alexmiller, I'll take a look there, too. The number of dependencies is certainly optimal š
What is the recommended way to define a route for serving a directory of static assets in Compojure API? There is a short example at https://github.com/metosin/compojure-api/wiki/Migration-Guide-to-1.0.0#seeing-extra-warnings, but it excludes a classic Compojure route from the swagger docs. I see no reason to make an exception of the static files, amirite?
I mean, it would be nice to be able to fetch a JS file when playing with the swagger UI, and that would also be a good place for me to suggest caching strategies for static assets
Also, I assume that resources
handler in that example is compojure.route/resources
, not something in compojure-api, correct?
ack, sorry, I should have posted in ring-swagger room. I'll refrain from cross posting.
Since I want to document the JS client, it makes sense to create a regular compojure-api route, in a "/public" context. No need for route/resources
, yet.
@danplz A compojure-api route is just that, a route, so you can compose it with anything else you like.
(defn space-grid [m n] (map #({:space [(quot % m) (mod % n)]}) (range (* m n)))) (defn space-grid [m n] (map (fn [i] {:space [(quot i m) (mod i n)]}) (range (* m n))))
@bcbradley: #({...})
is not the same as (fn [i] {...})
. In the first form, the map is actually evaluated as a function, because it is in the function position (<here>). in the second version, it is not and thus just returned.
@bcbradley: you could use #(hash-map :space [(quot % m) (mod % n)])
to replace the first form with something equivalent to the second
@bcbradley: maybe it helps to understand if you know that both #(...)
and {...}
are special reader syntax. if you use both in a nested form, they both do their thing. parentheses are not just a grouping device in lisps, but they're very significant.
Hey guys, what are you using to work with micro-services, something like spring boot or dropwizard ?
@mbrum: Iām using both.. I have them in production
guys, Iām trying to join this wonderful clojure world (Iāve started dirtying my hands last saturday)ā¦ and itās pretty awesomeā¦ Iāve started from Brave Clojure and Aphyr - Clojure From ground upā¦ But actually Iām not liking it anymoreā¦ because I donāt feel the examples are going to fit the real world, I would like something more enterpriseā¦ whole scenarios, not only algorithmsā¦ structure full projects, manage db access with connection pool, jdbc, serve and process json, etcā¦ do you suggest me any good content that I can find all of it?
@leo.ribeiro: check out Luminus
@leo.ribeiro: also read Clojure Applied
@borkdude: thank you very much my friend!
I will give it a shot of course! š
@borkdude: is it the clojure applied from ben vandgrift and alex miller?
@leo.ribeiro: correct
@leo.ribeiro: Also check out http://www.clojure-toolbox.com
can I make the generated defrecord
constructors private somehow?
(without using alter-meta!
)
edn question: I'm using edn/read-string to turn fields in a CSV into Clojure values. This is working great for everything except strings, as strings are not quoted in the CSV. Is there a straightforward way to have read-string interpret them as strings, not symbols?
Currently fixing it with a post-processing step, but was wondering if there was a way to tweak the reader.
@dm3: curious, why do you need to test if something is a list? Can you test whether it's a sequence with seq?
, and then convert it into a list?
Heisenbug alert: Have you experienced something similar? We're using friend as auth lib and are currently experiencing a strange bug in our test env. When calling
(friend/current-authentication request)
we're getting a "stale" user even though the request contains the correct data. (For those who haven't used friend, it's basically a lookup in the request map (-> request :session :cemerick.friend/identity :authentications (get ""))
. By stale I mean it returns a previously logged in user. The issue is extremely strange, since it boils down to a simple nested map lookup returning a "stale" value. We've tried in-lining the current-authentication function into the calling ns, and that seems to work. We're starting to run out of ideas, so if you have any ideas I would be really grateful for any input!do i have to go check the websites and see? or is there an easy way to see or update the version number?
@pvinis: you could try the #C053K90BR channel
quick question. Any idea how I can make a CSSĀ selector input[type=text]
using garden?
(garden.core/css [:input [(attr= :type "text") {}]])
gives me āinput [type=\"text\"] {\n\n}ā
(notice the extra space between input
and the attribute selector).
(garden.core/css [:input (attr= :type "text") {}])
gives me "input, [type=\"text\"] {\n\n}ā
.
thanks @meowy for the example! Added a wiki-page to describe the two options & the caveat, https://github.com/metosin/compojure-api/wiki/Serving-static-resources, ping @danplz
Quick question... if I'm writing a Clojure cli utility and want to use unix pipes to get data into the utility i.e. echo "abcdef" | java -jar my-utility.jar
the data should come in on *in*
, correct?
@dm3 something broader is sequential? but depends what you're doing
There is with-in-str @mystickphoenix
If it's helpful
@alexmiller: Thanks, I was working on code that's expecting either a filename or data streaming in on stdin and was fighting with *in*
for a while until I realized that my conditional statement wasn't working correctly š
Hello, anyone knows a library to ajax-somthing from clojure, not clojurescript to use with https? IĀ“ve tried cljs-ajax but it didnĀ“t work.
@fabrao: Iām not sure I know what you mean about āajax-something from clojureā, but have you tried clj-http
do you just mean an http call?
then use clj-http
and if you need it to be async you can use core.async