adventofcode

Happy Advent 2020! Please put answers in the pinned threads or create one if it does not exist yet. | https://github.com/adventofcode-clojurians/adventofcode-clojurians | Join the private leaderboard with code 217019-4a55b8eb
abarylko 2016-12-07T00:05:08.000081Z

I did that too

👍 1
fellshard 2016-12-07T05:44:36.000082Z

Had a suspicion this was a trap. Should've recognized good ol' DFA theory in there 😛

abarylko 2016-12-07T06:06:21.000083Z

Day 7 done!

mnespor 2016-12-07T07:26:55.000084Z

I ended up in a very different place: https://github.com/mnespor/advent2016/blob/master/src/advent/day7.clj

👍 1
fellshard 2016-12-07T07:31:03.000087Z

Ahh, negative lookahead

samueldev 2016-12-07T15:07:51.000088Z

good work @bhauman, glad you aren't skipping this year 😛

samueldev 2016-12-07T15:07:58.000089Z

I'm trying my best to get todays problem without regex.

samueldev 2016-12-07T15:08:04.000090Z

not a fan of todays problem in general

👍 1
bhauman 2016-12-07T15:08:22.000091Z

haven't looked at it yet - no spoilers 🙂

bhauman 2016-12-07T15:08:34.000092Z

trying not ot look at this channel first

dexter 2016-12-07T16:18:34.000093Z

Did it without regex but it feels a bit un-optimised. I can't help but feel like I could roll up some of the loop recurs into a reductions

samueldev 2016-12-07T16:32:48.000094Z

im in the same boat @dexter, overuse of loop recur and wanting to tidy it up

fellshard 2016-12-07T17:46:30.000096Z

Partition and filter do the trick in this case, but would be slower with more / longer strings, for sure.

bhauman 2016-12-07T17:48:11.000097Z

just finished up mine if folks want to take a gander

samueldev 2016-12-07T18:09:03.000098Z

@bhauman similar, but better, than mine 😛

samueldev 2016-12-07T18:09:20.000099Z

same idea though (every? (complement contains-abba?) neg)

samueldev 2016-12-07T18:15:25.000100Z

so long as I'm learning things I am happy with my solutions

samueldev 2016-12-07T18:15:31.000101Z

today I learned about short-circuiting reduces via reduced

samueldev 2016-12-07T18:15:37.000102Z

---* the more you know!

bhauman 2016-12-07T18:15:48.000103Z

@samueldev oh for sure, the learning is the best part

bhauman 2016-12-07T18:16:26.000104Z

I always try to go through the clojure cheatsheet afterward to see if I missed anything

samueldev 2016-12-07T18:16:45.000105Z

ah thats a good idea, im gonna start doing that

fellshard 2016-12-07T18:51:00.000108Z

https://github.com/armstnp/advent-of-code-2016

fellshard 2016-12-07T18:51:47.000111Z

If you've got a repository, post it here and I'll pin it so we can cross-pollinate ideas and problem-solving techniques 🙂

bhauman 2016-12-07T18:54:13.000112Z

https://github.com/bhauman/advent-of-clojure-2016

samueldev 2016-12-07T18:54:29.000114Z

https://github.com/samstiles/advent-of-code-2016

mnespor 2016-12-07T19:16:31.000119Z

https://github.com/mnespor/advent2016

bhauman 2016-12-07T22:35:10.000122Z

@mnespor really liked the simplicity of your parsing on day7

👍 1
mnespor 2016-12-07T22:38:58.000123Z

Thanks! It's the first time I've used positive lookahead and I'm still not sure why the first character goes into capture group 2 instead of capture group 1

bhauman 2016-12-07T22:40:40.000124Z

@mnespor oh actually thats not what I'm talking about :simple_smile:

mnespor 2016-12-07T22:40:43.000125Z

If there were a way to tell re-seq to look for overlapping matches explicitly (like python's findall) I might have done that instead

mnespor 2016-12-07T22:40:54.000126Z

ha, never mind then 😄

bhauman 2016-12-07T22:41:17.000127Z

I liked the initial grouping of

bhauman 2016-12-07T22:41:26.000128Z

the hyper and the super

bhauman 2016-12-07T22:42:33.000129Z

so simple 🙂

fellshard 2016-12-07T22:43:28.000130Z

invert-aba sounds like we should flip the frequency map of 'Dancing Queen'

mnespor 2016-12-07T22:44:05.000132Z

haha

bhauman 2016-12-07T22:44:13.000133Z

heh