Fork me on GitHub
#adventofcode
<
2017-12-03
>
abarylko02:12:36

PR submitted!

jmb03:12:20

"Solve problems, not puzzles." Well puzzles are problems except they're fun 😃

fellshard05:12:51

Heh. Part 1, was faster to just figure out the nearest 'square' it was in, then do the rest by quick hand math. Part 2... welp, back to actually computing values

dpsutton05:12:26

what do you mean nearest square?

dpsutton05:12:02

ah never mind. i didn't realize the third was out. i'm only on the first two so far

dpsutton05:12:49

its really neat to read others solutions. much different styles from me. lots of transducers. cgrand's common transducer's lib, lots more comment macros than me as well

dpsutton05:12:14

some good use of for which i almost never use

fellshard05:12:50

I tend to finish it quickly for placement, then go back and refactor / tidy in subsequent commits so that the process is still visible in the git history

fellshard05:12:15

So the style tends to shift subtly between the early / refined versions

dpsutton05:12:37

look at this. i didn't even know for loops could do this

dpsutton05:12:09

is your stuff in that github repo?

fellshard05:12:49

I've got a PR for a link to it

fellshard05:12:08

tbf, I checked the for docs for yesterday's, and it was... underwhelming

fellshard05:12:26

It pretty much assumes you have full knowledge of list comprehensions in other langs

dpsutton05:12:05

mfikes has such a clean style

dpsutton05:12:53

i think a lot of us have similar ideas

fellshard06:12:09

I should really get in the habit of using let bindings and intermediate names over blocks of threading pipelines

borkdude11:12:05

@dpsutton Do you mean :while and :when? I used that too in day 2: https://github.com/borkdude/aoc2017/blob/master/src/day2.clj#L24

ajs11:12:07

enjoying looking over everyone's solutions this year, learning some stuff! lots of transducer users, something i never really adopted in my own code. wish I had more time to participate this month

borkdude12:12:09

@ajs Usually you don’t really need transducers, it’s more a performance enhancement, but it’s fun to play around with them

borkdude12:12:08

I’m becoming curious about @cgrand’s xforms library now too

orestis12:12:08

Today was interesting; I resisted doing part 2 the obvious way in the hope of finding some neat math formula, but eventually gave up.

borkdude12:12:09

Yeah, some weird variation of fibonacci maybe 😉

orestis12:12:25

Oh, I have to study your directions implementation.

orestis12:12:42

Hah, I did the same thing for the first part! Though I had to write a bit of code to validate my thoughts.

orestis12:12:57

This probably from experience on previous AoCs; A lot of times you can avoid a ton of code by teasing out some properties of the input. Though I didn’t know you could search online for sequences of numbers 🙂

theeternalpulse17:12:54

I'm interested in solving some of these with clojure.spec destructuring.

nooga17:12:00

just did the first part of today’s puzzle

nooga17:12:56

9 lines in a repl 😂

borkdude17:12:49

@theeternalpulse I did one of those in 2015. Want to see the code?

theeternalpulse00:12:12

I'll check it out, I think this was posted on a thread in reddit I had made.

borkdude17:12:54

(co-incidentally, I did not know about Gijs’ blog post after I finished mine)

mfikes18:12:51

Wow. The solutions to day 3 no longer have the uniformity seen with days 1 and 2. I think my favorites so fare are the ones by tentamen and moxaj.

borkdude19:12:17

@mfikes Cool! I noticed that tentamen’s strategy for day 3 part 1 was isomorphic to mine, but he represented the data more straightforward

borkdude19:12:07

When you don't notice the square pattern, the solution becomes different