This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (39)
- # aws (1)
- # beginners (39)
- # boot (1)
- # calva (79)
- # cider (8)
- # cljdoc (13)
- # cljs-dev (45)
- # clojure (89)
- # clojure-berlin (2)
- # clojure-europe (1)
- # clojure-uk (1)
- # clojurescript (7)
- # datomic (1)
- # emacs (6)
- # figwheel-main (2)
- # fulcro (29)
- # hyperfiddle (21)
- # juxt (1)
- # leiningen (1)
- # lumo (3)
- # music (1)
- # off-topic (20)
- # pedestal (23)
- # portkey (3)
- # reagent (2)
- # rum (1)
- # shadow-cljs (27)
- # vim (5)
I just looked at Day 15. It feels like CS homework. “Implement an A* algorithm.” Not really fun
I think it’s a fun problem, but there’s really too much going on here to finish quickly. I’m 2 hours in and I’m not quite getting the move selection right. I think I need finish in the morning.
It would have been more fun if the explanation was less explicit and the actual algorithm a bit more easy. Still it's doable, so I'll will.
Just looked at the times for the first 100 to get it right, around 15 minutes for almost any day, but today over 2 hours
My brain is fried. I have a solution but it works really slow for bigger dungeons. I suspect one line of code to be the culprit for making it so slow. Does anyone have the time to check this with me?
(filter (sets/union free enemies)) This is the line of code I suspect will cause trouble for large sets “free”. “enemies” is usually small.
I tried out tufte yesterday and it seems easy to use out of the box for profiling.
Wrap the code you want to profile in the
p macro and you should be able to see what's hogging the most time.
wow, it's almost 10 hours after the game and then only 835 people solved it completely, compared to the thousands from yesterday 😄
I just got the first part, almost the second but have to go, was the first time I was one of the first thousand to solve the first
i finally finished day 15 and it's pretty rough and slow, but I'm definitly not eager to touch it any further... https://github.com/IamDrowsy/advent-of-cljc/blob/slow/src/aoc/y2018/d15/iamdrowsy.cljc
That problem will likely cost $1000 to solve, in terms of time. You could buy a new laptop.
meanwhile stuck on part 2 of day 13, I’ve looked at this over and over and can’t find the bug… any help would be appreciated! https://gist.github.com/Solaxun/1b4b7ada84b936d43fbee04ede0062f4
:locs should be
:loc. If you have any collisions that should happen on the first tick they'll get missed.
I don't see anything else obviously wrong, so hopefully that's it.
When I'm debugging these problems, especially with a loop, I'll do a println of each loop parameter and run through the first ~5 iterations manually checking that everything looks right. Usually I'll use the small sample data set from the problem description too. Would have caught this typo.
Thanks for the help … yeah belive it or not i did do several runs with the sample input
I mean print
new-cars inside your loop, to ensure you got the mechanics of the loop correct. Often mistakes will not manifest obviously in the intended output, but if you look directly at the internal implementation the problem will be more obvious.