Fork me on GitHub

dude, 2015 molecules are awful, but interesting! but today's one is just zzz


GC overhead limit exceeded


This feels like a day 24 one in previous years, but day 15? yikes


Maybe the assumption is that the weekend is a good time for a big one


I might do day 15, but if there is other problem like this one this year I may quit the whole thing


same^ — or at the very least skip it


this is by far the most difficult year… at least for me


I think it’s a combination of just more difficult puzzles, but also I’ve noticed that compared to prior years where part 2 is usually a layup, this year that is not always the case


(assert (= (f1 input) 196200))
"Elapsed time: 4399.123038 msecs"


p2? I'll just let it run overnight and submit result. totally not worth it, although I have an optimization in mind.


p2 "Elapsed time: 538665.073576 msecs"


Day 15: I am not sure why my Part Two does not work. Probably something stupid because it worked on all the examples.


Functional programming is not the best for simulations 🙂


Okay, not deleting this time. data.priority-map is definitely busted 😞


Specifically, it really seems to behave oddly with the way I'm using it, and I'm not sure what about my keys and values is causing pop / dissoc to break

Ben Grabow04:12:05

@fellshard Can you use sorted-set-by instead, where the set contents are the items and the sort fn is the item->priority fn?


Looks like I'll have to. Was trying to avoid resorting each time 😞


Going for a classic priority queue sorted-heap approach, but that doesn't seem to be something anyone has implemented reliably in Clojure, at least not with any of those key words.


Maybe an issue in getting a persistent impl? Dunno.


I guess day 15 really took a toll on people.


Well, hope to see some renewed activity here for day17.


I jumped ship to 16, that was much more fun 🙂

1️⃣ 4

Maybe I'll see about continuing 15 tomorrow, my brain's happily fried. The wrinkle in this problem was a fun one to figure out, it took me a few attempts to find a working algorithm.


16 wasn’t too bad… but I took the lazy way out on part two and just one by one eliminated anything that didn’t have a unique result


manually that is… maybe tomorrow i’ll code it.. i always feel dirty/guilty doing it by hand


@markw same here 😅 I'm thinking of it to solve with core.logic later.


i gave core.logic a try with solving day 7, but I don't think it was much improvement. (and I still couldn't figure out how to get the ordered steps without using elimination with everyg) let me know if you use it so I can check it out!


great! i'll have to dig into your code 🙂


I’ve been meaning to play around with that at some point.. never done any logic / prolog stuff before


yeah tonight i needed a quick win after the past couple puzzles…


Anyone stuck on day 15, there is a corner case I ran into which is not tested in the examples. When there are multiple targets at the same distance, you should pick the path to the enemy closest in reading order and not the part starting with a step closer in reading order.


I believe that is stated in the problem definition, if not in the examples, though. This is definitely the kind of problem where it'd help to have a good catalogue of examples to run through, though.


It is, but there are so many rules, it's easy to miss one and have the priority a little different. For my data the difference was only 12 HP the elf's had less.


Skipped a day and took me a while to catch up - I didn't want to open up Slack again before being all caught up, to avoid spoilers


I thought the roguelike was a lot of fun, but it takes some time


Wow, only 2200 people finished day 15, down from 6000+


In day 16 I was bitten by partition again, which silently drops the last group if it isn't complete. I really feel partition-all should be the default


10 people finished day 15 in less than an hour !


i'm glad day 16 was a fun problem, in comparison to the previous one which I didn't even read through after seeing the comments here...


People get frustrated easily. I don’t love the problem, and ended up finishing part1 in the morning. It was a bit more fun without the “I need to figure this out so I can get to bed” pressure

☝️ 4

It really wasn’t hard, it was just annoying to figure out what the problem was asking. (and annoying when you didn’t have a test case that demonstrated what you were doing wrong)

☝️ 4

maybe i'll give it an attempt next year. i just don't feel like spending 6 hours on that this weekend ^^


1/3 of that is coding 2/3 of that is figuring out the instructions. If you can find a good restatement of the problem into english, I bet you can get it quickly


i guess it's a bit like the flower pot problem then? i spent a lot of time rewriting that as i gradually learned how those rules applied


Maybe. I thought that one was very clear. I never had any doubt about what to do - just how to do it. For day 15, I often didn’t understand what the problem was asking to do


FWIW I think the instructions have been clear for most (all?) days almost to a fault

☝️ 4

Which doesn't mean that I didn't misread them - but that's on me for being hasty


Obviously some people understood 15 out of the gate and got it relatively quickly.


I think this type of problem will be hard to phrase unequivocally, no matter how good of a writer you are


Day 15 was almost too verbose - in some places the description felt like it was reiterating what it just said. But of course in other places, I needed to have the logic repeated to me to get it into my head


The more I think about it, the tighter the pathfinding could be. It really does turn into a simple BFS, priority sorting by [distance, position, ancestor] (where ancestor is the tile you would move to in order to approach position)


I took it as an opportunity to learn how A* works


Which was fun - it’s an elegant algorithm


Got to use java.util.HashMap and j.u.PriorityQueue for the first time

👌 4

I might be odd but I enjoyed day 15. It was a ton of work, granted, but I had fun and learned a lot. I guess for more experienced people it felt more like homework…. Day 16 was cool because I knew exactly what I wanted to do


And it helped me with a problem on 4clojure that I hadn’t done before


Nice use of fixed-point


first defmacro i've seen here [=


Hah. And, if you look closely, you will see that I'm using defmacro in ClojureScript. :thinking_face:

🤯 4

The fixpoint trick reminds me of sickpea


@U06F82LES I got stuck on that part (not seeing how to proceed), but took a peek at your solution to get unstuck

😀 4

(I was stuck on the point that my intersections were doing nothing, but I failed to see there was a singleton that could be leveraged.)


The problem with falling behind (Xmas parties are a thing at this time of year) is that I think I’m doing something clever only to discover that someone else did it a few days before I did


I nearly used a fixpoint, but decided it was easier to see when I’d cleared all of the ambiguities


well… sort of the same. I kept reversing my map, because each time I did, new singletons emerged. Bijective mappings are like that 😄


BTW I came up with a pattern. I have emacs running on the left half of the screen and a terminal with rebel-readline on the right. Whenever I reload the namespace, my test function gets re-run automatically:


reduce all the things!


did anyone actually use core.logic for day16? I spent half of the day neck-deep in tutorials and videos, and implemented solved "mapping" with a loop and a bunch of recurs instead kappa


this book is really useful for learning it