Fork me on GitHub
#clojure-uk
<
2018-05-04
>
yogidevbear06:05:35

@lady3janepl did you make it in the end? I couldn't go and had to change my RSVP on meetup

yogidevbear06:05:11

Hello friend πŸ™‚

3Jane06:05:55

@yogidevbear yes I did! Loved the talk about Clara rules engine and the one about AWS got me thinking >.>

3Jane06:05:56

Met @fj.abanses as well, had a good chat. You need to come to the next one :D

πŸ’― 4
3Jane06:05:37

\o/ IT’S FRIDAY EVERYONE

rhinocratic07:05:18

Morning. 😴

thomas07:05:37

and indeed.. Friday!!! yeah.... and it is β˜€οΈ as well!!!

javi07:05:48

morning! hi @lady3janepl! great to meet you irl. coffee and catch-up soon.

πŸ‘ 4
β˜• 4
danm08:05:33

Ahoy πŸ™‚

cddr09:05:39

Having a bit of trouble with Mach (though I think it's more lack of experience with js in general). I'm trying to get it to fill in a mustache template with data provided in an edn file. Figured I could use the npm mustache library to do this but I can't figure out how to require it correctly. Tried following a few of the examples but none of them worked. Going by the usage example, on npm, mustache seems to export a global object called Mustache but if I try to reference js/Mustache I get "Mustache is not defined".

cddr09:05:15

Here's my Machfile

{

 mach/dependencies [[aero "1.1.0"]]
 mach/npm [[mustache "2.3.0"]]

 mach/init (do
             (def stache js/Mustache))
;;;
}

dominicm09:05:45

I suspect you would need a js/require first

cddr09:05:22

Yeah I thought about that but (js/require "mustache") returns "Cannot find module"

dominicm09:05:17

silly question, is it in node_modules/mustache?

cddr09:05:23

Well there is no node_modules so that could be the problem πŸ™‚

dominicm09:05:58

I have no idea how mach/npm is supposed to work

maleghast10:05:40

Morning All!

cddr10:05:52

Seems like if I npm init and then npm install mustache, it works as expected.

cddr10:05:25

Makes sense that it should require a local copy of the js code

guy10:05:31

and morning!

rhinocratic10:05:05

Yes - I listened to it on my journey home yesterday. Quite a bit of interesting stuff in there.

rhinocratic10:05:19

It sounds like work on further host platforms beyond JVM, JavaScript and the CLR isn't a priority for Rich at present.

guy10:05:00

yeah i agree. Was a good listen i enjoyed it πŸ˜„

xlevus10:05:01

what's the most clojuriey way to a database library to handle integrity errors on inserts? return null? raise an exception?

mccraigmccraig10:05:09

@xlevus we go for ex-info exceptions with a [:cause-key {:detail :info}] variant encoded into the ex-data map... if the op failed you want some way of handling that and since you will always have to deal with exceptions on the jvm you might as well use them as your failure info transport

xlevus10:05:58

cool. jdbc throws errors. Was wondering if it's clojurey to handle them sooner or later.

xlevus10:05:07

guess I'll just leave it for the plebs users to deal with

mccraigmccraig10:05:24

i think it depends on context. our web api code often lets them bubble through to http errors, while our streaming code tends to handle and log. the job of whatever is throwing is to provide enough info for sensible handling/logging/investigation later

12
yogidevbear11:05:15

What a beautiful day outside today β˜€οΈ 😎

rhinocratic11:05:41

I'm guessing that you're not in Manchester. πŸ™‚

rhinocratic11:05:26

Kind of overcast here, but looks to be improving.

danm12:05:41

@rhinocratic Have I seen you at Lambda Lounge? You look familiar, and I am also in Mancs

rhinocratic15:05:21

@U6SUWNB9N Hello Dan - sorry, I missed your message earlier. I was at Lambda Lounge last month - and some time ago I used to work at ISS. There was an overlap (fairly brief, I think!) when we were both there.

danm12:05:57

Ahha! πŸ‘:skin-tone-2: That photo was in ISS wasn’t it? I recognise the ceilings ;) I was there β€˜04. (Old building) to β€˜14. Were you down in CIS?

rhinocratic14:05:20

I was - on Floor B, from April 2014 to December 2017. I was in the Web Services Team, (David Harrison's team). Doing Student Portal / Staff Intranet stuff. And yes, the photo is in ISS. I probably ought to update it now that I've gone all beardy.

πŸ˜† 4
danm17:05:50

About a year overlap. I was wrong about my year, I left in April 2015 :)

yogidevbear12:05:48

Is it that bad in Manchester? My brother recently moved to Aberdeen of all places and he messaged me asking if it sounds sensible to be wearing shorts in 16 degree weather πŸ˜†

danm12:05:09

it's reasonably bright right now

danm12:05:25

I am off the bike at the moment due to snapping my rear axle 😞

yogidevbear12:05:07

I hope you snapped your bikes rear axle, and not your rear axle πŸ˜‰

πŸ˜† 4
yogidevbear12:05:35

I'd hate to think what it could mean to snap a body part called the rear axle

πŸ˜‚ 8
alexlynham13:05:44

still grey as hellll in mcr rn

alexlynham13:05:04

who'da thunk it, manchester: hotbed of clojure

Rachel Westmacott14:05:09

@guy yes - and I thought codeq sounded intriguing.

guy14:05:39

yeah a bit mad imo i’ve never even thought you could do what he suggested

dominicm14:05:58

Rich's suggestions in that were quite interesting, yeah.

dominicm14:05:33

codeq is a bit of a hack, it searches based on def*

Rachel Westmacott14:05:50

I remember discussing a vaguely similar idea with someone at EuroClojure a few years ago - depending on individual functions, maybe in a β€˜gist’ or something. I’d be super interested to see where Rich is going with that.

dominicm14:05:53

I'm hoping the new version uses tools.analyzer

bronsa11:05:11

I briefly talked to rich about it at the conj, they were experimenting with it

dominicm14:05:22

I don't think tools.deps.alpha supports that kind of granularity, so I'm wondering how it ties back in.

Rachel Westmacott14:05:50

but it has custom dependency resolution doesn’t it - or at least it is supposedly extensible in that regard?

thomas14:05:47

I wasted quite a few hours this week because somehow the docker container wasn't running the latest version of the code... and I rebuild everything several time... deleting all the containers/images in the end seem to do the trick.

Rachel Westmacott14:05:42

I could imagine splitting a lib into a bunch of single-function nano-libs deployed as gists, and then depending on only the ones needed.

Rachel Westmacott14:05:32

It would negate the need for any kind of dead code elimination, if you only depended on the individual functions that were called.

javi15:05:01

I have done little experiments like that using datascript and a graph like schema. dependency resolution is just a [?e :fn/name ?code] away. I find the codeq bits very exciting, referring to fns like that could be amazing for things like reagent components that can evolve very quicly for example.

bronsa11:05:11

I briefly talked to rich about it at the conj, they were experimenting with it