morning
Good Morning!
👋
good morning 🙂
Morning!
Morning
Morning!
mawning
Good morning!
morning
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 😉
@simongray our prayers are with you. Maybe just secretly reimplement in clojurescript? 😉
that’s plan B 😉
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
she loved learning both Vega and Clojure in the 10 weeks I supervised her, though
Morning
morning
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
It’s sort of an LSP now 😃
morning
@borkdude it's wonderful to see that terminal editors are improving by the inventive use of CLI tools 😝
+69!
@raymcdermott when will Rich be on? episode 70, or 100?
As soon as Clojure spec is out of alpha!
Think of defn as a lazy sequence
@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"
That was the idea, yeah 😉
@simongray you’re correct in that case
RH will surely deliver. Let's just wait.
@raymcdermott suggestion for the show: @ericdallo about Clojure LSP.
Thanks, I’ll add him to the vector
at least vectors aren't lazy
💥
(def attack [])
^ my attack vectorLol
omg
Oh! That belongs on mugs and tshirts!
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.
And I’m on holiday….. this is what I do for fun. 🙂
@jasonbell there's also partition-all
which will probably do the right thing for your use case?
Ah didn’t know about that @borkdude thanks, I’ll check it out
Perfect! Thanks
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))
Excellent, just what I needed.
Oh, I wasn’t aware that “partition” would supress values. 😱
me neither… that’s unfortunate
synthetica.engine> (def aa [1 2 3])
#'synthetica.engine/aa
synthetica.engine> (partition 32 aa)
()
synthetica.engine> (partition 3 aa)
((1 2 3))
Yup
News to me as well. I bet it’s all laid out in the documentation though 🙂
https://clojuredocs.org/clojure.core/partition#example-542692d4c026201cdc327028
synthetica.engine> (partition 3 3 nil aa)
((1 2 3) (4))
With a pad seems a little untidy for my liking.
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)
Goodnight