Fork me on GitHub
#clojure-uk
<
2020-03-11
>
dharrigan06:03:22

Good Morning!

guy07:03:17

morning!

marcus07:03:33

Morning chaps!

thomas07:03:58

mogge 😼

dharrigan10:03:12

wow, just found out you can do this

[camel-snake-kebab
        [core :refer [->kebab-case]]
        [extras :refer [transform-keys]]]

dharrigan10:03:02

rather than [camel-snake-kebab.core :refer [->kebab-case]] etc..

dominicm10:03:34

I wouldn't say there's a lot of love for the syntax :)

dharrigan10:03:00

Beauty is in the eye of the beholder 🙂

Ben Hammond10:03:48

haha; the beholder that's you in a month's time is generally less charitable than the beholder that's you today

parrot 4
minimal10:03:03

the regret is real with that syntax

3Jane11:03:33

I'd say anything that splits names into parts, such that the full name cannot be searched in text, is going to be a pain

💯 8
3Jane11:03:06

the only thing that saves you from this pain, somewhat, is an IDE that tracks imports and uses across the codebase (like IDEA)

3Jane11:03:06

but even so, I'd not do it

Ben Hammond11:03:19

it's usually easier for (:requires to stay formulaic and boring

3Jane11:03:24

(see also: generating symbols using string manipulation, jfc)

folcon11:03:19

Yea, at the moment I’m still using full forms…

3Jane11:03:09

(but I 100% admit that it looks nice, and presses that little "neatness" button in the brain)

Ben Hammond11:03:00

Camel/Snake/Kebab always sounds like it should be a logic problem

Ben Hammond11:03:43

(its on my list of pet peeves of Things That Cause Unnecessary Errors with very little upside)

❤️ 4
Ben Hammond11:03:05

Everything should be case insensitive with all hyphen and underscores treated as invisible

dharrigan11:03:09

well, I'm wasn't picking on a library per-se, just the ability to split the import into a "group" name, with sub divisions

Ben Hammond11:03:42

yeah I know I'm wandering off your point

seancorfield18:03:40

There's a lot of stuff in the taoensso libs that makes me go WTF and we've stopped using them -- which was a lot of work because we were all-in on Timbre, Carmine, Nippy, and several others at one point.

dharrigan11:03:20

I got it from this:

Ben Hammond11:03:20

and the world would be a simpler place

dharrigan11:03:12

I was looking at their source code to see what it was doing and I saw the way they were doing a requires, which I never saw before.

dharrigan11:03:42

on another note

dharrigan11:03:56

Are people (office-based workers) making plans for WFH?

dharrigan11:03:14

We've had a few meetings to discuss what to do if (when?) the whole country goes into lock-down

dharrigan11:03:38

Business Continuity stuff

mccraigmccraig11:03:05

we have... all our devs are already WFH, and all our office-based people are taking their laptops home every night, so we can switch to everyone WFH at a moment's notice

rickmoynihan11:03:45

re covid-19 I wrote to my MP yesterday pointing at Italy, saying they need to persuade the government to take more urgent action. The situation there is dire, and it’ll be us too in an estimated ~12 days or so. https://twitter.com/markjhandley/status/1237119688578138112?s=21

thomas12:03:04

Japan is doing remarkably well on that chart... what are they doing differently?

ben12:03:23

IIRC they’re severely under-testing

ben12:03:01

Their National Doctors’ Association is apparently fuming

mccraigmccraig12:03:39

that thread on the measures china has taken is also fascinating: https://twitter.com/NAChristakis/status/1237020518781460480

👍 4
Ben Hammond12:03:58

they closed schools until the spring holiday

Ben Hammond12:03:22

which must have the knock-on effect of preventing parents from going to work I suppose

3Jane12:03:37

govt is paying their salaries afair

3Jane12:03:08

something (insert waving hands) is being done

folcon12:03:52

Anyone use add-watch? Is there a nice way to clear the atom without triggering a watch? Or is the only approach removing the watch, resetting and then adding it back again?

Ben Hammond12:03:57

why would you want to?

Ben Hammond12:03:28

shouldn't the watchers know how to act?

folcon12:03:04

True, my add watch is basically sending across state changes over a wire, but if someone actually re-init’s the state I need to differentiate that from general state change, looks like calling, reset! with nil, then reset with the init will allow the watcher to differentiate it.

Ben Hammond12:03:00

can you have a sentinel value of :init as the first thing that happens

folcon12:03:37

Good suggestion =)…

folcon12:03:34

That or just throw away all the protocol, record stuff and just use maps/multimethods…

folcon12:03:01

As all the problems are coming from those 😞

dominicm12:03:43

Maybe you actually need an atom with an atom in

folcon12:03:36

An atom with an atom-in? as in (atom {:state (atom {})})?

thomas12:03:00

don't you get the old and new state in add-watch and couldn't you do something with that?

folcon13:03:22

Yea, moving to something like setting a sentinel value as Ben suggested is not a bad approach 😃

mccraigmccraig17:03:21

@dharrigan here's a nice model to help you decide when to close your office - https://docs.google.com/spreadsheets/d/17YyCmjb2Z2QwMiRRwAb7W0vQoEAiL9Co0ARsl03dSlw/htmlview?usp=sharing&amp;sle=true (replace the htmlview bit of the link with copy to get google-drive to copy the sheet so you can edit it). the model was created by the author of this article: https://medium.com/@tomaspueyo/coronavirus-act-today-or-people-will-die-f4d3d9cd99ca

dharrigan17:03:39

nice, thank you

dharrigan17:03:33

I'll pass it along, up the chain, to the principle decision makers

mccraigmccraig17:03:44

i don't particularly like the arcgis dashboards (the johns hopkins global one is also arcgis)... the filtering is quite rubbish