#clojure logs

2016-05-12

08:53LewixIs the only difference between map & mapv that the latter returns a vector instead of a list?
08:53Lewix,(doc mapv)
08:53clojurebot"([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & ...]); Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments."
08:53Lewix,(doc map)
08:53clojurebot"([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & ...]); Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments. Returns a transducer when no coll...
08:53justin_smithLewix: the source is more useful here
08:54ridcully_,(source mapv)
08:54clojurebotSource not found\n
08:54dysfunno, because mapv doesn't have a transducer form
08:54Lewixmap returns a lazy sequence - I didn't know that
08:54justin_smithLewix: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6618
08:54Lewixjustin_smith: thanks
08:54justin_smithLewix: the laziness of map is a very common source of errors
08:55justin_smith(well, people not expecting it to be lazy...)
23:11devthweird: i'm starting a jetty server in my -main. if i try to hit it in my browser, the browser just spins. no 404, 500, nor 200. hangs indefinitely. when i hit ctrl-c in lein, the page suddenly returns. then i hit ctrl-c again and lein exits. clues?
23:44tolstoyYou're hitting a route that just holds on to the connection, never returning? Like, say, are you returning an inputstream you never put anything in to?
23:48tolstoydevth: ^
23:49devthin this case i was just hitting a static route. i played with curl and realized it was only if i included `--compressed` in the request. so I disabled wrap-gzip and now it's fine.
23:49devthwhen i included --compressed, curl with get the expected body immediately, but the connection would stay open and never return
23:50devthoops, static resource i mean. /js/public.js
23:50tolstoyHuh. I've never used the compress stuff. I was just wondering today how all that worked. ;)
23:51devthnow i need to figure out why it *didn't* work -.-
23:54tolstoyLooking at this old post: perhaps just use the gzip filter built in to jetty itself?
23:58tolstoyEasier said that discoverable. :configurator (fn [s] (.setAttribute s "gzip" true))?