Quick reminder: Progressive Clojure Dojo (ProCloDo - seek Doctors advice before taking) is on Tuesday 22nd. Sign up form is here: https://docs.google.com/forms/d/1SgT6dQksU3eDDJp37cX2dzcDRODEPF1-wDWEJJA2uL0/viewform (Yes is know preferences is spelt incorrectly…come along on Tues and fix it)
morning
if anyone here was at the canary wharf dojo on tuesday, i got my code working last night for the spark example - you can see it here: https://github.com/oliyh/clojspark
very basic! but the thing i'm most pleased with was the local workflow, running in a local repl on my host OS, iteration time was seconds as opposed to a minute using uberjar compilation and submission via guest os
morning :simple_smile:
mo-yawn-ing
Anyone here use Atom as their main or clojure editor?
@thomas: here's the first few lines of my bidi handler definition : https://www.refheap.com/c433c555056b8dc4714dad41a
Thanks @mccraigmccraig looks very helpful
main difference from yours seems to be that i'm using maps in the second position of the bidi routes... i remember having difficulty making bidi do what i want and playing around until it worked, so i may not have the most idiomatic solution
in particular, it looks a bit odd having "/" and empty-string in the first-position of the bidi routes
i didn't care enough to investigate further though - other fish to grill
@afhammad: it was my main editor for javascript before, but i moved to emacs (with spacemacs)
@thomas: here's a couple of resources too, which illustrate swagger for the resources, parameter coercion, and how to make CORS work in the current -9 release https://www.refheap.com/f1873f495a791f2dc99aeda42 https://www.refheap.com/ccb88dfdd429e22adc3b8dc13
@quentin: was it because of the lack of clojure tooling/packages?
there’s that, but also because of the vim keybinding support in spacemacs is vastly superior to atom's
gotcha
there's a schema in bidi now, so you can validate your route structures before using them
the trouble with using maps in the second place of a bidi route (pair) is that you don't know exactly the order of the entries, so if your patterns aren't 100% mutually exclusive, you should use a vector of vectors to be specific about the ordering
vector of vectors creates a lot of syntactic noise, so maps are supported for when evaluation order doesn't matter
@malcolmsparks would it work with ordered maps? like https://github.com/frankiesardo/linked or https://github.com/flatland/ordered/tree/develop/src/flatland/ordered ?
Good morning.
@frankie: yes, it uses seq under the hood. ordered-maps would be a perfect compromise
what is a good workflow with yada....
using stuart sierra's component system>
?
@thomas: i've been using https://github.com/jarohen/yoyo/
hmm ok... just started hacking with components...
as that is what the samples seem to use.
might have a look at that one as well.
component is perfectly good too
ta