Fork me on GitHub
#adventofcode
<
2020-12-07
>
Vincent Cantin06:12:07

Good morning 🙂

Vincent Cantin06:12:48

“Oh oh oh” (to read with the voice of Santa Claus) … it seems that the channel is more quiet than usual 😉

😃 1
😂 3
trollface 1
alekszelark06:12:38

might because it’s Monday 😁

fingertoe06:12:34

This one seems quite a bit harder… 😉

plexus08:12:44

Today's was definitely harder than the last few days, but not too hard yet. I quite like them like this. A bit challenging but still solvable in under an hour.

✔️ 2
erwinrooijakkers08:12:29

Under an hour you say? 😛

erwinrooijakkers08:12:49

I’m lucky I still have time for breakfast

Vincent Cantin08:12:41

I am going to add Specter and Instaparse to my deps.edn

Vincent Cantin08:12:12

Instaparse has a good API for parsing and shaping the result data.

gotta_go_fast 2
alekszelark08:12:56

I’m going to stack with vanilla Clojure for this AoC

Stuart09:12:05

I just woke up, looked at it, it's not a 9am problem.

😄 1
plexus09:12:57

yeah I'm also generally sticking to vanilla clojure, unless I really end up re-implementing a common library

plexus09:12:00

and solution: https://github.com/lambdaisland/aoc_2020/blob/main/src/lambdaisland/aoc_2020/puzzle07.clj I also talk a bit more about yesterday's puzzle, and answer some questions people asked in the comments.

alekszelark12:12:59

maybe I missed it, have you mentioned that using io/reader without with-open macro is not a good practice?

plexus13:12:33

Oh that's a good point, I'll mention it tomorrow

👍 2
erwinrooijakkers15:12:21

curious to what’s wrong? :_

erwinrooijakkers15:12:27

have to stay tuned I guess

erwinrooijakkers15:12:39

find out tomorrow in a new episode

Stuart15:12:52

I think its because if you call io/reader without with-open (or explicitly try / catch yourself), then you can be left with an open reader in the case of an exception? But I'm guessing here. If thereis an exception I think with-open calls close on its binding

tws16:12:39

Day 7 using graph library

tws16:12:56

and viz for fun:

🤯 2
kenj19:12:35

Somehow I managed a stack overflow using loop/`recur` :man-shrugging:

(count (bag-children "shiny gold" sample-bags))
=> 32
(count (bag-children "shiny gold" bags))
Execution error (StackOverflowError) at (REPL:1).

kenj20:12:41

I would think my part 2 solution would just take a ton of time/memory