https://futureofcoding.org/ logo
#devlog-together
Title
# devlog-together
n

Nils Berg

12/14/2022, 4:26 PM
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

Jack Rusher

12/14/2022, 5:04 PM
I'm getting a 403 error at the URL for your AOC
n

Nils Berg

12/14/2022, 5:06 PM
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

Jack Rusher

12/14/2022, 5:51 PM
@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

Nils Berg

12/14/2022, 6:05 PM
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

Jack Rusher

12/14/2022, 6:25 PM
apply
is totally legit!
y

yairchu

12/14/2022, 10:23 PM
Nice plots @Nils Berg!
In Lamdu using zippers!
s

Sean Levin

12/14/2022, 11:06 PM
@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

Nils Berg

12/14/2022, 11:18 PM
@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!