It is time for Advent of Code 2018!
Nim is organizing private leaderboard where you can compete against other Nim users. To join the Nim leaderboard, all you have to do is use 40415-c732e66e code in the previous link.
More information about this event and the prizes you might win in this blog post
Use this thread to post links to your AoC repositories and share your solutions.
Currently there are 18 of us who joined.
If you didn't participate in the previous incarnations of AoC and you don't get what all the fuss is about, I'd recommend you to solve some tasks from 2017 (or earlier) to get in the mood and join us this Saturday.
Usually first few days every year are easy tasks for warming up. If you want to challenge yourself, take a look at 2015 day 19, 2015 day 22, or 2016 day 11, to name a few.
Currently there are 18 of us who joined.
Make that 38, as we speak ;)
Less than 24 hours to go until the start so here are some basic tips/rules:
Hi all, ran into Nim in Hacker News a couple months ago, and this year's Advent of Code seems an excellent way to finally learn by doing.
Inspired by @miran's repo I will be posting my solutions here: https://github.com/pietroppeter/AdventOfCode2018
I plan to solve them first with Python, then by Nim. Only when they are solved also in Nim I will put in my solution. I joined the private leaderboard.
It is going to be fun!
Hey everyone, new Nim hobbyist programmer here!
It's my first time doing AOC this year, I though it would be a new opportunity to learn what seems to be one of the most promising new languages out there. So, I'll try to do most days in Nim, but can't promise I won't fall back to python if I get really stumped.
Looking forward to reading your solutions! Here is my repo: https://github.com/auxym/AOC2018
Inspired by @miran's repo
blushing :)
Nim (python-naive) implementation unexpectedly much slower! Why?
I know the answer, but you disabled issues in your repo so I cannot comment there.
We had a long discussion on #nim IRC channel about this today, and there are two possible solutions for this problem:
My repo: https://github.com/ericsolomon/aoc2018
Still fairly new to nim and there will be solutions in other languages in this repo, but there is where all of the aoc code will be housed.
I encountered the same difficulties. The fact that the problem provides several test cases shows that the creators are aware of the difficulties. There are several traps to fall into. And, for part 2, there are also performance issues.
For now, this problem has been the most challenging. Day 16 is easier.
Yeah day 15 was a struggle, but I am glad I didn't give up. I was finally able to hunt down the path finding but that was haunting me. My issue was that I was trying to be too clever and implement A* for the pathing which led to bug after bug. I took a big step back and decided to just brute force it with breadth first search instead, which ended being a way better choice.
Tell some of your friends that if they come back to the problem with a fresh and well rested mind they can do it :)
Day 20 forced me to abandon nim, because for whatever reason my hash searches started taking seconds.
I probably fucked up somewhere around
I had a breadth first solution that would have worked if I would have read the specification, hmpf reading order, then I looked at your A* and that threw me of track :)
Eventually I ended up width a breadth first.
Your repository was of good help @nickmyers217 both help in a good and in a bad way :D
Now I won't be able to solve any more before christmas, I have to revisit the remaining problems when I get home from the christmas vacation.
But I can say that I have found a lovely language that I can't wait to solve stuff in.
Yeah my bad on that. Trying to be too smart too quick doesn't usually end up paying off in the end :)
Thankfully, I actually got to use A* on a later problem, and I was able to copy most of the code from my first day 15 attempt, so that was a little redeeming...
I don't think you are alone in taking a break; I see others doing it and almost did so myself. I can feel my sanity slowly fading as we bounce between cellular automata problems one night and assembler reverse engineering problems the next.
Here are my solutions: https://github.com/epiphone/aoc/tree/master/2018. Just started learning Nim so they're not much to look at. Enjoying the process though! Of the recent ones day 22 was particularly fun, with Dijkstra's algorithm, priority queues and whatnot. Exciting after the CRUD tedium of one's day job...
Browsing other people's solutions was really helpful in picking up idiomatic Nim, so thanks for those!
Yesterday I have sent a mail to people on our leaderboard who solved 25 tasks. If you're one of them and you didn't receive anything: first check your spam folder ;) and if there's nothing there, please contact me.
Also, even if you didn't solve all 25 tasks, but you think some solution of yours (or a whole repo) is very nice/elegant/fast/etc. give us a link to it and a short explanation why you think we should award it :)