Fork me on GitHub
#off-topic
<
2021-07-27
>
souenzzo13:07:41

dear clojure community please not use (use cool.lib) or :refer :all in your libraries tutorials. it is really hard to beguinners (and for me) to understand which commands comes from the library and what is from clojure.core.

💯 15
☝️ 18
2
borkdude13:07:47

I fully agree and so does clj-kondo :)

fogus (Clojure Team)13:07:25

Does kondo offer a recommendation?

fogus (Clojure Team)13:07:17

something like "have you considered instead (:require [cool.lib :as cl])?

borkdude13:07:54

yes, it will even suggest you which vars you should :refer if you want to use refer. if it has enough information about the "used" library

🙂 2
borkdude13:07:19

this information is provided when you have already linted that library using clj-kondo --lint $(clojure -Spath) and have .clj-kondo directory

souenzzo14:07:13

Kondo does that on code. I'm talking about tutorials/documentation. It do not run on cljdoc/markdown/blog post. yet 👀

emccue14:07:16

same advice as python basically

emccue14:07:05

strongly prefer requiring namespace as some intelligible alias and using things through that alias

ericdallo14:07:43

@borkdude I think we can even have a code action (I think someone mentioned that somewhere) to actually replace the :refer :all with the suggested refers in clojure-lsp

borkdude14:07:35

@ericdallo good idea, perhaps as part of lsp-organize-imports ?

ericdallo14:07:13

yeah, we 'd need a flag for that and maybe some ns pattern to exclude from that, but LGTM

borkdude14:07:21

if people don't like the warnings from clj-kondo they probably would already have configured clj-kondo like that

ericdallo15:07:52

yeah, good point

seancorfield17:07:06

Just watched a preso by Charity Majors and she mentioned her "Observability Engineering" book, in prerelease from O'Reilly, so I thought I'd maybe buy it... but it looks like O'Reilly doesn't actually sell ebooks/prerelease books any longer? I love buying ebooks in beta/prerelease from PragProg and Manning... and I'm sure I used to be able to do that with O'Reilly too...

seancorfield18:07:41

There's a #music channel 🙂