This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-18
Channels
- # admin-announcements (59)
- # beginners (5)
- # boot (99)
- # cider (9)
- # clojure (207)
- # clojure-czech (1)
- # clojure-dev (28)
- # clojure-france (3)
- # clojure-italy (1)
- # clojure-japan (22)
- # clojurescript (234)
- # core-async (12)
- # datascript (1)
- # datomic (60)
- # funcool (137)
- # hoplon (18)
- # instaparse (2)
- # jobs (2)
- # ldnclj (42)
- # ldnproclodo (3)
- # liberator (13)
- # off-topic (21)
- # onyx (2)
- # re-frame (5)
- # reagent (12)
- # ring-swagger (5)
- # testing (17)
is on Busman’s Holiday at Mastodon C
agile_geek: clojure all day ?
@agile_geek: i've got a nice monad here i can sell you. only one previous owner, a little old lady, very careful, she never bound it more than once a day
@mccraigmccraig: ahh, but if I eventually come to understand it will I lose the ability to explain it to anyone else?
@agile_geek: that is part of the deal you have to strike. now i've said too much
Good morning.
I just published a post about reframe, silk and pushy: https://carouselapps.com/2015/08/18/no-hashes-bidirectional-routing-in-re-frame-with-silk-and-pushy/
@pupeno: i gave up on the nice-urls thing a while back... it was seductive, but ended up making it difficult to distinguish between requests for static content (served by a reverse-proxy) from in-page routes
I’m serving static content with compojure itself.
i think if you enforce some rigid route hygiene, such that in-page routes are always easy to distinguish from other routes with a simple path regex, you should be ok... i hadn't thought about the problem up-front though, so it would have been a pain to change
When compojure receives a request, first test if it’s for the api in /api, if not, it checks for static content, if there’s no static content, it serves the app itself.
the problem with that approach is that you never get 404s... you get a load of html instead
That is true, because routing happens in the client.
My plan is to run clojurescript on the server and pre-render the page so you get a finished page for the URL you requested plus the SPA. I’ll be able to generate 404s there. I was told reagent’s website does this.
I know some people are attempting that with ember+node
server-side render of an SPA with state is pretty darn cool
I have a blog article in the works how to do this in bidi with bidi/router.cljs from @jarohen - there's just no other docs right now
malcolmsparks: do you mean client routing or sever-side rendering SPAs?
@malcolmsparks: hows the next version of yada coming along ? i just hit what looks like a bug (if an :authorized fn returns a Deferred it's treated as true rather than a deferred value) and am wondering if i should upgrade ?
Anyone who fancies building an event management system in Clojure (and teaching me some cljs in the process) don’t forget the new Project based Clojure Dojo tonight. https://docs.google.com/forms/d/1SgT6dQksU3eDDJp37cX2dzcDRODEPF1-wDWEJJA2uL0/viewform Doors open 6pm for brainstorming and pizza, real action kicks off at 7pm.
@pupeno: I mean client-side routing, just the basics, but I'm interested in the latter (just don't know yet how to do it)
malcolmsparks: are you using re-frame too?
@mccraigmccraig: which version of yada are you using? I'm regularly releasing on the 1.0 beta branch now so you should check README.md for the latest - security needs a revamp though, so possibly that bug still exists, I'll raise a github issue
@pupeno: for the blog article, I've used reagent actually - haven't yet played with re-frame
but the code is much the same for the routing
@malcolmsparks: i'm on 0.4.3 atm
@mccraigmccraig: the next release of yada is going well, it had another big revamp recently because etags (and that required a huge overhaul of content negotiation, which took most of the programming time I had on my recent holiday). But I don't think there are other unimplemented parts of the HTTP spec. now that are going to cause such a impact
it should be just filling in the gaps mostly from now on
@malcolmsparks: cool, thanks - i'll upgrade to the beta branch then and see how it goes
definitely try 1.0, I've fixed SSE and there's enough docs/examples now that should get you through - I'll on 1.0-SNAPSHOT until Clojure Exchange, when I hope to remove -SNAPSHOT
(but clojars releases are tagged, so depend on those, to prevent surprises)
oh, there's no 1.0-beta branch on github... just tags
I mean [yada "1.0.0-20150816.005601-4"]
surely we're talking cljc these days though 😉
Who is going to the Project Clojure Dojo today?