Fork me on GitHub
#clojure-europe
<
2021-11-26
>
slipset07:11:18

morning!

👋 1
dharrigan07:11:03

Good Morning!

anthony-galea07:11:31

Morning 👋

borkdude09:11:11

👋

genRaiy09:11:08

mood noggrin

genRaiy12:11:08

mostly having fun getting Java, tools and Clojure up to JDK17

jm13:11:58

morning 🙂 any particular problems you care to share with us? just did the same exercise a couple of weeks back which was quite smooth and curious about others’ experiences

genRaiy17:11:11

It was pretty simple in the end. It was just a matter of remembering how to install a JDK on Linux and using jenv

genRaiy17:11:35

Which is a constant delight

jm21:11:39

Had the same experience 😊

lread13:11:33

Good morning!

borkdude18:11:26

C'mon. Surely here someone must be able to propose a name?

Jakub Holý (HolyJak)21:11:20

I don't fully get the context 😅 I guess destructuring-key would be too confusing wrt the other?

borkdude21:11:07

perhaps :destructuring-ns?

lread22:11:12

I’d love to suggest some names, but I’m not sure I understand yet either. Can you broaden your example?

borkdude22:11:26

@UE21H2HHD @U0522TWDA These names are for the clj-kondo analysis. The keys end up in the keyword analysis, but the :example/keys keyword doesn't have any field that indicates that this is used for altering the keys destructuring default namespace

lread22:11:04

Ah… ok here’s https://clojure.org/guides/destructuring#_namespaced_keywords for even a bit more context.

borkdude22:11:38

It seems they don't give it a name there

borkdude22:11:10

:keys-destructuring-ns true?

lread22:11:24

I find this common in Clojure, examples are given but things don’t have formal names.

borkdude22:11:21

perhaps there is a spec for it which gives it a name?

lread22:11:47

Ah, that’s a good idea.

lread22:11:47

But I think your :keys-destructuring-ns true is pretty good. Or sometimes Alex calls these qualifiers. As suggested by fns like qualified-keyword?

lread22:11:08

Meh… but its’ being described as qualified with a namespace so ns is probably better.

lread22:11:13

Here’s https://www.cognitect.com/blog/2017/1/3/spec-destructuring. Here Alex describes: > :<ns>/syms [sym ...] - same as :syms, but where ns is used as the namespace for every symbol.

lread22:11:34

Yeah I like :destructuring-qualifier

âž• 1
practicalli-johnny10:11:55

keys-qualified-destructuring assuming it's the same as :keys-destructuring but with a qualified keyword.

borkdude10:11:46

@U05254DQM Thanks. It's about the :example/keys key itself which controls the destructuring of the other names. So it's a kind of modifier

😕 1
practicalli-johnny10:11:14

Not something I understand, sorry.

borkdude10:11:06

@U05254DQM It's about a field in the analysis to indicate that it's that specific keyword node with that syntatical/semantical purpose. https://github.com/clj-kondo/clj-kondo/blob/master/analysis/README.md#data

practicalli-johnny10:11:11

As I understand things, example is the qualifier part of :example/keys and :example/keys is the whole namespace. If I understand correctly, you want a key name to represent the fully qualified namespace of a key underneath the :keyword key (a sub-key) in the output of clj-kondo (hash-map) Wouldn't that sub-key be called :qualified-namespace

borkdude10:11:17

It's not about the keywords in the destructuring part, we want to have a name for the :example/keys key itself in the analysis, so e.g. LSP knows what kind of keyword that is.

borkdude10:11:16

So when you rename things, the :example/keys keyword itself also has to be renamed.