ldnclj

Find us on #clojure-uk
agile_geek 2015-08-18T08:22:15.000479Z

is on Busman’s Holiday at Mastodon C

mccraigmccraig 2015-08-18T08:24:59.000480Z

agile_geek: clojure all day ?

agile_geek 2015-08-18T08:41:57.000481Z

@mccraigmccraig: Yay!

mccraigmccraig 2015-08-18T08:44:38.000482Z

@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

agile_geek 2015-08-18T08:47:47.000483Z

@mccraigmccraig: ahh, but if I eventually come to understand it will I lose the ability to explain it to anyone else?

mccraigmccraig 2015-08-18T08:49:22.000484Z

@agile_geek: that is part of the deal you have to strike. now i've said too much

agile_geek 2015-08-18T08:51:04.000485Z

@mccraigmccraig: 👿

pupeno 2015-08-18T08:57:24.000486Z

Good morning.

pupeno 2015-08-18T08:59:58.000487Z

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/

mccraigmccraig 2015-08-18T09:04:20.000489Z

@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

pupeno 2015-08-18T09:06:42.000490Z

I’m serving static content with compojure itself.

mccraigmccraig 2015-08-18T09:10:49.000491Z

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

pupeno 2015-08-18T09:14:09.000492Z

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.

mccraigmccraig 2015-08-18T09:15:41.000493Z

the problem with that approach is that you never get 404s... you get a load of html instead

pupeno 2015-08-18T09:16:27.000494Z

That is true, because routing happens in the client.

pupeno 2015-08-18T09:17:23.000495Z

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.

pupeno 2015-08-18T09:17:35.000496Z

I know some people are attempting that with ember+node

mccraigmccraig 2015-08-18T10:30:46.000497Z

server-side render of an SPA with state is pretty darn cool

malcolmsparks 2015-08-18T10:37:17.000498Z

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

pupeno 2015-08-18T10:56:07.000499Z

malcolmsparks: do you mean client routing or sever-side rendering SPAs?

mccraigmccraig 2015-08-18T11:10:26.000500Z

@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 ?

agile_geek 2015-08-18T12:00:12.000501Z

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.

wyan 2015-08-18T12:02:09.000503Z

that sounds interesting!

malcolmsparks 2015-08-18T12:25:49.000504Z

@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)

pupeno 2015-08-18T12:26:22.000505Z

malcolmsparks: are you using re-frame too?

malcolmsparks 2015-08-18T12:26:56.000506Z

@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

malcolmsparks 2015-08-18T12:39:12.000507Z

@pupeno: for the blog article, I've used reagent actually - haven't yet played with re-frame

malcolmsparks 2015-08-18T12:39:29.000508Z

but the code is much the same for the routing

mccraigmccraig 2015-08-18T12:40:26.000509Z

@malcolmsparks: i'm on 0.4.3 atm

malcolmsparks 2015-08-18T12:41:33.000510Z

@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

malcolmsparks 2015-08-18T12:41:56.000511Z

it should be just filling in the gaps mostly from now on

mccraigmccraig 2015-08-18T12:42:29.000512Z

@malcolmsparks: cool, thanks - i'll upgrade to the beta branch then and see how it goes

malcolmsparks 2015-08-18T12:43:02.000513Z

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 :simple_smile:

malcolmsparks 2015-08-18T12:43:27.000514Z

(but clojars releases are tagged, so depend on those, to prevent surprises)

malcolmsparks 2015-08-18T12:43:46.000515Z

@m

mccraigmccraig 2015-08-18T12:43:47.000516Z

oh, there's no 1.0-beta branch on github... just tags

malcolmsparks 2015-08-18T12:44:34.000517Z

I mean [yada "1.0.0-20150816.005601-4"]

jonpither 2015-08-18T12:46:38.000518Z

Anyone got CIDER + clj-refactor working to clean up cljs ns forms?

malcolmsparks 2015-08-18T12:49:17.000519Z

surely we're talking cljc these days though 😉

jonpither 2015-08-18T12:50:42.000520Z

clojurescript has extra funkage. i.e. require-macros

jonpither 2015-08-18T12:51:12.000521Z

So the clj-refactor bindings, when run in cljs files, kills my emacs

pupeno 2015-08-18T16:58:52.000522Z

Who is going to the Project Clojure Dojo today?