This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-23
Channels
- # announcements (2)
- # babashka (25)
- # beginners (33)
- # biff (13)
- # calva (13)
- # clerk (82)
- # clj-commons (3)
- # clj-kondo (8)
- # clj-on-windows (23)
- # cljdoc (6)
- # clojure (16)
- # clojure-belgium (1)
- # clojure-dev (58)
- # clojure-europe (53)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-uk (2)
- # clojurescript (17)
- # core-async (5)
- # cursive (6)
- # datahike (1)
- # datomic (8)
- # emacs (25)
- # etaoin (21)
- # events (4)
- # graalvm (33)
- # honeysql (7)
- # hyperfiddle (1)
- # lsp (49)
- # luminus (4)
- # malli (18)
- # off-topic (63)
- # reagent (11)
- # releases (1)
- # shadow-cljs (200)
- # timbre (1)
- # tools-build (17)
maaning
morning
Good morning!
Morning ☕
Not here but @U42REFCKA is there.
@U11BV7MTK as well
morning!
something from core.logic?
unification
or whatever
Good morning
resists the urge to say “Good morning, Mr. Bond”
How often do you get stuff like that?
Haha all the time
And it's always bond, not Benoit Blanc or any other characters
@U0AQ3HP9U you went and said it!
yup, I have been thinking the same thing for a long time. But good to know that Bond is a Clojure user 🙂
At one time there was a Michael Douglas and Sharon Stone working for IBM :thinking_face: .
well that was fun - a bit of hacking and i have a react useReducer
based state-management thing which works like a very simplified re-frame, but allows for async event handlers and avoids awkward event chaining
@mccraigmccraig I noticed that @lilactown also released a new library around signals, recently in #C06MAR553
oh, i didn't see that @borkdude - would that be https://github.com/lilactown/flex ?
Say you have a namespaced key, i.e., :foo.bar/baz
is there a way to shorten it back to ::baz
for display purposes (the namespace can be quite long...)?
That's expanded by the reader so ::baz
only exists in source form.
I suspect you could use ns-aliases
and look for the namespace
portion of the key and find out it's alias...
...this is purely for logging?
(remember :foo.bar/baz
could be a different ::
in each ns it is used)
So :foo.bar/baz
used in quux.wibble
isn't going to shorten to anything, unless there's an alias for foo.bar
to something shorter.
So I think the TL;DR is "no" 😄
clojure does have a way to shorten printing a map with common namespace keys, which is on by default
#:foo.bar{:baz 1 :quux 2}
In your specific example then the hacky fix is (str "::" (name kw))
. But it's (obviously) a lossy conversion for display purposes only, right?