Advent of Code Day 14: Ooh, looks like nobody's d...
# devlog-together
n
Advent of Code Day 14: Ooh, looks like nobody's doing AoC with http://clerk.vision so far? Maybe not super FoC-y, but I got curious after hearing @Jack Rusher mention it. It's been super fun to play around with viewers and stuff, and it's extremely gratifying to have a presentable "notebook" to share with friends almost for free. My solutions are at http://zmb.cm/aoc/2022 with an auto-generated landing page that lists the individual days, so no spoilers from just clicking that link :)
Meanwhile, a friend is using the Lean4 language / theorem prover for solving, and Alectryon for rendering web pages, which seems similar to Clerk at first glance: https://types.pl/@kha/109450856437697278
j
I'm getting a 403 error at the URL for your AOC
n
Sorry, I forgot to put part of the URL. Whoops.
Warning: Today’s page will load slowly because I’m dumping quite a lot of data points into plotly there 😅
And also: I went into AoC with precisely zero lines of Clojure under my belt. Happy to get feedback on which parts are horribly non-idiomatic / inefficient.
j
@Nils Berg You're working too hard 🙂 Here's an idiomatic solution to the first day for comparison: https://github.com/mk/advent-of-clerk/blob/main/src/advent_of_clerk/day_01.clj
n
Thanks! I did find out about
partition
after day 1, but I’ll try to incorporate the threading macros more :) I hadn’t thought of
(reduce max coll)
, instead I used
(apply max coll)
😅
j
apply
is totally legit!
y
Nice plots @Nils Berg!
In Lamdu using zippers!
s
@Nils Berg I like how your talk yourself through the solutions. I did something similar using the notebooks in https://gtoolkit.com . It was a pleasant way to stay focused while exploring a new environment.
Also now I want to try Clerk as well.
n
@Sean Levin And I Glamorous Toolkit 😁 Glad you’re enjoying the style, I’m trying to find a voice I like for code comments - not too dry, not too whimsical, and most of all, informative. If I can read these a year from now and understand what I was on about, I consider that a win, if someone else can, doubly so!