Fork me on GitHub
#clojure-europe
<
2022-11-30
>
pez07:11:21

Good morning! I slept like a baby.

👶 2
javahippie07:11:20

Our son slept like a Baby, too, but I guess we mean different things by that 😅

😂 1
pez07:11:55

Haha, I wonder who minted this expression!

pez07:11:13

I didn't see that one coming. 😂

1
borkdude08:11:47

I didn't, I was all hyped up from our presentation ...

pez08:11:15

I was too! I wound down by having a Huddle-chat with a friend from Texas that I've met on this slack.

grav08:11:17

Morning!

otfrom08:11:30

morning

👋 1
simongray08:11:08

morning

👋 1
borkdude09:11:36

I think the #C03DPCLCV9N presentation went super last night, but I'm super fried right now. I slept pretty badly because I was hyped by being on the alert for 2 hours straight! I'm super happy to do this and 1-2 hours is managable, but this re-affirms my decision to not do the #CLX41ASCS ClojureStream workshop myself which involves being online for half a day or a whole day straight. I'm happy that @rahul080327 stepped up to do that :) 👏

6
lispyclouds09:11:21

It's part of my hidden agenda to get more of the infra/ops folks into clojure and vice versa too 😉

babashka 2
reefersleep09:11:57

I’ve been watching some Coding Train videos to learn about aspects of visual programming with p5js. Damn, that guy is such a joy to watch. Smiling, upbeat, speedily live codes easily replicable code mostly without hitches and is great at explaining things along the way.

💯 1
reefersleep09:11:02

Anyone know of something similar, but for AWS? Everything I’ve seen has been so dry.

reefersleep09:11:19

But then, the topics are very different in terms of dryness to begin with (imo)

slipset09:11:09

On the topic of great things, Richard Feldmans Software unscripted podcast is just great. He has brought in some super guests, both from the static and the dynamically typed languages. Very entertaining.

🙏 1
borkdude09:11:32

Agree, I've been listening to this frequently

slipset09:11:11

The episode with @viebel was super interesting.

simongray09:11:03

Thanks @slipset gonna add it to my long list of software development podcasts I never find the time to listen to 😅

😂 1
genRaiy10:11:06

Wood morning

😂 1
🪵 2
otfrom10:11:59

I'm not sure if @jackrusher's 👋 was a wave, a high five, or a quick morning slap about the face 🙂

reefersleep11:11:56

“The sound of one hand clapping”

😂 2
dharrigan13:11:21

Say you are using a threading macro and you want to print out the value somewhere in the chain, but keep passing the value along, is there a good answer for that?

mpenet13:11:20

(doto prn)

mpenet13:11:30

(-> foo (doto prn) bar baz)

reefersleep13:11:24

Yeah, I’ve resorted to that more, recently. For ->>, I do in-place custom fns like (fn [x] (println "X is:") (clojure.pprint/pprint x) x). It feels kind of silly, because I keep rewriting those fns in hand all the time.

reefersleep13:11:20

When I first started using Clojure, I wondered why the print fns returned nil. Actually, why can’t they just return a vector of their args? It’d be really handy in a lot of situations.

licht1stein16:11:53

It's trivial to implement. That's the power of Clojure.

(defn print-> [& args]
  (apply print args)
  args)

reefersleep09:12:10

Yeah, I know! Exactly why I don’t understand why the built in fns don’t do it. Take swap! for example. It is also side-effectful, so it might as well also return nil. You can just deref your atom afterwards. Could that be any more trivial? Yet swap! returns the current value. Which I appreciate; I often want to use it immediately. Here’s prn

(defn prn
  "Same as pr followed by (newline). Observes *flush-on-newline*"
  {:added "1.0"
   :static true}
  [& more]
    (apply pr more)
    (newline)
    (when *flush-on-newline*
      (flush)))
Here’s prn as I’d like it
(defn prn
  "Same as pr followed by (newline). Observes *flush-on-newline*"
  {:added "1.0"
   :static true}
  [& more]
    (apply pr more)
    (newline)
    (when *flush-on-newline*
      (flush))
    more)

reefersleep09:12:46

Could it be any more trivial? chandler-face

licht1stein09:12:36

I really don't see a problem. If you want them to return values — make your implementations and use them :) For me personally the current way is fine. For example in cases like this:

(if foo foo (println "No foo"))
You don't want println to return values, because that would make the result truthy.

reefersleep12:12:49

I mean, I could implement my own language if I were dissatisfied enough 🙂 It just seems that some fns in Clojure core returns the input, and some don’t, and there’s no good reason (imo) for the discrepancy. I don’t understand your reasoning. The result of swap! is a sideffect and a truthy result. The result of prn is a sideeffect and a falsy result.

reefersleep12:12:12

Clojure is great, btw, this is just a very minor annoyance. And there are many examples of design choices where Rich has been very conservative, which I think I get. There’s a point in making the core concise, and not everything and the kitchen sink. And some things are the way they are because of e.g. performance optimizations, I get it. In this case, it seems that it might as well have returned more - it doesn’t hurt performance (I think?), and it’s congruent with e.g. swap.

licht1stein12:12:36

I completely disagree, but I'm done arguing. I don't see this as an annoyance, even a minor one. It would be strange for print to return a value.

reefersleep12:12:00

I’ll agree to disagree

👍 1
dharrigan13:11:17

Quoteth Alex: Decided this is not worth doing - just wrap in doto` as the patch does.`

slipset13:11:59

I’ve actually waited for this. So I guess we need an util/tap->

1
vemv22:11:46

doto feels perfect to me - and using it invites you to use it more often in other situations

reefersleep08:12:22

just need a doto-last for those ->>’s