It's funny to me how much of the code is just replicating behavior you would already have for free if you just had a small shell script that used standard tools like curl and sed, and it wouldn't need to be compiled, and it would be one single file instead of four with a nested source directory, and it wouldn't have 2000 lines of cargo config.
Absolutely, the basic functionality could be easily hacked together with a small shell script. But parsing the html and converting it to markdown would be probably not possible without extra tooling (I wouldn’t feel comfortable doing it with sed). I also like that with the current implementation you are basically getting the “—help” argument for free.
Using Rust for a simple tool like this is, of course, a total overkill and something like Python or Go would do the same job with much less code. But I enjoy writing Rust and was already using it to solve the AoC problems :)
I also like the fact that the tool is now very easy to install with Cargo without me having to upload it to some package manager.
The 2000 lines are in the Cargo.lock file, which is generated. The actual config is 18 lines. Of course having that many dependencies is worth criticizing.
Author here. I am actually participating pretty causally at advent of code and don't try to get into the global leaderboards (I wouldn't be able to, even if I would try).
I build the tool for myself last year because I like the comfort of not having to switch between terminal and browser. As I wanted to use it this year again so I decided to put it into a separate repo and to share it here.
But I see the point that this a special kind of laziness not everyone can relate to :)
i watch someone who consistently places top 5 on youtube. they code in vim on windows in the terminal, exit vim to run at the command line, and then copy and paste from the terminal into a browser.
I wonder why these are not available from the project directly and why input data is not in some standard format like JSON. Parsing the input for speed is the dirtiest part. If it was always in JSON, then at least that part would have been prettier!
Last nights task I did with stinky code string-splitting for speed.
I think the first (or first couple) AOC relied on JSON input more.
I assumed Eric (the creator) moved away from JSON to have a level playing field and simplify parsing (and potentially build dependencies) across various programming languages.
But you can't do a decent job if you want to earn points. Parsing requires diligence and less assumption. Add one extra space, and the whole AOC parsing leads to unpredictable results.
> Tool to automate downloading and submitting advent of code problems.
Well... the biggest use case I can think of is automated, AI assisted, problem solving. Which isn't really aligned with the spirit of AOC. In fact they politely asked people not to, if I'm not mistaken.
I am actually using it to submit my solutions without leaving the editor (out of lazyness).
I just need to run `aoc submit <my-solution>` and immediately get feedback if I am correct. If that it the case, it automatically downloads the second problem so I can immediately continue.
As explained in another comment I'm not participating competitively. I just really like automating things.
I also think that AI assisted program solving if against the spirit of AoC, so I will add a note to the readme to discourage it.
That's exactly what it's. Anyone trying to rank (and even if not) had a tool such as this built since AoC's origins years before AI coding solutions. Seems nowadays for many people any kind of automation implies AI assistance.
I guess they could just ditch the competetive rankings altogether now with AI coding assistants. Keep the star system to keep track of what you did yourself, at most.