Thankful for offline documentation
Posted on
I am on a transatlantic flight from Europe to Canada. Internet is not available. Well, technically it's available, but it it's rated at 120mb for 60 Swiss Francs which is outside of my price range.
Before the flight I downloaded the first day's first part problem from Advent of Code (AoC). I wanted to practice both go and rust (and ideally zig as well). I am not well versed in any of these languages, and when working on side projects I need to google. A lot. As mentioned in the opening paragraph that is impossible for me. This is when I discovered that both of these wonderful languages (skipped zig for now) have their documentation available offline.
For go, you can use go doc
and there is tab completion (at least on arch with fish) that lets you explore the entirety of the standard library through your console.
For rust, there is rustup doc
which opens the standard library in your browser via local files.
This also includes a couple handy books, like the cargo book and rustc book as well as rust by example (though some of the links still link to the web).
It also has a functioning search which came in handy.
I could not find a zig counterpart (at least from man zig
and zig --help
).
After creating a solution in both go and rust, I ended up committing the target directory.
I git rm
'd it and wanted to add a top level rule to prevent myself from repeating this mistake for future problems for AoC.
The problem was I forgot what the glob syntax was, which I could not google, but there exists man 5 gitignore
which had everything I needed in it.
The other thing I realized is my phone is pretty useless without data. I have a single game on it that works offline and some songs downloaded on Spotify. The game is pretty boring and can in no way fill up 8 hours of flight time. The songs I have already heard a hundred times over. For everything else it's dead weight in my pocket.
A future action item for myself might be to have more offline activities to do as I forgot to pack my books. This experience makes me thankful for useful man pages and offline docs. It's near impossible to do anything offline nowadays thanks to everything being a SaaS. It also makes me a bit sad that my computer and phone are just expensive web portals.