Fork me on GitHub
#clojure-uk
<
2020-04-08
>
dharrigan06:04:45

Good Morning!

Jakob Durstberger07:04:32

Morning 🙂 Can’t wait for the long weekend!

Conor07:04:02

@alex.lynham I use SDKMan for managing various installed JRE/JDKs

alexlynham07:04:58

okay, I'll have a look at that too :thinking_face: for now I've stuck 11 on

rickmoynihan08:04:55

I use zulu JDK 11 and 8 for some stuff that needs it — haven’t seen SDKMan, but have been using jabba which works quite well… though SDKMan might well be a bit better, it doesn’t look like there’s much difference — though it might be useful at times to be able to get maven etc through it, it’s not something I need a lot.

dominicm08:04:02

On Linux, many package managers have an "alternatives" system. Some of them are able to do the same thing as sdkman without anything special.

rhinocratic09:04:04

Using OpenJDK 11 here (Linux).

flefik13:04:54

I’m in a golang training session now and for the remainder of the week. With every example they produce I just think *WWCD`? What would Clojure do? Every single example has been at least 50% shorter in Clojure. Sometimes there’s an obvious one-line solution. Golang is just bad.

Ben Hammond13:04:18

are you going to have to use it?

flefik08:04:46

sadly yes, it’s becoming golang only shop now so gotta get in line and put my little gopher hat on

Ben Hammond11:04:14

where is the it of which you speak?

Ben Hammond11:04:33

and how did they arrive at such a reckless decision ?

Ben Hammond11:04:08

(and just because they currently intend to become a go-lang only shop, doesn't necessarily mean it will work out that way...)

flefik14:04:16

> where is the it of which you speak? I work at Coinbase. > and how did they arrive at such a reckless decision ? It used to be a multi-lang shop with one office doing clojure, one office doing mostly javascript, one office doing mostly golang and the main office writing code in ruby. At some point they decided to drop some products, so clojure was cut (the entire office was let go in fact), and the javascript people migrated to golang, so now there are effectively only two languages used actively. So as of now all of our services like networking libraries, deploy pipelines etc etc are maintained for both golang and ruby and that’s quite expensive, especially considering our extreme security practices. Additionally the golang cabal has just proven to be significantly more productive and generating stable services, so the decision has been made to only build in golang from now on. It makes sense in that context. > (and just because they currently intend to become a go-lang only shop, doesn’t necessarily mean it will work out that way...) (edited) I think it’ll probably happen. They’re usually quite good at following through on these initiatives. Our infra team is driving most of it and also maintain most shared libs that benefit the most from dropping ruby support.

folcon13:04:10

Is there a perf benefit? (just trying to see if there’s an upside)…

guy14:04:41

morning all

8
thomas14:04:53

I guess one upside GoLang wise it is quite easy to deploy as I understand it... you compile it and the binary includes everything. No classpath shenanigans. (Uberjar solves most of those problems of course)

👀 4
guy15:04:26

sounds cool

jasonbell15:04:29

I managed to upset every GoLang dev at work with (slurp "/path/to/my/file")

😂 12
Conor15:04:09

Go is the single most cursed plang I can think of, yea, even above MUMPS

😂 4
dharrigan15:04:53

I like Clojure 😉

mccraigmccraig16:04:07

i want to deep-merge a map with a mix of both nested-map values and simple values - so (X {:foo 10 :bar {:baz 20}} {:foo 15 :bar {:blah 30}}) => {:foo 15 :bar {:blah 30 :baz 20}} what's a good way to do that ? merge-with with a type-sensitive merge fn ?

mccraigmccraig16:04:45

like (merge-with (fn [a b] (if (map? a) (merge a b) b)) {:foo 10 :bar {:baz 20}} {:foo 15 :bar {:blah 30}})

dominicm16:04:58

I'd write that

😄 4
rickmoynihan16:04:05

@mccraigmccraig Looks good to me. If you want something fancier there is also meta-merge which is pretty neat, especially for merging config values: https://github.com/weavejester/meta-merge

mccraigmccraig17:04:51

ah, that's nice @rickmoynihan - this is a config map as it happens

rickmoynihan17:04:00

I’ve found it’s almost perfect for layering config / profiles /environments etc

rickmoynihan17:04:51

though you can certainly overuse it if you’re not careful

flefik08:04:46

sadly yes, it’s becoming golang only shop now so gotta get in line and put my little gopher hat on