Advent of Code is an amazing achievement. Designing all the puzzles, writing code to generate all those different inputs for everyone, keeping the site going, somehow managing to create this wonderful community of problem solvers... I loved it last year. I've already paid my AoC++ this year. The least I can do for a month and more (because I never do a puzzle a day, and still haven't finished last year's) of fun.
This year I need to make sure I do the graph search problems properly, because I've never learned those methods and I really should.
This would be my reply too. The whole site is great! I've recently went through hex grid tutorial - very informative, interactive and nicely presented.
I'll have to come by again tomorrow, but I must say the design of the site is beautiful. The content is immediately clear, and as you look closer it's clear that the author put some very subtle design touches on, but they aren't overwhelming.
It's essentially the C++ I always wanted, which is more or less its intent.
It's fast. The D code I write routinely matches or outperforms the C++ I also write for comparison.
D is a much cleaner language. It has obvious C++ inspirations but has thrown out decades of backwards-compatible cruft.
As a result, D has some of C++'s best features, like sophisticated metaprogramming, with much nicer language. In fact, this is the part I like the most: compile-time function evaluation. D allows you to evaluate essentially any function at compile time for which all of its inputs are known at compile time. It almost feels like lisp macros, with the slight downside that they work on unstructured strings instead of (minimally) structured sexps.
D is safe. It produces stack traces when I mess up instead of segfaults. It won't let me compile the most obvious errors it can catch at compile time. I'm not even sure yet if it's possible to have UB in D.
D is flexible. It doesn't impose an opinion on how I should do things. I can do OOP, functional, or procedural as I please and provides useful tools to do all those. OOP is like the familiar classes you know from C++ and Java with interfaces instead of multiple inheritance. Functional programming utilities are useful without being burdensome. You can totally do a for loop in a pure functional function as long as the overall function has no side effects, which is very practical.
D has a bunch of other niceties which you can explore in the D's gems section here:
I'm actually one of the core devs of Nim and so probably naturally your description of D sounds a lot like a description of Nim to me. You should check it out if you haven't already.
AoC is lots of fun. There's an active community on http://reddit.com/r/adventofcode where people share tips and help each other out.
I highly recommend participating. AoC is designed as a speed coding competition, but if you aren't playing for the speed points, it's a fun way to learn a new programming language.
It's really not designed as a speed coding competition; that's just what it became by accident. Eric built the first edition for friends and friends of friends, expecting maybe 70 people to participate. He thought a 100 person leaderboard would be more than enough. The look on his face the next day when he realized what had happened and that his infrastructure wasn't going to hold up was priceless :)
That said, it is a fun way to learn a new programming language or to brush up on one you haven't used in a while. Stop by the subreddit and get help if you're having trouble or give some help if you're able!
I love AoC! Last year was the first time I got all 50 stars, as I was motivated by a competition held by a Swedish podcast. This year, I'm even hosting a pub meetup about halfway through December, centered around Advent of Code, where a group of us hopefully can help each other out.
While I enjoy advent of code I always have been happy to live on the west coast. I wonder how many people on the east coast don't participate because they'd have to stay up til midnight if they want to score.
It could be fun if each puzzle were unlocked after 23h (or 25h). I.e. the start time shifts everyday by 1h to make it "fair" no matter what timezone you live in.
As a moderator on the subreddit and coworker of Eric Wastl, that'll never happen because we would die. It's set up so that puzzles unlock at a time that Eric is awake and able to respond to any issues that may arise.
I think there's value in completely ignoring the race.
I'm probably going to do this either in a language I'm learning as I go, or in something like Erlang which, whilst great to get correct, will not iterate as fast (for me at least) as the Ruby solution I could quickly and easily write.
Problems are released midnight EST. First person with a solution globally gets 100 points, second person gets 99, etc. So you have to be one of the first solvers globally to get any points.
If you feel the global challenge is out of reach, you can setup a private leaderboard for you and anyone you give the 'join code' to, localizing competition and points to your own circle of "AoC" friends: http://adventofcode.com/2017/leaderboard/private
So, what are people gonna work in? Anything interesting? I am myself thinking about doing the challanges in Powershell. Because why not suffer more on this earth.
I'm thinking on doing them in Rust and Clojure. I've dabbled in Clojure before but nothing serious and I'd like to build up some more familiarity. Rust because it's the first systems programming language that grabbed my attention; plus it's always good to have a varied selection of tools in your proverbial toolbox.
I know that I can probably do them in 10 minutes in Python, but that's not going to be as fun or valuable, especially since I'm not going to be able to compete for the leaderboard due to timezone/work.
> I know that I can probably do them in 10 minutes in Python
Then you are in the absolute top tier of the people competing. Either that, or you probably belong in this subreddit https://reddit.com/r/iamverysmart ;)
Haha, I meant the actual coding part. I'm sure the problem solving would take me longer, it's just that once I have a solution in mind I can code it in 10 minutes in Python, since I'm very familiar with it and use it almost on a daily basis.
Having to think about basic things such as how to instantiate hash maps, what is the syntax for control flow, does this language have this particular functionality. This can take hours spent in reading documentation and debugging.
From what I've seen from last year, the problems arent't that hard (they're meant to be solved within a day), so the real time consuming part is the coding.
Moving from Python 2 to Python 3. I sort of debated learning something new, like Haskell. But I want to be competitive, and that means language familiarity.
I'm challenging myself to use a different language every day. But I've already blown too many good languages; need to save some for the end (assuming the problems get harder).
No. What's the worst that happens? You take longer to do the challenges?
The leaderboard is irrelevant, as you can only get on it if you're in the right time zone/nocturnal/unemployed and really really fast, so what you then get out of it is a solid set of Haskell problem-solving skills.
People learn languages in AoC every year. Do it!
Some people do each day in a different language. Maybe don't do that...
I went into ICFP 2007 with two other dudes, only one of us knew Haskell (not me), and yes, it was a death sentence.
However, ICFP is 4 days, not a month, and the experience was good enough that it made me want to actually learn Haskell properly. I had fun and benefited in the long run. :)
I was most of the way through last year's in C# when I decided now was the time to properly learn (algorithmic programming in) Elixir. That set me back in terms of speed, but it was well worth it. I'm now fairly fluent and I'm doing this year's in Elixir from the start, so - yes, it's a great way to get into a language, I would say.
I used last year to learn Elm really well and plan on using this year for F#. Go for it!
Elm served as a gentle intro to Haskell for me personally since it has easier to read errors and less overall complexity to grok at first go, but it sort of depends on your experience.
Well, I've used previous challenges to learn/improve my Nim. And I can tell you, after solving whole 2015 challenge - my Nim skills have noticeably improved.
There isn't, by design. You write _some_ black-box implementation locally which outputs a textual solution you drop into the browser (at least, this is how it was in 2015 when AoC started).
I can't recommend this enough. I had to miss out on last year's challenges, but planning on participating this year; it's a great way to keep your brain nimble if you feel like you're in a rut.
I haven't done AoC before. Does anyone know if it's possible to submit 2 solutions? I want to use this to brush up on my Python, and I want to start digging into Rust.
Last year I solved most problems the first time through using Perl and then later came back and used it to try to learn Rust. The second time through I started by writing test cases using the known-good answer from the Perl implementation.
This year I need to make sure I do the graph search problems properly, because I've never learned those methods and I really should.