bloggo ergo sum

Tag: C++

Picking up a Lisp

I’ve recently gone back to learning Lisp. I used it a little bit in graduate school to do some homework assignments in one of my algorithms class and learned some of the basics there, but since I started my professional career, I haven’t gone back to it at all until now. I got Paul Graham’s [...]

More functional support in C++

Sutter just announced that C++0x will have support for lambdas and closures. It looks from the N2550 report that these things are motivated by a desire for some syntactic sugar to make using STL algorithms easier (which is understandable), but I hope this will lead to more first-class support for the functional programming paradigm. It [...]

Ok, I get it (or: Gtk+ is better than I thought).

In my last post, I kinda whined about the awkwardness of the Gtkmm API. At least, it seemed that way at the time. I toyed with libglade and Gtk+ for a while first and everything seemed very straightforward and easy. Gtkmm and libglademm are different. They seemed awkward at first, but after further investigation, I [...]

Quick and simple debug stream for C++

Ever need to set up a quick and simple debug/logging stream for your application without having to deal with large frameworks like log4cpp or *shudder* log4cxx? There’s also libcwd, which seems really neat, but also very large. I didn’t want to use all that. I just needed a simple way to filter my output using [...]

C++ Style Redux

I just discovered the POCO library. It’s pretty neat-looking: it has a number of components that provide functionality that goes beyond the standard C++ library, such as threading support, networking, XML reading/writing, etc. The cherry on top is that not only is it similar to boost in terms of functionality, it seems smaller, more portable, [...]

Understanding STL Containers

This article is a really great way to start understanding STL containers. It discusses the differences between a vector and a deque (a double-ended queue) (you’ll often see C++ rookies as “what’s the difference between vector and queue” or something like that, and the answer is usually “if you have to ask, just use vector”. [...]

C++ style anarchy

I’m sure I’ve blogged about this before. I just don’t know where. It drives me nuts. In what other languages, other than C and C++, is it acceptable to totally ignore the style that the standard uses? In Java, the “standard” is the Java API written by Sun. Everyone, and I mean everyone who writes [...]

C++: A threaded timer

I have written a threaded timer that will start on command, and stop on command using the boost threads library. here’s the code: /* copyright Benjamin Collins 2006 * please contact for licensing information */ #include #include #include #include #include #include typedef boost::recursive_mutex::scoped_lock rt_slock; namespace { bool _start = false; boost::recursive_mutex start_mutex; boost::condition start_condition; bool [...]