clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
2021-06-28T05:59:52.294700Z

Morning

djm 2021-06-28T06:14:39.294900Z

👋

pez 2021-06-28T06:17:17.295200Z

Good morning everybody!

jasonbell 2021-06-28T06:44:06.295400Z

Moring

jasonbell 2021-06-28T06:44:25.295800Z

s/Moring/Morning/g;

dharrigan 2021-06-28T06:45:43.296Z

Good Morning Everyone! 😄

javahippie 2021-06-28T06:50:29.296200Z

Morning!

slipset 2021-06-28T07:39:14.296400Z

Morning!

borkdude 2021-06-28T07:48:11.296600Z

moarning

2021-06-28T08:03:20.296800Z

God morgen

RAMart 2021-06-28T08:13:58.297Z

👋

agigao 2021-06-28T08:24:58.297600Z

Morning!

reefersleep 2021-06-28T09:11:01.298800Z

Good morning 😊

reefersleep 2021-06-28T09:11:43.299100Z

Godmorgen!

thomas 2021-06-28T10:46:16.299600Z

morning, slowly recovering from a really bad cold.

simongray 2021-06-28T10:47:06.300300Z

morning

raymcdermott 2021-06-28T11:18:28.300800Z

morning

raymcdermott 2021-06-28T11:23:45.304Z

@jasonbell some regex pro tips: ... s/r/rn/ would do it ... no need for the /g ... yes I know, I'm the worst.

pez 2021-06-28T11:30:01.304400Z

I took it as the regexp was installed from now on.

pez 2021-06-28T11:32:12.306Z

If I have a function taking arguments [x y], how can I transform it to a function taking [y x]? Same function body, I just want to call it with x and y reversed.

djm 2021-06-28T11:35:03.306700Z

s/(?<=r)/n/ no need to replace the r with another r 😁

😝 1
borkdude 2021-06-28T11:36:38.308100Z

@pez This would only work for a 2 arg function but is more performant than when you would do it for n args using var-args and apply

(defn flip [f] (fn [x y] (f y x)) 

❤️ 2
borkdude 2021-06-28T11:37:41.309Z

This would the the n-args version:

(defn reverse-args [f] (fn [& args] (apply f (reverse args))))

borkdude 2021-06-28T11:38:42.309200Z

I think this function is called flip in Haskell (so I edited the 2 args version with that name now)

pez 2021-06-28T11:40:46.309700Z

flip, TIL

jasonbell 2021-06-28T12:01:11.315100Z

@raymcdermott I’m fully aware but I do appreciate the reminder, I was covering past mistooks 😉

😂 1
ordnungswidrig 2021-06-28T12:07:29.315600Z

👋

raymcdermott 2021-06-28T12:16:40.318800Z

@jasonbell yeah I figured but thought a little regex frivolity might lighten Monday

❤️ 2
RAMart 2021-06-28T12:27:19.319900Z

Next :clojureD 2021 talk by @mkvlr now online: https://www.youtube.com/watch?v=Gnrh7XOt_84

🔥 6
reefersleep 2021-06-28T21:53:30.321500Z

(I didn’t think about the r/rn bit)