This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-16
Channels
- # beginners (81)
- # calva (6)
- # cider (21)
- # clj-kondo (2)
- # clojure (62)
- # clojure-austin (3)
- # clojure-europe (3)
- # clojure-italy (20)
- # clojure-nl (39)
- # clojure-russia (4)
- # clojure-spec (19)
- # clojure-uk (23)
- # clojurescript (76)
- # cursive (6)
- # data-science (9)
- # datomic (12)
- # defnpodcast (1)
- # figwheel-main (3)
- # fulcro (8)
- # jackdaw (5)
- # jobs (1)
- # jobs-discuss (18)
- # joker (1)
- # leiningen (2)
- # liberator (2)
- # off-topic (148)
- # onyx (5)
- # pedestal (39)
- # planck (7)
- # re-frame (5)
- # reagent (3)
- # reitit (37)
- # shadow-cljs (165)
- # tools-deps (1)
- # yada (19)
can macro spec checking (for core macros) be disabled from the REPL instead of with a Java property?
not currently. such a thing could be done by just setting the clojure.lang.RT/CHECK_SPECS flag, but that's not public currently
Is there any reason why the clojure.spec.skip-macros
isn't re-loaded dynamically in Compiler every time it's needed? Performance?
you could remove those specs from the registry
s/def with nil will remove
I tried (clojure.spec.alpha/def clojure.core/for nil)
already, but that didn’t do it
I was testing if for
supported beginning with a let
but it doesn’t 🙂
(for [:let [x 1] y (range x)] y)
I dunno if nit picking on spec-alpha2 is useful feedback yet, but https://github.com/clojure/spec-alpha2/blob/master/src/main/clojure/clojure/spec_alpha2.clj#L51-L54 is checking if an object implements the interface behind the Schema protocol instead of checking for satisfying the Schema protocol (the namespace imports the interface behind the Spec and the Schema protocols, but is careful to use the Spec protocol everywhere and not the interface)
Yeah, that’s actually intentional for perf, same in spec 1
Well same for spec?
May change
ah, I see, I missed the use of the interface there. and it looks like spec? will return true if you implement the interface, or if you have metadata with the conform* function(satisfy the protocol via metadata), but will return false if you extend the protocol to some type, which seems idiosyncratic
In any case, I’m aware :)