How to write a standard-like algorithm in C++ | Hacker News Reader