This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-02
Channels
- # announcements (2)
- # aws (7)
- # babashka (47)
- # beginners (54)
- # biff (6)
- # calva (14)
- # clojure-europe (7)
- # clojure-germany (2)
- # clojure-japan (4)
- # clojure-norway (5)
- # datalevin (1)
- # deps-new (13)
- # helix (5)
- # hoplon (1)
- # hyperfiddle (12)
- # introduce-yourself (6)
- # joyride (1)
- # malli (2)
- # off-topic (21)
- # polylith (11)
- # re-frame (3)
- # reitit (8)
- # remote-jobs (1)
- # scittle (25)
- # shadow-cljs (20)
- # vim (19)
- # xtdb (4)
I may have encountered some unexpected behavior in biff/select-ns-as
. I discovered that if the ns-from
argument to select-ns-as
has a .
in it, like foo.bar
below, the map it returns will exclude all the keys that don't have the ns-form
namespace. For example:
(select-ns-as {:foo/a 1, :foo.bar/b 2, :baz/c 3, :buzz.aldrin/d 11} 'foo.bar 'q-bert)
;; => #:q-bert{:b 2}
Which I don't think is what it's meant to do. It is, however, fortunate that it did this, because it helped me to realize I was leaning a bit heavily on rather.long.namespaces/
that really didn't need to be all that elaborate.a bit like select-keys
(does it not do that if ns-from only has a single segment?)
Oh, ha! I've been using it wrong all along. Or rather, until now I was using it with the wrong assumptions in places where my wrong assumptions didn't matter.
Looks like I'm the April Fool, today. But in better news, I think this means I have other, more critical uses for it.
🎅 2