Hacker News new | ask | show | jobs
by BugsJustFindMe 937 days ago
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.
1 comments

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.