This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-09
Channels
- # aleph (1)
- # announcements (4)
- # asami (6)
- # babashka (45)
- # beginners (19)
- # biff (3)
- # calva (35)
- # cider (4)
- # clojars (5)
- # clojure (117)
- # clojure-art (3)
- # clojure-denmark (2)
- # clojure-europe (89)
- # clojure-gamedev (5)
- # clojure-nl (4)
- # clojure-norway (17)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (84)
- # conjure (13)
- # datomic (11)
- # emacs (2)
- # figwheel (2)
- # fulcro (16)
- # graphql (5)
- # honeysql (7)
- # introduce-yourself (1)
- # lsp (86)
- # malli (16)
- # music (1)
- # off-topic (2)
- # pathom (14)
- # polylith (28)
- # re-frame (11)
- # reagent (23)
- # releases (1)
- # reveal (19)
- # shadow-cljs (72)
- # spacemacs (13)
- # sql (1)
- # test-check (3)
- # timbre (4)
- # tools-deps (45)
- # vim (18)
Morning! Calva is suffering a period of degraded quality. It really is a big monster I am trying to control...


This is today's fun: https://github.com/BetterThanTomorrow/calva/issues/1585
(And it is also a bit fun, because the test safety net grows as I am chasing the bug down using tests.)
Fixed it now. Will probably release in a moment. Rest of this Calva day will be spent on quality in this area of Calva.
Somewhat cool, https://www.linkedin.com/feed/update/urn:li:activity:6907247965162090496/
Congrats! This means you will have more budget to spend on Clojure OSS as well ;) ;)
My 2015 Macbook Air is deteriorating and I kind of hoped for an update yesterday so I would have a good excuse to buy a replacement. But buying a 2 year old M1 model now ... dunno. I use it for travels and watching TV mostly. My main MBP isn't due for a replacement yet. (I have considered switching from Mac but at the end of the day, for me it's the system with the least amount of friction).
My wife has one of them M1 Air and it sure is a great computer. Maybe you can buy a used one?
The m1 macbook does have 16GB. I guess it’s harder to find a used one with 16GB, though.
I still find it incredible that my personal M1 macbook air performs better than the top of the line 16" intel macbook pro I’m working on now 😛
I guess I could shift the older M1 model to my wife once her Macbook Pro 2015 wears out, she usually only uses it at her desk ...
I am trying to convince myself it's a good buy, but I have a hard time justifying the move for my use
The 16GB Macbook Air is a joy. Unconditional yes for me, the value is the same and the prices will probably go higher with, ahem, the situation (the war in Ukraine).
placed the order ... do you think compiling binaries for M1 are compatible with newer processors for mac, m2, whatever? or does every processor need its own toolchain/CI? that would be quite the struggle
Pretty sure there's only one arch- I haven't seen anything like this (multiple toolchain needs ) previously.
I wondered if I should get the 1TB drive and pay 200 euro more compared to the 512GB one... but for a secondary laptop this is already a pretty luxurious purchase. So I dug down with ncdu
on my old Macbook Air and discovered a lot of junk and now have 200GB free of 512GB, so I guess I'm good with 512GB
It's really nice! Tomorrow daycare is closed so I'm taking the little one to the grandparents for the day. I can put in a day's full coding + meetings without even having the charger with me.
@U04V15CAJ You got it already? Congrats.
Pricy, but very yummy indeed.
I just ordered a pair of headsets with bom microphone at https://www.thomann.de/. Gotta say it was a delightful experience. They answered on the phone immediately and could help me avoid the ones that I were considering and guided me to what I needed. Don't know how it is out there, but in Sweden most e-shopping is horrible. Everything seems broken. Here it was so easy! An extra nice feature was that when the site recognized my e-mail address they offered to send me a login code. Which I then could fill in during checkout without leaving the process.
Thomann is the MVP in germany for all things music & audio. Their physical store is also very nice, almost campus-like
No, more like northern Bavaria
Does anyone here have experience of using the fluid builders in Java from Clojure ... seems like quite the 🤯
MailerBuilder
.withSMTPServer("server", 25, "username", "password")
.buildMailer()
.sendMail(email);
Should work well with thread-first, shouldn’t it? That’s what we did in beginning with testcontainers, before we had a wrapper:
(-> (org.testcontainers.containers.GenericContainer. "postgres:12.2")
(.withExposedPorts (into-array Integer [(int 5432)]))
(.withEnv "POSTGRES_PASSSWORD" pw))
I'm trying but it doesn't quite work like that 😞
(import [org.simplejavamail MailerBuilder])
(-> (MailerBuilder/withSMTPServer "server" (int 25))
(.buildMailer)
(.sendEmail my-mail))
works on my REPLI'm a 🤡
@javahippie I presume that will work with doto
as well as each of those methods just returns the mutated object?
though I suppose only trusting the whatever is returned from the method is a safer bet than expecting the original object in the fluid builder to be mutated
The withSMTPServer returns a stateful builder which would also work with doto, but the “buildMailer” method has a different type as a response.
I have a function lying around that takes class and uses reflection to generate a function taking a map of options in kebab case and builds with it
I'm trying to avoid reflection if possible but still … post the gist :)
I couldn't find it, but this is the gist of it, example for Ben Mane's Caffeine
(let [opts (gensym "opts__")
builder (gensym "builder__")
builder-opts (keep
(fn [{:keys [return-type flags name parameter-types]}]
(when (and
(not (:static flags))
(:public flags)
(<= 1 (count parameter-types))
(= 'com.github.benmanes.caffeine.cache.Caffeine return-type))
[name parameter-types]))
(:members (clojure.reflect/reflect (Caffeine/newBuilder))))
chain
(mapcat (fn [[m [arg]]]
(let [k (csk/->kebab-case-keyword m)
met (symbol (str "." m))]
(if arg
`[(contains? ~opts ~k) (~met (~k ~opts))]
`[(contains? ~opts ~k) ~met])))
builder-opts)]
`(cond-> ~builder
~@chain))
I would guess that doto
would work as well https://clojuredocs.org/clojure.core/doto
The builders return an instance of the builder itself with the new values attached, then it depends if the original object is stateful, or built “on the fly”
yeah, I suppose it all depends on whether or not the thing is stateful. I have a feeling your first object is returned after MailerBuilder.withSMTPServer(...
?
thanks @javahippie hero of the hour
If I'm hitting a RESTish API, what is the preferred library nowadays? I think I need to talk to sharepoint
clj or cljs?
I use clj-http for everything and it fulfills all my JSON and Transit needs. But I wonder if there is a CLJ client which makes use of Javas native HTTP client
Good morning!
anyone else seen an issue with records instantiated by a tag-reader in a top-level def
form having a stale class (and so not working with protocols) ?
I came across a really weird error today; no idea if it's related, but it was also a weird behavior with the def
form.
https://clojurians.slack.com/archives/C87NB2CFN/p1646846870791379
hmm - perhaps related - in both cases it seems some compilation has happened in between the evaluation of the body of the def
form version and the call of the 0-args fn version which changes the environment unexpectedly
in your case a concrete method is defined and in my case it looks like a record class is recompiled
gulpfile.cljs! https://github.com/babashka/nbb/blob/main/examples/gulp/gulpfile.cljs
that will let us get rid of some nasty js code in our gulpfiles which serialises js datastructures as EDN (to send to shadow as config)