2016-05-12
| 08:53 | Lewix | Is the only difference between map & mapv that the latter returns a vector instead of a list? |
| 08:53 | Lewix | ,(doc mapv) |
| 08:53 | clojurebot | "([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:53 | Lewix | ,(doc map) |
| 08:53 | clojurebot | "([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:53 | justin_smith | Lewix: the source is more useful here |
| 08:54 | ridcully_ | ,(source mapv) |
| 08:54 | clojurebot | Source not found\n |
| 08:54 | dysfun | no, because mapv doesn't have a transducer form |
| 08:54 | Lewix | map returns a lazy sequence - I didn't know that |
| 08:54 | justin_smith | Lewix: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6618 |
| 08:54 | Lewix | justin_smith: thanks |
| 08:54 | justin_smith | Lewix: the laziness of map is a very common source of errors |
| 08:55 | justin_smith | (well, people not expecting it to be lazy...) |
| 23:11 | devth | weird: 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:44 | tolstoy | You'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:48 | tolstoy | devth: ^ |
| 23:49 | devth | in 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:49 | devth | when i included --compressed, curl with get the expected body immediately, but the connection would stay open and never return |
| 23:50 | devth | oops, static resource i mean. /js/public.js |
| 23:50 | tolstoy | Huh. I've never used the compress stuff. I was just wondering today how all that worked. ;) |
| 23:51 | devth | now i need to figure out why it *didn't* work -.- |
| 23:54 | tolstoy | Looking at this old post: perhaps just use the gzip filter built in to jetty itself? |
| 23:58 | tolstoy | Easier said that discoverable. :configurator (fn [s] (.setAttribute s "gzip" true))? |