This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-29
Channels
- # aws (6)
- # beginners (33)
- # bitcoin (2)
- # boot (22)
- # carry (2)
- # cider (5)
- # clara (21)
- # cljs-dev (115)
- # cljsrn (40)
- # clojure (161)
- # clojure-dev (73)
- # clojure-italy (38)
- # clojure-russia (88)
- # clojure-spec (123)
- # clojure-uk (58)
- # clojurescript (88)
- # core-async (26)
- # cursive (5)
- # datascript (18)
- # datomic (26)
- # hoplon (50)
- # java (2)
- # jobs (1)
- # leiningen (10)
- # lumo (1)
- # off-topic (18)
- # om (9)
- # onyx (26)
- # parinfer (13)
- # pedestal (41)
- # quil (1)
- # re-frame (27)
- # reagent (21)
- # ring-swagger (11)
- # slack-help (3)
- # spacemacs (8)
- # specter (5)
- # sql (42)
- # timbre (1)
- # uncomplicate (7)
- # untangled (3)
- # videos (1)
- # yada (26)
Why do the two specs (s/+ int?)
and (s/& (s/* int?) #(> (count %) 0))
behave differently when trying to conform an empty seq? The first fails (as expected) but the second conforms it to nil.
My confusion seems to stem from s/&
: (s/* int?)
and (s/& (s/* int?))
do not conform an empty seq in the same way
Yes, it looks like s/& completely ignores all further predicates for [] and returns nil anyways
(s/conform (s/& (s/* int?) #(= (count %) 0)) []) -> nil
(s/conform (s/& (s/* int?) #(= (count %) 1)) [1]) -> [1]
Just so this isn't hanging - this is a known bug with s/& not checking preds if an empty coll matches
Patch pending
so users logs in, server generates token, returns it and user uses that token for every next call
(into-array String [....])
on the vm level, varargs are represented by an array, and clojure doesn't abstract that like java does, so you need to create the array
Does anyone know of any recent ring-compatible http server benchmarks? I don't know whether to use jetty or immutant or aleph or what to get the most out of my server app.
I was leaning towards aleph, but my server isn't going to benefit from streaming data given how it works.
I promise that jetty hasn't caught up in the meantime
I'd decide whether you find aleph or immutant's features / abstractions more useful (and compare the relative recursive size of the deps) - they are close enough in performance that the difference between the two is very unlikely to be your performance bottleneck - especially in a system where your request handlers are written in clojure
I picked aleph because I find streams more interesting than interceptors for my design, but maybe you'd come to the opposite decision