Understanding the ChaiScript clone Function

In ChaiScript variable assignments create a copy of the object being assigned.

ChaiDraw: Programming Toy and Chaiscript Use Case

I have been working for the past few weeks on ChaiDraw. ChaiDraw is an application that’s both meant as an educational toy and as a showcase for how to effectively use ChaiScript in your application.

Nanobots Review Posted

My second adventure game review was published at Adventure Gamers.

ChaiScript Performance Updates

ChaiScript is a trivially easy to use scripting language designed for integration with C++. I have been working on it with Jon for the past several months now, and we have reached the point of doing performance optimizations and minor bug fixes.

ChaiScript: Easy C++ Scripting

Jon and I released the first release of ChaiScript earlier today. ChaiScript is designed to make it trivially easy to use scripting in your C++ application and to expose your C++ to the scripting system.

Online C++ Resources

I often mention books that I use as resources, but rarely websites. It seems, on average, that online C++ resources are lacking. However, there are a few that I have found that provide quite valuable insight.

Using colorgcc in Ubuntu (and other Linux distributions)

colorgcc is an awesome little tool for colorizing the output of gcc and g++, making compiler errors and warnings much easier to spot.

MySQL Stored Routines are setuid By Default

By default, all views and stored routines in MySQL run with the privileges of the definer, not the invoker. This is equivalent to the setuid bit in Unix. In the case where you need to provide execute permissions to stored routines (via EXECUTE) to a read-only user, it is possible to inadvertantly give your read-only user the ability to modify data. If the user has access to a stored routine that modifies data, then the user will be able to modify data.

Optimizing Massively Multithreaded C++ Applications - Where's the Output Going?

If you have dozens or hundreds of threads doing work they are probably producing some sort of output. I’m not referring to logger output, but to permanent storage, perhaps in a database. If you cannot store the data as quickly as you produce it, you will eventually run into problems. If you are just barely able to keep up with data storage then your scalability will be limited. In the system I am working on poor database performance caused a cascade of errors, making the root cause very difficult to track down. The queue used to store database inserts was growing so large that it was causing out of memory errors which resulted in news returning null. The library calling new did not check the return value, which then caused a segmentation fault when the library attempted to use the pointer.

Optimizing Massively Multithreaded C++ Applications - Beware of Heap Operations

While debugging my massively multithreaded C++ application I would notice times where the application would seem to pause for a few moments. During one of these pauses I halted the application and attached to it with the debugger (GDB). From within GDB I listed (info threads), switched to (thread ) and looked at the stack (bt) of each thread running. I saw something surprising and very telling. Nearly every single thread that was supposed to be performing work was actually blocked on a mutex inside of either malloc or free.