clojure-uk

A place for people in the UK, near the UK, visiting the UK, planning to visit the UK or just vaguely interested to randomly chat about things (often vi and emacs, occasionally clojure). More general the #ldnclj
jiriknesl 2021-03-02T05:53:46.150900Z

Ok, thank you. I remember using Dreamweaver too. It was very advanced for those times.

dharrigan 2021-03-02T07:26:56.151100Z

Good Morning!

djm 2021-03-02T07:53:00.151300Z

๐Ÿ‘‹

alexlynham 2021-03-02T08:02:31.151400Z

morning

danm 2021-03-02T08:51:36.151700Z

Morning

danm 2021-03-02T08:52:28.152700Z

I feel rough as, horrible sore throat, which I don't know if it's due to the cold I seem to have or the covid test I went for yesterday as a precaution where I had to rub a brush on my tonsils, which are the main thing hurting (it was negative)

dharrigan 2021-03-02T08:55:11.152900Z

Probably that

dharrigan 2021-03-02T08:55:24.153200Z

Too enthusiastic ๐Ÿ™‚

dharrigan 2021-03-02T08:58:48.153300Z

dharrigan 2021-03-02T09:01:27.154400Z

Say you had to transform this [:a :b :c :d] to this [[:a :b] [:b c:] [:c :d]] Thoughts?

mccraigmccraig 2021-03-02T09:07:32.154600Z

(->>  [:a :b :c :d] (partition 2 1) (mapv vec))

dharrigan 2021-03-02T09:08:44.154900Z

lurvey

Conor 2021-03-02T09:26:48.155100Z

It's interesting that the Kotlin equivalent is list.zipWithNext(). I wonder if people tend to do it more in Kotlin land, enough to warrant a library method?

thomas 2021-03-02T09:30:30.155300Z

morning

djm 2021-03-02T09:31:33.155400Z

It's useful for comparing things with what comes next in a list/string

2021-03-02T10:23:19.155700Z

Morn'

alexlynham 2021-03-02T10:29:33.155800Z

i feel like you could do that with juxt but my brain isn't in the zone rn

2021-03-02T10:34:17.156300Z

You'd still have to partition right? As juxt works at an single element level?

2021-03-02T10:34:34.156600Z

I'm assuming that you want to map the juxt

alexlynham 2021-03-02T10:36:45.156900Z

ahh yes cos you need the prev element

alexlynham 2021-03-02T10:36:47.157Z

you're right

2021-03-02T16:05:10.158200Z

@dharrigan Also works as a transducer if you use partition-all (into [] (partition-all 2) [:a :b :c :d]) If you want this form because youโ€™re wanting to build a map you can also skip the intermediate collections and do: (into {} (partition-all 2) [:a :b :c :d])

dharrigan 2021-03-02T16:07:02.158400Z

noice!

dharrigan 2021-03-02T16:08:19.158600Z

Although the form is slightly different

dharrigan 2021-03-02T16:08:38.158800Z

(into [] (partition-all 2) [:a :b :c :d]) ;; [[:a :b] [:c :d]]

dharrigan 2021-03-02T16:09:15.159100Z

(->> [:a :b :c :d] (partition 2 1) (mapv vec)) ;; [[:a :b] [:b :c] [:c :d]]

2021-03-02T16:09:20.159300Z

oh sorry didnโ€™t notice you wanted the step

dharrigan 2021-03-02T16:09:26.159500Z

that's okay ๐Ÿ™‚

dharrigan 2021-03-02T16:09:42.159700Z

It was more a thought exercise, rather than something I need right now ๐Ÿ˜‰

mccraigmccraig 2021-03-02T16:45:42.160600Z

i've been working on an effectful lib for clj/s ... not quite ready yet, but if anyone cares to take a look, comments and thoughts are welcome: https://cljdoc.org/d/mccraigmccraig/promisefx/0.0.1.7-SNAPSHOT/doc/readme

dharrigan 2021-03-02T21:00:56.162100Z

I seem to recall someone had a clojure pub/sub framework for sending messages between different (jvm) clojure instances - anyone recall the name?