This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-26
Channels
- # admin-announcements (1)
- # alda (44)
- # aws-lambda (6)
- # beginners (8)
- # boot (187)
- # capetown (5)
- # cider (25)
- # cljs-dev (24)
- # cljsrn (93)
- # clojure (45)
- # clojure-austin (9)
- # clojure-canada (2)
- # clojure-greece (1)
- # clojure-mexico (3)
- # clojure-poland (3)
- # clojure-russia (1)
- # clojure-spec (12)
- # clojure-uk (13)
- # clojurescript (86)
- # cursive (9)
- # datascript (3)
- # datomic (32)
- # defnpodcast (4)
- # devcards (23)
- # editors (3)
- # emacs (5)
- # hoplon (27)
- # immutant (3)
- # lein-figwheel (9)
- # leiningen (4)
- # luminus (10)
- # om (32)
- # onyx (2)
- # other-languages (1)
- # perun (1)
- # protorepl (8)
- # re-frame (13)
- # reagent (2)
- # remote-jobs (2)
- # ring (3)
- # spacemacs (4)
- # spirituality-ethics (3)
- # test-check (16)
- # untangled (65)
- # yada (50)
Anyone have experience using clojure.spec to spec out macros for use in clojurescript?
I get odd errors relating to clojure.spec not being found when I run clojure 1.9.
Might just be my setup.
I have been trying to use clojure.spec to coerce edn (config) files. EDN prevents autonamespacing keywords ( I get that now, thanks alexmiller ), but allow custom #readers. Clojure (well read-string
and load-file
) allow autonamespacing but prevent custom readers. So it seems that my only option is to explicitly have the keyword namespace every time in my configuration file, is that correct ? I am asking because I find it a bit cumbersome/repetitive to have to have these in my file.
Yes, you'll need full namespaces in edn config files
You could also write specs on unqualified keys with req-un and opt-un
That's in s/keys
Either the normal core reader fns or clojure.edn reader fns should be able to read tagged literals though with #
You just need to bind around the call to set up the readers