Clojurians
#clojure-uk
<
2017-01-13
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

yogidevbear07:01:35

Morning :snowman_without_snow:

dominicm08:01:23

Anybody else got snow :snowflake:

agile_geek08:01:30

@dominicm nothing in Kilburn or Camden

maleghast08:01:38

Hello All :slightly_smiling_face:

agile_geek08:01:07

Im looking for advice on the best way to share Spec/Schema definitions across client/server codebases in different repos. Where server is clj and client cljs. Preferably without cut and pasting.

maleghast08:01:47

@otfrom - Re above about Open Source & Datomic, that’s avery good point. None of the “serious” Time Series Databases I have looked at / found are Open Source… Have I missed a memo?

thomas08:01:57

@dominicm we got very wet snow here in Breda and Rotterdam

dominicm08:01:01

@agile_geek .cljc and libraries

dominicm08:01:11

Maybe git subtrees

agile_geek08:01:37

@dominicm I've already started implementing in .cljc files. Thought about making it it's own lib but it seems like overkill. I am not that familiar with git subtrees so will investigate. We already use checkouts to share code across two server components but that's causing a few issues however they're more to do with restricting design choices as it's code rather than simply a definition of shared data.

dominicm08:01:36

They're like submodules. But less painful. @jonpither is the JUXT expert on them.

jonpither08:01:00

Still learning git subtrees, but seem a big improvement to git submodules, which may have brought me to tears on occasion. With subtrees no real issue so far, but still at the copying and pasting commands from history and the web stage

agile_geek08:01:03

So, am I correct in saying the suggestion would be create a separate repo for the Schema or Spec def's and use git subtrees to bring them in to each dependent project? Would the Schema/Spec def's be built as a separate jar for runtime deployment?

jonpither08:01:48

If subtrees no need to build the code

jonpither08:01:38

Sounds like the idea could work and is perfectly reasonable. There is an element of untried tho

jonpither08:01:16

I think cljc and normal jar libs also...

agile_geek08:01:18

@jonpither so separate repo brought into each projects build path via subtrees as well?

jonpither09:01:24

you could configure the top level project.clj to have the subtrees src paths in the parent src path, is one approach

agile_geek09:01:19

OK. The libraries approach would mean we could reply on dependency management tools like lein (or boot if we ever go there) but we'd have to build the schema/spec stuff as both a jar and a .js file.

agile_geek09:01:00

I think I need to try this to understand it

benedek09:01:08

this (managed dependencies) may be helpful in lein actually for this use case @agile_geek https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L71

jonpither09:01:09

LOVE wanted and welcome (in the form of RTs) for this adoption story https://twitter.com/juxtpro/status/819833852390703112

agile_geek09:01:37

@benedek I know about parent pom's in maven. I didn't know there was a similar concept in lien or am I misunderstanding?

dominicm09:01:49

@agile_geek you shouldn't be building to js until you build your project (don't distribute a cljs library in js!)

benedek09:01:58

nope i think this is something similar. pretty recent afaik

dominicm09:01:12

With a subtree, they would be like another namespace in your project. Built in.

dominicm09:01:33

Though I guess you could use a checkout too actually.

agile_geek09:01:45

@dominicm yeah, sorry I realise that I think I wasn't awake when I typed that!

benedek09:01:18

not saying subtrees are a wrong idea tho. they may be much better than deps. i have not really used them.

dominicm09:01:07

@benedek essentially just another way to get files into your project. I'm assuming @agile_geek has no private repo to deploy a library too normally.

agile_geek09:01:57

@dominicm no, we have private repo's we can do that. I'm just weighing pros and cons

dominicm09:01:20

@agile_geek oh, I'd suggest that then. Stick them in a cljc and deploy that. Don't bother with subtrees

benedek09:01:26

wonder what is the diff between subtrees and checkout dirs (just to partly answer myself i guess the former is a git thing and the latter is rather a lein thing)

agile_geek09:01:16

@benedek yep. That's my simplistic take too.

dominicm09:01:03

@benedek the trick would be to combine the two :)

jonpither09:01:03

there is a diff. Checkout dirs there's no way you can tie in the versions. With subtrees / submodules, you are tying the versions of the projs together

benedek09:01:36

ah see, important diff that is

jonpither09:01:37

i.e checkout dirs depends on the dev grabbing the right version of the source and symlinking appropriately

dominicm09:01:43

Subtrees get the other project in a directory. Checkouts let you include them in your build

agile_geek09:01:54

@jonpither I can see that resolving a few of the issues with checkouts

glenjamin09:01:30

how about as a package with a version number?

glenjamin09:01:26

the tooling for doing packages is a much more trodden path than subtrees to subrepos

agile_geek09:01:11

@glenjamin I sometimes feel like a dunce and this is one of those times...what are packages in the context of Clojure/Clojurescript?

glenjamin09:01:41

leiningen dependencies i mean

glenjamin09:01:57

i forget packages mean something specific and different in jvm-land

dominicm09:01:25

^^ I only suggested subtrees because I didn't think you had a private repo. Do that first.

mccraigmccraig09:01:29

@agile_geek we used to have 7 separate git repos and used lein-voom to manage versioning. if you have to have separate repos voom is great, and you can never suffer from mvn cache poisoning

mccraigmccraig09:01:07

in the end though i used git subtree to pull all the 7 repos into subdirs of a single repo, and now use a combo of boot and lein-modules to manage the build

mccraigmccraig09:01:28

front-end, back-end, everything all as subdirs of a single repo. it's much more convenient

glenjamin09:01:04

if you’re changing them both at the same time a lot, i’d use a single repo

glenjamin09:01:34

if you’re not, i’d use a standalone library and version it deliberately

mccraigmccraig09:01:09

+1 @glenjamin - but additionally use lein-voom to version it - it builds the git sha into the jar version and will update your dependencies automatically, so you can't make a mistake

glenjamin09:01:11

I’m not a big fan of shared dependencies where you have to run all apps at the same version and bump them

glenjamin09:01:39

even for something like shared specs, you’ll want to be backwards and forwards compatible so you can roll out updates incrementally

glenjamin09:01:05

much like Rich talked about in Speculation

agile_geek09:01:32

@glenjamin I'd expect we'd be changing both at same time a fair amount but they are currently two separate repo's with separate build pipelines

glenjamin09:01:29

is it a backend-for-frontend (BFF) type pattern, or a more general backend API that gets used for a bunch of things on the frontend?

agile_geek09:01:05

It's actually not really either. Don't want to comment too much on my view of the design. The front end calls more than one backend service to carry out tasks and this is one of them.

dominicm10:01:22

http://bpiel.github.io/sayid/ any emacs users want to try this out so I can figure out if I want to port it to vim? :smile:

tcoupland10:01:57

i gave it a whirl the other day, it had a bit of a problem with multimethods that's now been fixed. Found it really useful actually, will definitely try it out again when i'm back in the right place for it

dominicm10:01:01

TO THE VIMSCRIPT-MOBILE

peterwestmacott10:01:39

ooh, its just started snowing here (again) (where here = ‘Redhill’)

dominicm10:01:36

All my garden snow is almost gone

glenjamin10:01:27

it’s now basically dry and sunny here - there was a light dusting of snow early doors

jr0cket11:01:54

Avalanches of slushy ice and snow here... from the rooftops of my house anyway :)

yogidevbear11:01:37

@peterwestmacott you're pretty close to here (where here = 'Horsham'). We also had some more snow about 30 min ago

rickmoynihan12:01:31

nightmare morning here for me due to snow

rickmoynihan12:01:30

cancelled train — so tried to drive in to manchester — but gridlocked traffic so turned back home… had to abandon my car 1/2 way up our hill. Parked it got out… car then promptly slid at an alarmingly high speed 10m down the hill with the handbrake on... fortunately it slid into some mud and came to a stop instead of sliding maybe 50m down the road

rickmoynihan12:01:06

pretty much par for the course when it snows here though

rickmoynihan12:01:04

mccraigmccraig: chains supposedly aren’t illegal - if and only if they don’t touch the tarmac… which for all intents and purposes means they’re illegal

mccraigmccraig12:01:56

both chains and piggdekk do completely shag the tarmac, so it's kinda understandable. scandinavian roads all have two grooves per lane worn into them by the piggdekk

rickmoynihan12:01:37

yeah I’ve seen them

peterwestmacott15:01:51

I alway think that a “bloom filter” should be a graphical thing

mccraigmccraig15:01:10

anyone got anything good to say about a js graphing libs for a re-frame/reagent app ? @otfrom ?

seancorfield17:01:58

@rickmoynihan Chains are effectively illegal in the UK? Interesting. We have a freeway here up over the mountains where chains are required by law when it even snows a little, and yeah they mess up the roads pretty badly.

rickmoynihan17:01:14

Well they are legal. They’re just practically useless for me. I live in the Peak District National Park at the top of a dirty great hill with a steep narrow single track road for access, so for England we get a huge amount of snow (i.e. we had 6ft drifts of snow in April a few years back)… but a few hundred feet of altitude makes a lot of difference. So today I really could’ve used chains, but legally I’d probably have to remove them after driving a few hundred feet. When we had 6ft drifts I’d probably have driven 1.5miles before I’d need to have removed them - so basically not the worth the hassle.

rickmoynihan17:01:02

I suspect if you lived in Cairngorms you could probably legally drive with them for about 1/2 a week a year - so long as you didn’t drive more than maybe 10 miles, and they’d not sent the gritters out

glenjamin17:01:37

do you have winter tyres?

mccraigmccraig17:01:41

@rickmoynihan when i lived in norway my in-laws had a quattro which they used to put just-rubber winter tyres on (no spikes like most cars use) - it coped pretty well - that would work fine in the UK

glenjamin17:01:52

and how much difference do they make in such conditions?

rickmoynihan17:01:23

winter tyres make a big difference

mccraigmccraig17:01:37

@glenjamin they make a lot of difference on a 4wd... especially if it has traction control. not so much on a 2wd

rickmoynihan17:01:15

I should probably get some; but it’s a lot of money fitting two cars with them for the 3 weeks a year you need them

rickmoynihan17:01:43

usually those weeks we park the cars at the bottom of the hill and walk up and down

seancorfield19:01:27

We carry chains in our Prius all the time, on the off-chance that we go over a mountain pass on the way to/from a cat show in the winter and they have chain law in effect. I’ve used them maybe three times in 15 years. They do it here (California) mostly to slow drivers down, otherwise Californians would drive like idiots in the snow :slightly_smiling_face:

mattford20:01:10

Snow socks for the win.

paulspencerwilliams20:01:29

@mccraigmccraig: I read an article last year about a 2 wheel drive on winter tyres getting up snowy Llamberis Pass where Land Rover Discos with typical off road tyres couldn't.

mccraigmccraig20:01:13

@paulspencerwilliams could be - i've had very variable results with 2wd and piggdekk (winter tyres with metal studs, more capable than just rubber winter tyres) - had one car which was great and another which was useless. i think it might be related to rear vs front axle drive, rear being better

paulspencerwilliams20:01:57

@rickmoynihan: hey, where do you live? I'm just south of Derby but spend loads of time in Ashbourne, and mainly Edale / Castleton.

paulspencerwilliams20:01:53

@mccraigmccraig: makes sense though rwd scares me ;-)

mccraigmccraig20:01:29

@paulspencerwilliams ah, could also have been that the fwd car was an automatic too... can't rightly remember, it was a while ago

rickmoynihan20:01:37

paulspencerwilliams: ahh in that case "you’re beyond hope” :wink:

rickmoynihan20:01:45

paulspencerwilliams: I’m not over that way… I’m at the northernmost tip… Marsden

rickmoynihan20:01:44

(for the uninitiated Castleton is the next village from Hope)

paulspencerwilliams20:01:52

I've never been up that way. Do you get out on the hills much? I've a mountain bike coaching day at Grenocide next Friday; I hope it thaws!!

rickmoynihan20:01:58

Well I live on the hills, so yes all the time :slightly_smiling_face:

rickmoynihan20:01:14

though I don’t really travel much to other hills/walks, because when it’s literally your garden why drive anywhere?! :slightly_smiling_face:

rickmoynihan20:01:34

the photo above was taken this morning from my front door

rickmoynihan20:01:11

I fully expect the snow to be completely gone tomorrow

paulspencerwilliams20:01:16

Wow, that's pretty

rickmoynihan20:01:11

yeah - unfortunately we’re renting… but we love it so much that we’ve been delaying getting on the housing ladder… so ultimately probably a stupid thing to do

rickmoynihan20:01:32

places like this dont come on the market very often, and when they do they’re usually out of our budget

glenjamin21:01:04

Is that at a mountain bike trail paulspencerwilliams ?

paulspencerwilliams21:01:51

@glenjamin: yeah, proper trails up there. Did one before xmas in preparation for race season.

glenjamin21:01:33

What are those ones called?

glenjamin21:01:09

hah, that was ace

glenjamin21:01:42

i’ve been meaning to point my road bike over in that direction and ride the TdF routes

paulspencerwilliams21:01:10

Yeah, there's great road climbs up there too on the Sheffield side

glenjamin22:01:09

Just planned a route, 56km with 1424m climbing

glenjamin22:01:50

gentle rise out of town, pea royd lane from the 100 climbs book, and then onto the TdF stage route until the finish line