This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-30
Channels
- # babashka (46)
- # beginners (234)
- # bristol-clojurians (4)
- # cider (7)
- # clj-kondo (39)
- # cljdoc (8)
- # cljs-dev (10)
- # cljsjs (10)
- # cljsrn (24)
- # clojure (84)
- # clojure-brasil (7)
- # clojure-europe (12)
- # clojure-germany (4)
- # clojure-italy (3)
- # clojure-nl (41)
- # clojure-spec (17)
- # clojure-uk (66)
- # clojurescript (64)
- # conjure (161)
- # cursive (12)
- # data-science (45)
- # datomic (20)
- # devops (11)
- # docker (2)
- # duct (9)
- # events (7)
- # figwheel (1)
- # figwheel-main (20)
- # fulcro (32)
- # graalvm (5)
- # helix (82)
- # jackdaw (9)
- # jobs-discuss (19)
- # kaocha (11)
- # local-first-clojure (1)
- # malli (6)
- # meander (3)
- # nrepl (12)
- # off-topic (2)
- # other-lisps (15)
- # pathom (14)
- # rdf (6)
- # re-frame (8)
- # reactive (1)
- # reagent (5)
- # reitit (4)
- # rum (3)
- # shadow-cljs (77)
- # spacemacs (3)
- # sql (9)
- # test-check (31)
- # tools-deps (13)
- # vim (62)
- # xtdb (18)
mawning
So, question. I'm generating several "reports" (let's say maps for now) that are the results of hitting a database with queries. The queries are standalone and thus can be done in parallel.
(let [report1 (future (report-service/report1))
report2 (future (report-service/report2))
report3 (future (report-service/report3))]
{:report1 (deref report1 5000 nil)
:report2 (deref report2 5000 nil)
:report3 (deref report3 5000 nil)})
Looks good to me! Same approach taken here https://github.com/reborg/parallel#plet (my small lib)
Morning.
As someone who uses Spring (for my Kotlin work). I'm super happy that finally they've come to their senses and dropped the horrible naming stragegy they were using:
Spring Boot is very productive - although, one tends to end up as a "Spring" developer rather than a Java/Kotlin developer
heh. that song still puts a smile on my face
@dharrigan As someone who’s never used spring, what does it give you and what’s the tradeoff?
It gives quite a lot (talking mostly about spring boot here), full object lifecycle management, mostly it's all about IoC and dependency injection
spring boot comes with a lot of "starters" out of the box - for example, do you want to use kafka - just add spring-cloud-starter-stream-kafka to your deps
and it pulls it all in, configures appropriate listeners and does all the marshalling for you
so, it basically gives an opinionated way of doing things, hides all the complexity but exposes SPIs and hooks if you need to modify
I used to use it a lot when it was all XML configuration, and I was a fan (after all, Java needed something for dependency injection). I returned to it after a break of a couple of years, and now there's way too much "action at a distance" and aspect-oriented "magic". It now seems to hide the application structure rather than documenting it.
I personally don’t see the issue with magic as long as you can dig a little and find out what it’s doing, if you can’t then it’s less, here are a bunch of sane defaults for various use cases and more I’m just going to try and always guess what you want. The latter can be really bad :(…
aspect-oriented as in modifying the classfiles to add in before/after/around method interceptors according to some annotations or recipe ?
Yes - at least I assume that's how it's being done, since annotations abound. I no longer feel that I know what I'm doing with it! Spring was increasingly heading in that direction in the later XML days.
i played with some AOP stuff which did that back in the bad old days... i found i didn't like it much, in a similar way to how i don't much like ruby metaprogramming - it makes it harder to get an understanding of how control and data is flowing in a program
I quite agree. Not a rubyist myself, but I had similar qualms about Groovy. It's by no means a bad language, but it allows one to do terrible things whose causes will be hard to discover.
Wasn’t that approach supposed to be for pulling out cross cutting concerns such as logging etc from core business logic?
I believe that was the idea, originally.
Spring was sooo much better the crappy J2EE stuff that it replaced but that was a long time ago now it seems that it's gone some way to turning into that crappy J2EE stuff
for me it boiled down to the question > does it make me do things that I don't want to do? like force me to subclass their concrete class, or conform to their opinion about how to structure the classes and Spring (mostly) didn't boss me around
True - it often provided helper classes that you could extend_,_ but there was usually a non-invasive alternative.