Fork me on GitHub
#clojure-uk
<
2019-02-11
>
thomas08:02:42

Mogge 😼

3Jane10:02:38

Re that oatmeal, that’s totally what happens if you’re not a company

3Jane10:02:13

At the same time I think we should be able to design a thing based on feelings

3Jane10:02:49

A new book came out recently, I think it’s called Joyful, where the author researched why her designs made people feel this

😮 5
practicalli-johnny10:02:20

If you are unclear on the withdrawal agreement created by the UK government and the European Union (it seems many of the English MP's are) or simply enjoy facts, then please talk a look at this very informative presentation. Its very clearly written and quite detailed, so you can also get an understanding of the challenges involved. https://ec.europa.eu/commission/publications/eu-uk-withdrawal-agreement-explained_en (this is a webpage with the pdf download) As you are probably aware, any details of future trade relationship agreement between the UK and EU require the approval of the withdrawal agreement by all parties and the UK parliament has not voted in favour of the withdrawal agreement as yet (despite plenty of bribes and false promises by the UK government).

👍 5
keithmantell11:02:33

How dare they be so logical, professional.......😜

practicalli-johnny11:02:51

Its just not very English of them.... 😞 They should be much more egotistical and uncaring about facts or reality...

10
alexlynham10:02:19

am I the only one that missed this being a thing? https://github.com/cognitect-labs/aws-api

practicalli-johnny11:02:18

Its fairly new (august 2018) so I assume most people missed it. I also assume its come from the work they did with Datomic Ions

danm12:02:09

How does it feel to use compared with amazonica? Easier? More idiomatic? We've generally found amazonica to fit our patterns quite nicely

Ben Hammond12:02:50

it is supposed to be very light weight; you only have to require what you use

Ben Hammond12:02:06

but I don't have any real experiences to back that up...

alexlynham12:02:33

Looking at the API it looks much more 'clojure' than amazonica, which tbh I hate and always end up wrapping in utility fns of my own

alexlynham12:02:50

Okay hate is a strong word but it is clunky

seancorfield16:02:52

It was announced formally at Conj -- I think there was a talk about it...

rickmoynihan23:02:18

I’ve been using it and it’s pretty good. It’s really nice to have near full coverage of the AWS apis (though I’m just using SQS/S3. Biggest issue I’ve had is that the different AWS services report errors in different ways… It used to be undocumented in this regard but they added this to the README after I raised it as an issue: https://github.com/cognitect-labs/aws-api#responses-success-failure Note though that it doesn’t say what is a 400 though; so you need to dig into that yourself. Had some other minor issues which I reported which seem to have mainly be due to inconsistencies with AWS itself.

alexlynham13:02:21

oh ho ho some of the errors I've gotten via the python API when doing all sorts of random service wrangling have been :chef_kissing_fingers.gif:

alexlynham11:02:12

I see hard brexit comin' 
It's rolling round the bend
I ain't seen an adult politician
Since I don't know when
Well I'm stuck in brexit Britain
And time keeps draggin' on
But that brexit keeps a'rollin' 
What a huge self-own
(sorry Johnny Cash)

😢 20
5
cddr14:02:59

Has anyone tried using spec to produce reports about which functions in some codebase break backward compatibility (at least at a function signature level for fspec'd functions) when compared to a given version. Is that something we're hoping will emerge in the tool-osphere?

Wes Hall15:02:12

This 1) probably won't be popular and 2) might be originating from my inner optimist, but I really do get a distinctive "Y2K" feeling about the whole, "hard brexit" thing. It's not great, and personally I like the status quo (with perhaps the caveat, that I am not generally a fan of concentrations of power), but a lot of the drama over it, rhymes, to my ears, to the whole, "Our toasters are going to become self-aware and take over the world!", style crap from 19 years ago.

otfrom20:02:26

I'm already pretty upset about the things my EU friends and colleagues are having to do to stay.

alexlynham20:02:51

lol I just spent 18 months working at a retailer and based on what the folks in logistics were feverishly doing it's going to be a total mess

alexlynham20:02:36

modern supply chains even for food rely on JIT all over the place

alexlynham20:02:21

and actually the more prosaic problem is that as a result of this pattern, nobody has tonnes of warehouse space anymore lol

Conor20:02:17

I was working on the country's #1 Brexit related IT project

Conor20:02:23

It is going to be an absolute shambles

Wes Hall20:02:58

All true, but then the whole Y2K thing also involved quite a lots of this stuff. It wasn’t so much that it wasn’t a problem, just a lot of people fixing the problems. I think it’s what we do. It’s fairly clear now that we’re crashing out. They’re not going to get a deal passed. I’m just not sure I buy the idea that NI is going to immediately collapse back into violence, starving in the streets, martial law etc etc. I guess we’re going to find out. Hope you guys don’t get to tell me, “told you so”.

Conor20:02:18

Well, fixing things would probably involve going back in time and not paying IBM a lot of money for a Dutch customs system that doesn't work properly and they aren't contractually obliged to make work 😉

Wes Hall20:02:04

Fair enough. Perhaps my hopeless optimism will be shown up for what it is. I suppose we are going to find out.

otfrom20:02:02

The impacts of a brexit that hasn't happened yet are already being felt by my friends. So it is already bad for some. So optimism or not doesn't really come into it for me.

seancorfield21:02:38

As someone born and raised in N. Ireland in the 60's, whose family then moved back to the mainland and continued to be "inconvenienced" by The Troubles, I can definitely see all that rising back up again if Brexit screws up the border between the North and the South.

seancorfield21:02:34

And, yes, I too have friends whose companies have been planning around Brexit for quite a while -- and in many cases intending to shift the core of their business out of the UK.

seancorfield21:02:45

All in all, I've seen enough to convince me that a no-deal Brexit will cause chaos all over the country and a lot of financial hardship for many years to come 😞

otfrom21:02:40

Anyway, clojure. I love clojure. I love hugging my code in parentheses.

👍 15
seancorfield21:02:57

Careful @otfrom -- we don't want to get all "on-topic-y" now, do we?

otfrom21:02:03

Desperate times. Desperate measures.

otfrom21:02:51

Those libs that use spec things for coercion look cool. Have you tried any yet?

Wes Hall21:02:18

Point taken chaps </brexit> 😉

Wes Hall21:02:08

Oh, I get to be unpopular in an ontopic way too... 😉. Type coercion like this makes me nervous. Shades of early browser, "This HTML is invalid, but i'll guess what you might have meant".

Wes Hall21:02:24

It's all fun and games, until you start multiplying phone numbers 🙂

Wes Hall21:02:40

That said, you probably shouldn't concatenate them either, I suppose.

seancorfield21:02:04

Has anyone tried out the spec2 work from GitHub? https://github.com/clojure/spec-alpha2

seancorfield21:02:25

I know @borkdude is testing against it (as are we at World Singles Networks).

mccraigmccraig21:02:14

@wesley.hall coercion is ace when you have a JSON wire format containing objects with dates and uuids and other types which JSON can only represent as strings. I'm pretty sure it's also possible to abuse it badly

Wes Hall21:02:26

@mccraigmccraig Yeah, fair point. I also just wrote an edn tagged literal reader that uses edn/read-string to effectively coerce... so i'm a bit of a hypocrite. You're right though, it's the scope for abuse that concerns me really. Generally, rejecting bad data > coercing bad data, but for formats that don't support a sensible set of common datatypes (like, as you say, json), I can see how this is handy.

mccraigmccraig21:02:21

if only clojure implicitly converted its arguments to the required type, that would be so cool*

Wes Hall21:02:47

Haha! Yup. Exactly what I mean. "This library uses coerce and fdefs to....". You know it's coming.

otfrom21:02:38

Usually I'm doing this coercion to a stream of records and I want it to coerce or give me all the failures so I can report back.

Wes Hall21:02:56

@otfrom I feel like I would want that "or" to be an "and". Seems like any time you have to coerce input data you'd definitely want to check that somebody hadn't given you nonsense data. Admittedly, if somebody has put "age" where "salary" is supposed to be, you're not going to catch that anyway since they are both going to be ints, but at least if they give you a phone number where salary is supposed to be, you're going to get a big fat error if you don't try to coerce. I think I have more faith in brexit than in external data quality 😉 (sorry, couldn't help myself).

otfrom21:02:09

I have no faith in external data or brexit. I want more than just an int check on my coercion. 11 digit ages for humans don't make sense nor do 5 digit indoor home temperatures. So there are lots of checks to do which is why I'd like to reuse some of the code if possible.

otfrom21:02:16

I'm happy to do them as separate steps too, but I'd like to be able to specify for a string yay can be turned into an age for a human.

seancorfield22:02:47

We do minimal coercion but it is specifically at that level: string input -> spec conforms it to a number in the acceptable range, else ::s/invalid

Wes Hall22:02:11

Fair enough. I suppose basic type conversion is not terrible provided you apply an actual spec to the coerced values as you say. It does now strike me that perhaps such a coercion system shouldn't be based directly on spec. Obviously the number of specs that can be coerced to is a rather small subset of possible specs. It's for basically this reason that I have used edn/read-string in one such recent case. This was essentially to allow for configurations parameters given through environ (always strings) to be used as things like port numbers. edn/read-string does pretty good, simple type conversion. Though, of course, not explicit. If the string contains all digits, it will happy convert it to a number whether you intend that or not.... so I guess I broadly get it.

Wes Hall22:02:56

Actually, based on this thought train I might even change my edn tags from #env to #env/int etc...

dotemacs22:02:42

Saw your @mccraigmccraig @rickmoynihan discussion about git pick axe from Friday: https://clojurians.slack.com/archives/C064BA6G2/p1549644699170900 and figured you should know about this little gem, where you can narrow down commits related to a particular Clojure function: https://twitter.com/i/web/status/1058507342830923776

rickmoynihan23:02:41

Thanks — I knew about magit-log-buffer-file but didn’t mention it as we weren’t talking magit — I didn’t know about the magit-trace-definition though which is totally awesome! Thanks for sharing. magit never fails to amaze me.

👍 5
mccraigmccraig10:02:12

that's some black magic @U3SG7RX7A!

🙂 5