This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-18
Channels
- # admin-announcements (1)
- # beginners (4)
- # boot (18)
- # cider (4)
- # cljsrn (17)
- # clojure (77)
- # clojure-austin (6)
- # clojure-greece (6)
- # clojure-spec (81)
- # clojure-uk (6)
- # clojurescript (32)
- # code-art (2)
- # core-async (12)
- # cursive (1)
- # datomic (1)
- # emacs (15)
- # funcool (1)
- # hoplon (108)
- # om (9)
- # onyx (83)
- # planck (1)
- # re-frame (3)
- # reagent (4)
- # specter (6)
- # spirituality-ethics (4)
- # yada (9)
Can I emote about how awesome Spec is? Using comformer to coerce incoming JSON is really straightforward.
I’m sure there’s problems with the above, but I haven’t been able to do this effectively before, so I’m pretty stoked!! Just wanted to share my excitement. 🙂
Can we use specter in clojurescript? I keep getting select not found. It works fine in clojure, am on clojurescript 1.8.x
I have used the includes for macros also
@rnandan273: yes, specter works in clojurescript
are you using something like this in your ns definition?
(:require-macros [com.rpl.specter.macros :refer [select transform]])
What cljs devtools are people using? https://github.com/binaryage/cljs-devtools or https://github.com/binaryage/dirac or something else?
@curlyfry also Dirac is kind of popular if you want a Repl inside Chrome
@dnolen @richiardiandrea Thanks guys!
I also forgot to mention my choice, which is boot Repl with boot-reload. Figwheel has very nice error messages now and it is the best choice for starters imho but the others will catch up soon I guess :)
@nathanmarz: Thanks a ton for your help, i was making the mistake of using it as (:require [com.rpl.specter.macros :refer [select transform]]).
@nathanmarz: I was contemplating using datascript but specter should suffice my requirements. I am writing an app to supprt offline / online mode using browser localstorage and specter will help me to query and update the localstorage via the app-db
@curlyfry: in case of cljs-devtools and Dirac they are not mutually exclusive, Dirac assumes cljs-devtools usage and should be more advanced step in your tooling setup. My recommendation: start with Figwheel , then add cljs-devtools, and possibly add Dirac after you get familiar with your basic setup.
@rnandan273: cool, feel free to come to the #C0FVDQLQ5 channel if you need any help
looking to define a spec for the keys of the react native style map. there's a bunch of them, so I'd like to define them in a var and then pass that as the :opt param for the map. However, that seems to be failing with
IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol
(i'm guessing because s/def is a macro?)here's a simple example:
(def style-keys
[
(s/def ::padding ::dimen-spec)
(s/def ::padding-left ::dimen-spec)
(s/def ::padding-right ::dimen-spec)
(s/def ::padding-top ::dimen-spec)
(s/def ::padding-bottom ::dimen-spec)])
(s/def ::style (s/keys :opt style-keys))
@zpinter: that looks bad, you should call “def*” methods only at top level, this is a general rule, not something specific to spec
I haven’t played with specs yet, but my understanding is that s/def’ing fully qualified keyword, means you can use it anywhere else and it will just work
@darwin thanks! happy for alternative ideas... just trying to avoid having a large number of s/def's and then having to repeat the keyword list all over again to construct the map spec
if you want to make this more succinct I’m afraid you will have write a macro, assuming s/def
is a macro
the above seems to error out in the same way (my guess is that s/keys doesn't like :opt being passed as a symbol)
if this works, it would explain it, s/def
is a macro which needs to see the :opt
vector during compile time