I did that too
Had a suspicion this was a trap. Should've recognized good ol' DFA theory in there 😛
Day 7 done!
I ended up in a very different place: https://github.com/mnespor/advent2016/blob/master/src/advent/day7.clj
Ahh, negative lookahead
good work @bhauman, glad you aren't skipping this year 😛
I'm trying my best to get todays problem without regex.
not a fan of todays problem in general
haven't looked at it yet - no spoilers 🙂
trying not ot look at this channel first
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
im in the same boat @dexter, overuse of loop recur and wanting to tidy it up
Partition and filter do the trick in this case, but would be slower with more / longer strings, for sure.
just finished up mine if folks want to take a gander
@bhauman similar, but better, than mine 😛
same idea though (every? (complement contains-abba?) neg)
so long as I'm learning things I am happy with my solutions
today I learned about short-circuiting reduces via reduced
---* the more you know!
@samueldev oh for sure, the learning is the best part
I always try to go through the clojure cheatsheet afterward to see if I missed anything
ah thats a good idea, im gonna start doing that
If you've got a repository, post it here and I'll pin it so we can cross-pollinate ideas and problem-solving techniques 🙂
@mnespor really liked the simplicity of your parsing on day7
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
@mnespor oh actually thats not what I'm talking about :simple_smile:
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
ha, never mind then 😄
I liked the initial grouping of
the hyper and the super
so simple 🙂
invert-aba
sounds like we should flip the frequency map of 'Dancing Queen'
haha
heh