Tweaking Hugo Summary

One of the things I find quite annoying with hugo is it auto summary feature. While it is quite handy to limit content on main page as it is- but it’s default limit of 70 characters adds more to improvement.

To top that it messes up all the formatting:

One of the work arounds I have found is to use <!-- more -->, content summaries, to control what sort of summary will be generated, but it still the same that you have in page.

Often I would like to have a short note for the content, which is not part of the content itself. Something like this:

[Read More]

hashing std::pair and std::tuple

Lately I have been refactoring some old code & found it littered with all sorts of things. This particular code had a custom hash-table for hashing based off 3 values instead of 1. std::tuple are the best fit, or probably providing a custom struct with std::hash specialization would have served as well. What std library provides is std::hash for basic types, reference here. There is nothing for composite types. Even for std::pair.

Providing a std::hash for both std::pair and std::tuple is what I want to address with this post.

[Read More]