Fork me on GitHub
#clojure-europe
<
2021-04-06
>
dharrigan06:04:27

Good Morning!

djm06:04:51

šŸ‘‹

joelkuiper06:04:37

good morning šŸ™‚

pez07:04:44

Morning!

simongray08:04:18

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 šŸ˜‰

ordnungswidrig08:04:06

@simongray our prayers are with you. Maybe just secretly reimplement in clojurescript? šŸ˜‰

simongray08:04:18

thatā€™s plan B šŸ˜‰

simongray08:04:07

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

simongray08:04:30

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

borkdude09:04:11

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

parrot 6
metal 6
šŸŽ‰ 3
pez09:04:31

Itā€™s sort of an LSP now šŸ˜ƒ

genRaiy10:04:02

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

borkdude10:04:54

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

simongray10:04:46

As soon as Clojure spec is out of alpha!

genRaiy10:04:57

Think of defn as a lazy sequence

borkdude10:04:00

@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"

simongray10:04:19

That was the idea, yeah šŸ˜‰

genRaiy10:04:22

@simongray youā€™re correct in that case

simongray10:04:17

RH will surely deliver. Let's just wait.

borkdude10:04:43

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

genRaiy10:04:26

Thanks, Iā€™ll add him to the vector

borkdude10:04:44

at least vectors aren't lazy

šŸ˜† 6
genRaiy10:04:52

šŸ’„

borkdude10:04:10

(def attack [])
^ my attack vector

lread11:04:03

Oh! That belongs on mugs and tshirts!

jasonbell11:04:37

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.

jasonbell11:04:56

And Iā€™m on holidayā€¦.. this is what I do for fun. šŸ™‚

borkdude11:04:38

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

3
jasonbell11:04:54

Ah didnā€™t know about that @borkdude thanks, Iā€™ll check it out

jasonbell11:04:17

Perfect! Thanks

jasonbell11:04:01

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))

jasonbell11:04:09

Excellent, just what I needed.

ordnungswidrig11:04:33

Oh, I wasnā€™t aware that ā€œpartitionā€ would supress values. šŸ˜±

šŸ› 3
simongray11:04:57

me neitherā€¦ thatā€™s unfortunate

šŸŖ² 3
jasonbell11:04:06

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

jasonbell11:04:25

News to me as well. I bet itā€™s all laid out in the documentation though šŸ™‚

jasonbell11:04:46

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

jasonbell11:04:58

With a pad seems a little untidy for my liking.

agile_geek13:04:00

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)

bananadance 9
genRaiy19:04:37

Goodnight