This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-04
Channels
- # admin-announcements (33)
- # announcements (2)
- # beginners (10)
- # boot (200)
- # cider (25)
- # cljs-dev (13)
- # clojure (75)
- # clojure-canada (2)
- # clojure-czech (1)
- # clojure-dev (16)
- # clojure-japan (7)
- # clojure-russia (20)
- # clojurescript (206)
- # clr (1)
- # cursive (24)
- # datascript (1)
- # datomic (1)
- # editors (2)
- # hoplon (136)
- # ldnclj (54)
- # off-topic (9)
- # om (5)
- # onyx (8)
- # re-frame (66)
- # reagent (19)
- # yada (21)
I’m just wondering why I get a “No such template: yada” when I run
lein new modular yada-demo yada
Oh, because it's what I call a 'forward-looking feature'
sorry!
but I'm going on holiday tomorrow so I'll have time to fix up the yada template - it's not far away
@malcolmsparks: Oh thanks Malcolm In the meantime I’ll start a Yada proj the old-fashioned way, without modular, and see if I can get it working
I suppose I could use one of the other modular templates and then add yada and bidi in myself too, right?
yes exactly, it's quite easy to add the dependencies afterwards
hey, malcolm, regarding printing bidi route seq...
(->> (routes) bidi.bidi/route-seq (map :path) (map prn))
will print all your routes but it looks like this:Optional
is like (alts „whatever„ „“)
hmm - you have all the components of each route there, it's up to you to stitch them together - do you think bidi should provide functions for that? the danger of doing that automatically is you lose information that could be needed by someone
I don’t know, I’ve written a defmulti which does some formatting:
(|/|/ui) /api(/?) /api/users(/?) /api/users/:id(/?)
it’s a little crude and a pseudo regex style for alts with „|“ and opts with „?“ but it gives me a quick visual overview
the problem is there could be custom records in there, and you can't tell how to flatten them
I think that's the problem with everything as data, but it stills beats everything as one composed function 😉
that’s right. I have this custom record here (Optional) but it’s easy a it gets to add the defmethod for it
I just looked into the yada master codbase, and I find yada starts getting into the same trap as liberator: it complects a lot of stuff, the entity ( resource) "model" and the resource „implementation" in core.clj. The resource
function is huge, monolithic and does multiple things:
* derive a resource entity model from the resource
parameter. (Does is exist, what can I do to the entity represented by the resource)
* derive the http resource model from it (available methods, content-types, negotiation)
I think there’s an opportunity to separate these steps where the latter would receive a data structure which, as I figure, would resemble a liberator resource definition somehow.