DRY Function Pointers in C

Just a quick post today about C function pointers. Over the past two years I have seen the occasional function pointer introduction post on Hacker News, but I rarely see this one weird trick. The most recent I have read was this one by Dennis Kubes. I haven’t hung out with C for a while [...]

Some Lazy Fun with Streams

Update: fellow algorithms researcher Francisco Claude just posted a great article about using lazy evaluation to solve Tic Tac Toe games in Common Lisp. Niki (my brother) also wrote a post using generators with asynchronous prefetching to hide IO latency. Worth a read I say! I’ve recently been obsessing over this programming idea called streams (also known as infinite lists or [...]

Metaprogramming Erlang the Easy Way

I’ve recently taken Erlang back up1, and I wanted to use this blog post to talk about something cool I learned over the weekend. I am implementing a data structure. Reimplementing actually, as it is the structure from my thesis – a succinct text index (I will post a blog on this soon). Why am [...]