This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-10
Channels
- # ai (2)
- # beginners (3)
- # boot (113)
- # bristol-clojurians (2)
- # cider (77)
- # clara (43)
- # cljs-dev (48)
- # cljsrn (9)
- # clojure (319)
- # clojure-austin (2)
- # clojure-czech (4)
- # clojure-denmark (4)
- # clojure-france (4)
- # clojure-italy (4)
- # clojure-russia (2)
- # clojure-serbia (10)
- # clojure-spec (79)
- # clojure-uk (64)
- # clojurescript (109)
- # clr (3)
- # conf-proposals (21)
- # core-async (19)
- # cursive (26)
- # datascript (11)
- # datomic (19)
- # devcards (1)
- # emacs (25)
- # figwheel (9)
- # hoplon (31)
- # jobs (7)
- # jobs-discuss (14)
- # leiningen (10)
- # lumo (11)
- # off-topic (37)
- # om (40)
- # onyx (4)
- # perun (8)
- # planck (3)
- # rdf (4)
- # re-frame (40)
- # ring (11)
- # ring-swagger (2)
- # rum (21)
- # spacemacs (2)
- # specter (50)
- # untangled (93)
- # yada (13)
@negaduck I believe you shouldn't do that since "Only these things are true" is not really something you find in mathematical logic
@escherize, @kauko, could you explain why it’s not a good practice? I can imagine a case when it catches a bug:
(re-frame/reg-event-db
:set-active-panel
[check-spec-interceptor]
(fn [db [_ active-panel]]
(assoc db :active-panel active-panel)))
If there is a typo in the last line like (assoc db :actvie-penal active-panel)
, the map now has a key that is irrelevant to anything, user clicks a button and nothing happens, and this typo is hard to find.Or if you do a dissoc
, then you have to check that those exact keys are not in the result
Yeah you're absolutely right I think. I just remember Hickey mentioning in his clojureconf talk that clojure.spec doesn't have that concept, because mathematical logic doesn't. Maybe someone who knows more about maths can explain what the repercussions of such a concept would be
I was initially a bit disappointed by that claim, but when I thought about it more, the only times I could think of when I'd want to do a check like that, was typos
If you really want to know, I'm sure there's discussion about this in the google group. 🙂 OR you can just carry on doing what you want 😄
I would like to see that discussion. Anyway, we can have spec for values: (s/def ::active-panel #{:home-panel :about-panel})
, why not have a spec for keys? (s/def ::good-state (only-keys :req-un [::active-panel]))
Guys i have a question; I have a project like cms admin panel. How should organize files, like this ? https://github.com/Day8/re-frame/blob/master/docs/Basic-App-Structure.md#larger-apps Or something different structure ?
@gregnwosu using any of a myriad of ajax libraries
@gregnwosu yes there will need to be some type of service endpoint to hit, what exactly are you trying to do?
got ya, I’ve had success setting up some server side code in a re-frame application using Ring/Compojure, which is pretty simple to set up, I’ll find you the docs I used
the text may take a while to process so it will need to be added to a processing queue
I looked at reframe but i was a bit overloaded , i wanted to get my head around reagent first, which i think i have now, so please hit me with the reframe doc
This should give you a good idea and I think it is just using reagent
no problem
how would you use the following js lib with re-frame? http://davidshimjs.github.io/qrcodejs/