This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-08
Channels
- # announcements (6)
- # babashka (78)
- # beginners (84)
- # bristol-clojurians (5)
- # calva (50)
- # chlorine-clover (45)
- # cider (14)
- # clj-kondo (18)
- # cljs-dev (2)
- # clojars (2)
- # clojure (387)
- # clojure-android (3)
- # clojure-europe (6)
- # clojure-gamedev (3)
- # clojure-germany (3)
- # clojure-nl (18)
- # clojure-spec (5)
- # clojure-uk (36)
- # clojurescript (8)
- # clojurex (1)
- # conjure (1)
- # css (1)
- # cursive (32)
- # data-science (1)
- # datomic (11)
- # docker (61)
- # duct (17)
- # emacs (7)
- # figwheel-main (3)
- # fulcro (19)
- # jobs-discuss (3)
- # joker (1)
- # leiningen (23)
- # malli (11)
- # mount (6)
- # off-topic (30)
- # pathom (14)
- # pedestal (2)
- # phzr (1)
- # re-frame (11)
- # reagent (3)
- # reitit (5)
- # ring-swagger (3)
- # rum (1)
- # shadow-cljs (113)
- # slack-help (9)
- # spacemacs (16)
- # specter (4)
- # sql (14)
- # vscode (2)
- # windows (3)
- # xtdb (12)
månmån
Morning 🙂 Can’t wait for the long weekend!
@alex.lynham I use SDKMan for managing various installed JRE/JDKs
morning
okay, I'll have a look at that too :thinking_face: for now I've stuck 11 on
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.
On Linux, many package managers have an "alternatives" system. Some of them are able to do the same thing as sdkman without anything special.
Morning.
Using OpenJDK 11 here (Linux).
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.
are you going to have to use it?
sadly yes, it’s becoming golang only shop now so gotta get in line and put my little gopher hat on
where is the it of which you speak?
and how did they arrive at such a reckless decision ?
(and just because they currently intend to become a go-lang only shop, doesn't necessarily mean it will work out that way...)
> 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.
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)
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 ?
like (merge-with (fn [a b] (if (map? a) (merge a b) b)) {:foo 10 :bar {:baz 20}} {:foo 15 :bar {:blah 30}})
@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
Also from weavejster’s arsenal, deep-merge
from medley
: https://github.com/weavejester/medley/blob/a1fef4112fec911d11f862701025bba04022054b/src/medley/core.cljc#L213
ah, that's nice @rickmoynihan - this is a config map as it happens
I’ve found it’s almost perfect for layering config / profiles /environments etc
though you can certainly overuse it if you’re not careful
Also from weavejster’s arsenal, deep-merge
from medley
: https://github.com/weavejester/medley/blob/a1fef4112fec911d11f862701025bba04022054b/src/medley/core.cljc#L213
sadly yes, it’s becoming golang only shop now so gotta get in line and put my little gopher hat on