Fork me on GitHub
#clojure
<
2016-09-04
>
turbopape01:09:23

oh man … no clojars no repl !

turbopape01:09:03

any means to force repl with local cached deps ?

jjcomer01:09:36

lein -o repl

jjcomer01:09:44

Will put lein in offline mode

spacepluk06:09:53

any idea why this is taking a few seconds before exiting? https://gist.github.com/spacepluk/f20fc43fb702cf25d654e2fd0d86e058

spacepluk07:09:46

@hans thanks! I learned something new 🙂

andrewtropin10:09:14

hey guys, can you point me, where am I wrong.

(ns test-ns
 (:require [clojure.spec :as s]
           [clojure.spec.test :as stest]]))


(defn test-func [a]
  (str a))

(s/def ::int-ret integer?)

(s/fdef test-func
        :args (s/cat :a string?)
        :ret ::int-ret)

(stest/instrument `test-func)

(test-func "test")
why this code doesn't throw an exception?

nooga11:09:42

I’m trying to do something like (map vector col (rest col)) in a transucer, it this even possible or do I have to do this before?

Alex Miller (Clojure team)12:09:49

@andrewtropin: the :ret spec is only checked when using stest/check

andrewtropin12:09:30

@alexmiller Not very obvious behavior, but thanks a lot for explanation.

quoll12:09:24

@nooga I don't think it can be built with map (but I just woke up and don't have access to a repl, so what do I know?), but I think it'd be straight forward to copy the map source to a new function (or, at least the first 2 aritites), and modify the source for the [f coll] arity

nooga12:09:27

@quoll yeah, I just got basically the same idea

lvh20:09:38

In 1.9-alpha11, #:clojure.spec{:failure :no-fn} evals to the un-ns’d keywords — that’s not what I was expecting (and not what I’m seeing out of reports from test failures)

gfredericks21:09:16

(keys #:clojure.spec{:failure :no-fn}) => (:clojure.spec/failure)

hlolli21:09:06

What function takes a shuffled vector and makes its numbers linear. [9 10 2 5 1] => [1 2 5 9 10] ?

hlolli21:09:12

How about sort-by sort so [[2 1 4 3] ["b" "a" "d" "c"]] => [[1 2 3 4] ["a" "b" "c" "d"]] ? nvm, works like this: (sort-by first [[2 "b"] [1 "a"] [4 "d"] [3 "c"]]) => ([1 "a"] [2 "b"] [3 "c"] [4 "d"])

didibus23:09:17

How do you make the Clojure regex use the UNICODE_CHARACTER_CLASS