On AI

A recent discussion with my cousin, Jon, about a self learning AI brain that could be used for automatically generating code degraded into this:



Multithreaded C++: Part 3: RAII And Threads

If boost::threads represent the C of multithreaded programming, then RAII and automatically managed threads represent the C++ of multithreaded programming. In the last article we promised that using more RAII would allow us to get this code even smaller and better to manage. Here is the result of that:



Crate Game Engine snapshot-20080330 Release

Crate Game Engine snapshot-20080330 was just released. Changes:



Nokia N800 Review

I just received my Nokia N800 two days ago and thought I would give my first impressions here.



C++ Templates: Euclid's Algorithm

A while back I was going though the first chapters of Knuth’s The Art of Computer Programming and came across Euclid’s algorithm for finding the greatest common denominator. I decided to implement the algorithm as a C++ template. Here’s the complete example.



Crate Game Engine snapshot-20080323 Release

Crate Game Engine snapshot-20080323 was just released. Changes:



Multithreaded C++: Part 2: Boost Threads

Note 2016-03-15 std::threads now have all this and more



Don't Join on Yourself!

My apparent memory leak from the other day did in fact turn out to be leaking thread resources.



Nobody Understands C++: Part 2: RAII

Understanding RAII is critical to understanding good C++ design.



Linux Thread Memory Usage

During the course of debugging a potential memory leak at work I noticed that Linux seems to allocate at least 8M of memory for each thread created. This very simple test program illustrates the memory allocations: