Fork me on GitHub
#clojure-europe
<
2022-02-17
>
kardan06:02:53

Good morning

seancorfield06:02:41

👋:skin-tone-2:

dharrigan06:02:35

Good Morning!

reefersleep06:02:28

Good morning 🙂

pez06:02:55

God morgon.

thomas08:02:50

Good morning

Jakub Holý (HolyJak)09:02:59

Morning, good folks of Europe!

❤️ 4
mccraigmccraig09:02:31

good mudning!

😹 5
🥳 2
otfrom12:02:12

why do I love fnil so much?

thomas12:02:21

because you are a minimalist?

borkdude12:02:33

fnil fnilling fnils!

simple_smile 1
reefersleep12:02:36

because point free programming is nice? 🙂

reefersleep12:02:42

(and not pointless)

Ben Sless13:02:14

It solves the value of nothing problem 😉

otfrom13:02:48

I suppose I'm partial to partial as well, even if it is slower that #(,,,)

simongray13:02:41

I can’t really think of a situation where I’d rather use fnil than or . What do you guys use it for?

otfrom14:02:19

when trimming a string quite often (fnil s/trim "")

otfrom14:02:13

I suppose I could do (s/trim (or s ""))

slipset15:02:31

(update foo :bar (fnil conj []) whatever) or some such

👍 1
borkdude15:02:10

I'm using fnil conj a lot

slipset15:02:51

I was at some point playing with the idea of a talk about these fns, comp, fnil, some-fn etc

slipset15:02:15

So basically, the fns in core which return fns.

otfrom15:02:37

yeah, fnil conj to get the right base type for a collection is a good one

👍 1
reefersleep12:02:13

fnil conj is also my only repeated example of fnil usage.

reefersleep12:02:21

I’d like to use it more, but haven’t seen use cases.

seancorfield05:02:03

I checked our codebase at work: fnil conj is pretty common to get the right base type, and fnil into for the same reason, but far and away the most common for us is (fnil inc 0) (and a related number of (fnil + 0)).

🙏 2
simongray07:02:35

Thanks for the data-driven answer, Sean 😄

Rachel Westmacott11:02:02

I feel like quite a few of these fnil use-cases could be avoided (although that might not be desirable) by doing something with transduction - i.e. using a reducing function that produces its own initial value on the zero-arity call.

otfrom12:02:17

yeah, I like transduce for that. I'm often using this when doing an assoc, or when I'm doing something like frequencies. I should think more about it though.

javahippie12:02:14

Hope you all are unharmed by the storm. Here it was only a trash can falling over.

lread12:02:37

fiis niebubf

otfrom13:02:50

mostly happened south of us. Some risk of snow tomorrow

ordnungswidrig13:02:52

Nobody is playing "Sturmwichteln" over here 😌 . ("Storm Secret Santa" 😉 )

javahippie14:02:50

Had to look it up, really like it

genRaiy14:02:01

good morning

mpenet16:02:38

"morning" (!?)

mpenet16:02:47

somebody is traveling

otfrom16:02:15

we're all hurtling through space

🌍 4