This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-09
Channels
- # aleph (4)
- # beginners (31)
- # boot (33)
- # cider (7)
- # cljs-dev (263)
- # cljsrn (1)
- # clojure (33)
- # clojure-austin (2)
- # clojure-dev (1)
- # clojure-russia (6)
- # clojure-spec (19)
- # clojure-uk (7)
- # clojurescript (79)
- # cursive (21)
- # datascript (1)
- # datomic (13)
- # dirac (12)
- # emacs (15)
- # hoplon (26)
- # lein-figwheel (3)
- # leiningen (1)
- # luminus (5)
- # lumo (20)
- # mount (1)
- # off-topic (17)
- # om (13)
- # onyx (24)
- # parinfer (70)
- # pedestal (2)
- # re-frame (19)
- # reagent (1)
- # ring-swagger (3)
- # unrepl (8)
- # untangled (58)
- # yada (2)
have you looked at htmlunit? it might be slightly easier to stomach than going full selenium
I don't know, but clj-http unit has an option to automatically follow redirects or not, and I wonder if turning it off and handling redirects manually might unbreak the cookie stuff
I haven’t, but that’s a good suggestion. clj-http with disabled redirects doesn’t fix the problem, unfortunately.
I wonder what even happens when you have repeat header values — the response headers look like they’re just str/str maps
the header map in clj-http is actually a special map type for dealing with header name case insensitivity
I'm trying to write a csv file, but the data is truncated when I look at the output file. If I print out the vector that I pass into write-csv I see all of the results, but only part of them make it to the file.
I've also tried doubling the data (into data data)
and that prints the rest of the result as well as some additional lines when it starts gets to the beginning of the original dataset again.
Ha! I should write in here more often, it gave me an idea to use `(with-open [writer (io/writer output-file-name)] (csv/write-csv writer data))` and it worked!
i'm specifying an enviornment var in my project.clj in the :profiles :dev :env map. but when I try to run lein with-profile dev repl, that env variable is not there when using environ.core to load it. is there a piece to this process I'm missing?
@hiredman Sorry; yeah — I meant “I’m not sure how this would deal with a header value set twice”, which explains why I only see parts of the set cookies 🙂
i've seen many recommendations to use clojure.spec.alpha, but doesn't that require clojure 1.9? is the alpha stable enough for production or something?
I'm trying to create a java object & getting no matching ctor. Is it possible to show the available ctors somehow?
e.g. (sorry for the awkard code, wrote it on the repl)
user=> (-> (cr/type-reflect String) :members (->> (filter (comp #{'java.lang.String} :name)) (filter (comp #(contains? % :public) :flags)) (map :parameter-types)))
([byte<>] [java.lang.StringBuilder] [int<> int int] [byte<> int int java.nio.charset.Charset] [byte<> java.lang.String] [] [byte<> int] [java.lang.StringBuffer] [byte<> int int java.lang.String] [char<> int int] [char<>] [byte<> int int int] [java.lang.String] [byte<> java.nio.charset.Charset] [byte<> int int])
@dominicm in java land that's usually a sign that you're supposed to use a factory method, builder class, or some other way of getting instances of the object
I see :thinking_face: https://github.com/centic9/jgit-cookbook/blob/master/src/main/java/org/dstadler/jgit/api/GetRevCommitFromObjectId.java so I need to walk the git repo history instead. That sucks.
// You can also get the commit for an (abbreviated) SHA
walk.reset();
ObjectId id = repository.resolve("38d51408bd");
That made me reconsider, I can get the sha from objectid, but it was in a higher class... sigh. I hate java.
yeah... this is a pretty good example of "god dammit there's a whole magical DSL around traversing the commits in a repo" rather than the repository just being represented by regular data structures
iirc a git repo is DAG of immutable nodes, so would be perfectly representable as a persistent data structure
is there a way to have multiple handlers in bidi? i want to use ->ResourcesMaybe
with a fallback route... something like [["/" (->ResourcesMaybe ...)] ["/" index-handler]]
the comment on https://github.com/juxt/bidi/blob/master/src/bidi/ring.cljc#L110 seems to indicate it would work that way
the problem is ResourcesMaybe is a handler, not a route, you could make a custom implementation of whatever bidi calls its routing protocol (I forget, maybe Pattern), that succeeds or fails based on the existence of a resource