I found the original hakmem to be a terrific read when I discovered it years ago - some really interesting bits of mathematics, puzzles, short programs, algorithms and hardware hacks. There is material enough in there to inspire several lifetimes worth of research.
But the world has come a long way in 36 years, and I think we're overdue for a sequel. I'm not the only person who thinks so.
Things that should be in Hakmem 2:
- Quake's fast inverse square root.
- Simon Tatham's Infinity Machine.
- Puzzle: Solve Tetris on a grid of width 4. Tetris can only be lost, never won, so solving it means finding an algorithm that allows one to play indefinitely no matter what pieces are given. Btw, Tetris on a grid of width 4 is a fun game - very different strategies apply than for normal Tetris though.
- Crash course in geometric algebra.
- Hardware: The Joule Thief.
- Use of space filling curves to make 2D maps of 1D spaces (or n-D binary spaces).
- Techniques for drawing fractals (IFS, L-systems, escape time)
- Solutions to Pentominoes on various grids
- How to draw the INT curve from Godel, Escher, Bach (there are some clues here).
- Top ten Perl one-liners.
- Software Transactional Memory
- Parsing using Parsing Expression Grammars
As well as a compendium of handy techniques, hakmems can be thought of as a zeitgeist - a gauge of what hackers are (or should be) thinking about at the time they were written.
Come to think of it, a lot of my blog entries would make good Hakmem 2 entries. Hmm...