JavaScript state machines and statecharts | Hacker News Reader