This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-27
Channels
- # aleph (2)
- # beginners (19)
- # boot (15)
- # cider (1)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (12)
- # clojure-dev (2)
- # clojure-france (6)
- # clojure-italy (46)
- # clojure-russia (45)
- # clojure-spec (55)
- # clojure-uk (41)
- # clojurescript (117)
- # component (15)
- # cursive (54)
- # datomic (24)
- # events (2)
- # funcool (1)
- # instaparse (4)
- # klipse (30)
- # lein-figwheel (3)
- # leiningen (4)
- # luminus (4)
- # om (10)
- # onyx (13)
- # parinfer (36)
- # proton (1)
- # reagent (1)
- # ring (2)
- # ring-swagger (1)
- # rum (19)
- # test-check (6)
- # testing (9)
- # untangled (1)
TIL : in emacs,`cider-mode` preface any sexp
with #light
, and track all the variable's values as they flow throug that form.
or turn on enlighten-mode
permanently
(when evaluating directly, with, eg, C-c
)
I was trying to integrate my cljs-project with quickbooks api. should any one done please give me a suggestions?
@sasha you won’t see the name of the thread in ps
or htop
, in those you’ll always see the command you used to run the app, if you wan’t to know the name of your current thread you’ll need to call Thread.currentThread().getName()
or (.getName (Thread/currentThread))
in your code (no sure about the Clojure version, as I’m still a Clojure beginner)
and anyway, htop
and ps
will show you the system process which is running multiple threads (so if you see only one process, it doesn’t mean that you’re running only one thread)
is there a nice way to get to the map-> constructor of a record from a class value -> ex: (foo some.ns.Foo) -> some.ns.map->Foo, ideally going from symbol to ns then resolving the (str "map->" symbol-repr) for that ns for instance
I could get dirty and parse the symbol repr, but I was wondering if there's some other way
How can I get the raw request in a compojure-api?
@sveri I’m already getting the session, how do I merge that with the session:
(compojure.api.sweet/POST "/register" {session :session} :body [registration-form s/Any]
@pupeno it looks like you are using the sweet library, which I never used myself, so I cannot help here, sorry.
With ring.mock.request, when doing a post request, how do I specify body params instead of form ones?
ikitommi thanks 🙂
Can one trust =
to return false if there are any differences between 2 very large(&deeply nested) structures? Are there gotchas one should be aware of?
(I had looked at clojure.data/diff but that is overkill for my needs)
@shooodooken yes you can trust it
Gotchas are around around java objects and reference types (atoms, refs, agents).
But you should avoid putting reference objects in clojure data structures anyway.
thanks
hello guys, newbie question pending ^^: I have a map where each element holds informations in order to make http requests. Right now, I use map function to retrieve these info and make the request by forcing it with a dorun
I bet I am doing things wrong, any feedbacks please ?
(doall (map f coll))
🙂
@baptiste-from-paris use doseq or run!
@robert-stuttaford I though doall
was less performant than dorun
by keepingelements in memory ?
@mpenet doseq
VS dorun
/`doall` ?
do you want the results of the http requests? doall. not? dorun
neither? do-a-little-dance!
@robert-stuttaford I don’t care about the result but it has to be run sync
@mpenet why that ?
doall will cause the seq to reside in memory entirely over time (retains the head etc)
doseq will basically iterate over the seq contents, it can be over a huge seq, no problem
and doseq
VS dorun
?
thx guys ! I was pretty close from the better way
on the contrary, if I don’t care about the order and I want to make requests async, would you use future
or a go
block ?
the fancy way: a go block, using async/thread with a loop with alts! that listens to incoming responses, or the naive way: (->> (mapv #(future ...) coll) (mapv deref))
https://stuartsierra.com/2015/08/25/clojure-donts-lazy-effects seems relevant to the discussion, at some point transducers were mentioned.
Anybody on here work at heroku who can help me? https://help.heroku.com/tickets/416968
I am trying to deploy our app and the deployments just aren’t working
they don’t even start the logs. They just load and load
With compojure-api is there a way to disable the swagger page being available? Say based on environment
(defmacro foo []
(let [v (with-meta (gensym) {:tag 'java.lang.String})]
`(fn [~v] (.charAt ~v 2))))
Is it possible for hugsql to convert from snake case to kebab case automatically?
@pupeno this might help http://www.luminusweb.net/docs/database.md#massaging_key_names_from_sql_to_clojure_style
And if you're using postgres and a little adventurous, this lib does it by default. https://github.com/mikeball/foundation
Hi hivemind, where to find a definition of Generative Testing or related topics like property-based testing?
@mikeb ha! thanks.
too me, generative testing is testing with (randomly usually) generated data instead of testing using particular examples pieces of data
and too me, property based testing is looking for universal invariants(or properties) I can assert about the relationship between inputs and outputs of a test, instead of asserting particular things that are true under some conditions.
https://www.youtube.com/watch?v=H18vxq-VsCk (John Hughes - The Mysteries of Dropbox) is a great quickcheck video