Fork me on GitHub
#clojure-europe
<
2023-03-23
>
ray07:03:49

Good morning (2/2 limited edition series)

❤️ 4
dharrigan12:03:06

Anyone from metabase here?

thomas13:03:12

very briefly... looked pretty cool IMHO.

slipset14:03:05

Not here but @U42REFCKA is there.

borkdude13:03:12

^:morning {}

❤️ 2
lread13:03:15

{:morning true}

borkdude13:03:48

(plist-get '(:morning true) :morning)

emacs-spin 10
Ben Sless13:03:54

(l/== morning 'good)

reefersleep13:03:16

something from core.logic?

lemuel14:03:51

morning = afternoon;

😨 8
😄 2
reefersleep14:03:22

resists the urge to say “Good morning, Mr. Bond”

reefersleep14:03:47

How often do you get stuff like that?

Daniel Craig15:03:19

Haha all the time

Daniel Craig15:03:39

And it's always bond, not Benoit Blanc or any other characters

mccraigmccraig15:03:31

@U0AQ3HP9U you went and said it!

reefersleep16:03:30

Yes, my sentence betrayed itself 😬 😳

😂 6
thomas08:03:29

yup, I have been thinking the same thing for a long time. But good to know that Bond is a Clojure user 🙂

thomas08:03:28

At one time there was a Michael Douglas and Sharon Stone working for IBM :thinking_face: .

mccraigmccraig17:03:24

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

borkdude17:03:31

@mccraigmccraig I noticed that @lilactown also released a new library around signals, recently in #C06MAR553

mccraigmccraig17:03:38

oh, i didn't see that @borkdude - would that be https://github.com/lilactown/flex ?

2
dharrigan17:03:34

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...)?

seancorfield17:03:20

That's expanded by the reader so ::baz only exists in source form.

seancorfield17:03:48

I suspect you could use ns-aliases and look for the namespace portion of the key and find out it's alias...

seancorfield17:03:11

...this is purely for logging?

seancorfield17:03:44

(remember :foo.bar/baz could be a different :: in each ns it is used)

seancorfield17:03:31

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.

seancorfield17:03:02

So I think the TL;DR is "no" 😄

dharrigan17:03:05

yes, purely for logging 🙂

dharrigan17:03:19

Thanks Sean 🙂

borkdude18:03:17

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}

Rachel Westmacott09:03:12

In your specific example then the hacky fix is (str "::" (name kw)) . But it's (obviously) a lossy conversion for display purposes only, right?

dharrigan09:03:36

Yes, just for display purposes (to output in a log file)