JavaScript State Machines and Statecharts | Hacker News