clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
simongray 2021-04-06T05:58:27.033300Z

morning

dharrigan 2021-04-06T06:05:27.033500Z

Good Morning!

djm 2021-04-06T06:09:51.033700Z

👋

joelkuiper 2021-04-06T06:57:37.033900Z

good morning 🙂

javahippie 2021-04-06T07:32:31.034100Z

Morning!

jasonbell 2021-04-06T07:41:15.034500Z

Morning

pez 2021-04-06T07:46:44.034700Z

Morning!

mccraigmccraig 2021-04-06T07:54:34.034900Z

mawning

ordnungswidrig 2021-04-06T08:18:36.035100Z

Good morning!

borkdude 2021-04-06T08:33:42.037400Z

morning

simongray 2021-04-06T08:34:18.038Z

Today’s task is… trying to wrap some ancient JS code in a Reagent component to make it reactive and just plain usable from ClojureScript. The documentation has been lost to time, the project is abandoned and it’s really meant for static use, but it’s what the stakeholders want, so I’m gonna make an honest attempt 😉

ordnungswidrig 2021-04-06T08:36:06.038500Z

@simongray our prayers are with you. Maybe just secretly reimplement in clojurescript? 😉

simongray 2021-04-06T08:36:18.038700Z

that’s plan B 😉

simongray 2021-04-06T08:37:07.039700Z

well, really it's plan C, because plan A was getting an intern to make a new timeline in Vega, which the stakeholders didn't particularly like

simongray 2021-04-06T08:37:30.040200Z

she loved learning both Vega and Clojure in the 10 weeks I supervised her, though

2021-04-06T08:46:46.040300Z

Morning

thomas 2021-04-06T09:30:38.040500Z

morning

borkdude 2021-04-06T09:40:11.041100Z

babashka now comes with rewrite-clj. this allows you to write tiny scripts and hook them up to e.g. emacs to refactor your code 😊 https://gist.github.com/borkdude/77369ba1b2d0fbd2608a8d12f518ade3

🤘 2
🦜 2
🎉 1
pez 2021-04-06T09:48:31.041400Z

It’s sort of an LSP now 😃

raymcdermott 2021-04-06T10:07:08.041800Z

morning

raymcdermott 2021-04-06T10:18:02.044500Z

@borkdude it's wonderful to see that terminal editors are improving by the inventive use of CLI tools 😝

borkdude 2021-04-06T10:19:18.045200Z

+69!

borkdude 2021-04-06T10:20:54.045600Z

@raymcdermott when will Rich be on? episode 70, or 100?

simongray 2021-04-06T10:21:46.046300Z

As soon as Clojure spec is out of alpha!

raymcdermott 2021-04-06T10:21:57.046700Z

Think of defn as a lazy sequence

borkdude 2021-04-06T10:23:00.047500Z

@simongray Is that another phrasing of: when pigs fly? In Dutch we have a saying like this: "When Easter and Pentecostal are on the same day"

simongray 2021-04-06T10:23:19.047800Z

That was the idea, yeah 😉

raymcdermott 2021-04-06T10:24:22.049100Z

@simongray you’re correct in that case

simongray 2021-04-06T10:25:17.049400Z

RH will surely deliver. Let's just wait.

borkdude 2021-04-06T10:25:43.050500Z

@raymcdermott suggestion for the show: @ericdallo about Clojure LSP.

raymcdermott 2021-04-06T10:26:26.051300Z

Thanks, I’ll add him to the vector

borkdude 2021-04-06T10:26:44.051500Z

at least vectors aren't lazy

😆 2
raymcdermott 2021-04-06T10:26:52.051700Z

💥

borkdude 2021-04-06T10:27:10.052Z

(def attack [])
^ my attack vector

raymcdermott 2021-04-06T10:27:18.052200Z

Lol

pez 2021-04-06T10:44:43.052500Z

omg

lread 2021-04-06T11:23:03.053400Z

Oh! That belongs on mugs and tshirts!

jasonbell 2021-04-06T11:27:37.055300Z

Hmmm so just found out, well I kinda sensed it anyway, that if you give partition a count number that’s greater than the count of the collection it will return an empty set. (I love the REPL). Meaning, for me at least, that my partition blocks for pmap always need to be divisible by partition count.

jasonbell 2021-04-06T11:27:56.055700Z

And I’m on holiday….. this is what I do for fun. 🙂

borkdude 2021-04-06T11:28:38.056200Z

@jasonbell there's also partition-all which will probably do the right thing for your use case?

1
jasonbell 2021-04-06T11:28:54.056500Z

Ah didn’t know about that @borkdude thanks, I’ll check it out

jasonbell 2021-04-06T11:29:17.056700Z

Perfect! Thanks

jasonbell 2021-04-06T11:30:01.057Z

synthetica.engine> (def aa [1 2 3 4])
#'synthetica.engine/aa
synthetica.engine> (partition 3 aa)
((1 2 3))
synthetica.engine> (partition-all 32 aa)
((1 2 3 4))
synthetica.engine> (partition-all 3 aa)
((1 2 3) (4))

jasonbell 2021-04-06T11:30:09.057300Z

Excellent, just what I needed.

ordnungswidrig 2021-04-06T11:30:33.057700Z

Oh, I wasn’t aware that “partition” would supress values. 😱

🐛 1
simongray 2021-04-06T11:30:57.058Z

me neither… that’s unfortunate

🪲 1
jasonbell 2021-04-06T11:31:06.058300Z

synthetica.engine> (def aa [1 2 3])
#'synthetica.engine/aa
synthetica.engine> (partition 32 aa)
()
synthetica.engine> (partition 3 aa)
((1 2 3))

jasonbell 2021-04-06T11:31:08.058500Z

Yup

jasonbell 2021-04-06T11:31:25.059Z

News to me as well. I bet it’s all laid out in the documentation though 🙂

jasonbell 2021-04-06T11:33:46.059500Z

synthetica.engine> (partition 3 3 nil aa)
((1 2 3) (4))

jasonbell 2021-04-06T11:33:58.059900Z

With a pad seems a little untidy for my liking.

agile_geek 2021-04-06T13:43:00.061600Z

This is one of those rare “I knew that, I knew that….” moments! (Yes, I am jumping up and down at the back of the class with my hand up)

3
raymcdermott 2021-04-06T19:49:37.062300Z

Goodnight