This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-21
Channels
- # announcements (2)
- # aws (1)
- # beginners (172)
- # boot (3)
- # calva (19)
- # cider (18)
- # clj-kondo (5)
- # cljsrn (18)
- # clojure (47)
- # clojure-europe (9)
- # clojure-finland (7)
- # clojure-italy (3)
- # clojure-nl (15)
- # clojure-spec (20)
- # clojure-sweden (2)
- # clojure-uk (72)
- # clojurescript (45)
- # cursive (42)
- # datomic (6)
- # duct (4)
- # emacs (4)
- # expound (48)
- # figwheel-main (7)
- # fulcro (64)
- # graphql (8)
- # hoplon (9)
- # hyperfiddle (1)
- # jackdaw (8)
- # jobs (4)
- # jobs-discuss (61)
- # klipse (5)
- # leiningen (6)
- # off-topic (72)
- # pathom (2)
- # planck (11)
- # re-frame (1)
- # reagent (3)
- # reitit (16)
- # remote-jobs (17)
- # ring-swagger (3)
- # shadow-cljs (49)
- # spacemacs (12)
- # sql (3)
- # tools-deps (124)
- # vim (64)
- # xtdb (4)
does (spec.test/instrument)
(w/o args) instrument 1. all functions (ie vars) in all namespaces, mine, libs, and clojure? or 2. just the current one? thanks!
yeah I read that. So option 1 right?
https://github.com/clojure/spec.alpha/blob/0269b2cfefe4df7b68710decc94c623db4a6f630/src/main/clojure/clojure/spec/test/alpha.clj#L248
everything returned by instrumentable-syms
OK I guess I can run it to get the answer ,thx
As an example, clojure.java.jdbc
has all its s/fdef
s in a separate namespace so the library's functions would only be instrumented by (s/instrument)
if you have required the clojure.java.jdbc.specs
namespace.
thanks a lot, Sean!
This might be answered, but I watched Matthias Felleisen's talk about types: "Types are like the Weather, Type Systems are like Weathermen". And I remembered clojure.spec and noticed that it somehow reflects his ideas (putting contracts instead of making a type system for an untyped language, e.g. typed.clojure [which afaik is now discouraged/discontinued] and that type inference is near to impossible to implement in a untyped language like Clojure). So the question is ... is clojure.spec the answer to Felleisen's talk?
no, although spec was influenced by Racket's contracts, along with other stuff
spec had been in development for about 4 months at the time of that talk
"typed.clojure [which afaik is now discouraged/discontinued]" -- I thought Ambrose was still actively working on this...?
he just defended his dissertation on it
so it has been, but not sure where it's going from here. would be a good question for him
iirc, while I was away at Clojure/west when that talk was given, Rich wrote all the regex stuff in spec
thanks @alexmiller, although it didn't came directly from racket's contracts, I'm still glad that they're going almost on the same direction (no type inference, or implementing a type system [just to say we also can do type checking]).
well, it's not type checking, and the difference is important
type checking is about proving things early
spec is about verifying predicative constraints dynamically