This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-26
Channels
- # announcements (1)
- # aws (6)
- # babashka (1)
- # beginners (109)
- # calva (22)
- # clj-kondo (21)
- # cljsrn (1)
- # clojure (68)
- # clojure-europe (41)
- # clojure-nl (2)
- # clojure-uk (5)
- # clojurescript (7)
- # core-logic (1)
- # data-science (4)
- # datomic (1)
- # events (1)
- # fulcro (25)
- # gratitude (1)
- # juxt (4)
- # keyboards (1)
- # malli (5)
- # minecraft (3)
- # missionary (9)
- # music (1)
- # nextjournal (7)
- # off-topic (7)
- # polylith (31)
- # re-frame (3)
- # reveal (7)
- # ring (11)
- # shadow-cljs (1)
- # spacemacs (4)
- # tools-build (5)
- # tools-deps (5)
- # xtdb (25)
Morning 👋
Good morning!
Good morning!
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
It was pretty simple in the end. It was just a matter of remembering how to install a JDK on Linux and using jenv
morning
I don't fully get the context 😅 I guess destructuring-key would be too confusing wrt the other?
I’d love to suggest some names, but I’m not sure I understand yet either. Can you broaden your example?
@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
See https://github.com/clj-kondo/clj-kondo/blob/master/analysis/README.md#data under :keywords
Ah… ok here’s https://clojure.org/guides/destructuring#_namespaced_keywords for even a bit more context.
I find this common in Clojure, examples are given but things don’t have formal names.
But I think your :keys-destructuring-ns true
is pretty good. Or sometimes Alex calls these qualifiers. As suggested by fns like qualified-keyword?
Meh… but its’ being described as qualified with a namespace so ns is probably better.
https://github.com/clojure/core.specs.alpha/blob/7d67e2f863ea28406f03338a7b92e2026d555062/src/main/clojure/clojure/core/specs/alpha.clj#L41
perhaps :destructuring-qualifier
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.
keys-qualified-destructuring
assuming it's the same as :keys-destructuring
but with a qualified keyword.
@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
Not something I understand, sorry.
@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
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