Making git work better on Windows

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

In a previous blog post I explained how you can substantially improve the performance of git on Windows updating the underlying SSH implementation. This performance improvement is very worthwhile in a standard Unix-style git setup where access to the git repository is done using ssh as the transport layer. For a regular development workstation, this update works fine as long as you keep remembering that you need to check and possibly update the ssh binaries after every git update.

Checking C++ library versions during build time

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

In my previous post, I discussed various strategies for managing third party libraries. In this post I’ll discuss a couple of techniques you can use to ensure that a specific version of your source code will get compiled with the correct version of the required libraries. Yes, you can rely on your package management tools to always deliver you the correct versions. If you’re a little more paranoid and/or spent way too much time debugging problems stemming from mixing the wrong libraries, you may want to continue reading.

Managing third party libraries in C++ projects

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Every reasonably sized C++ project these days will use some third party libraries. Some of them like boost are viewed as extensions of the standard libraries that no sane developer would want to be without. Then there is whatever GUI toolkit your project uses, possibly another toolkit to deal with data access, the ACE libraries, etc etc. You get the picture. Somehow, these third party libraries have to be integrated into your development and build process in such a way that they don’t become major stumbling blocks.

Using ELPA with pinned packages in GNU Emacs 24.4

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Yes, I promise I’ll shut up about Emacs package management via ELPA any minute now. Based on the feedback I had on my last post about using a combination of melpa and melpa-stable, I looked into using pinned packages via the package-pinned-packages variable that’s new in Emacs 24.4’s package.el. I couldn’t find any simple examples on how to use it, but a quick look at the source code and some playing around in ielm got me there.

Set up Emacs to use both melpa and melpa-stable

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I’ve blogged about a little elisp snippet I use to install my preferred base set of Emacs packages before. Thanks for all the feedback, it definitely helped improve the code. One issue that kept annoying me is that there is no simple way to tell ELPA to mainly pull packages from melpa-stable and only fall back to melpa for those packages I can’t get on melpa-stable yet. I decided to extend my code to handle that situation with some manual inputs as I know which packages can’t be found on melpa-stable.

Polymorphism and boost::shared_ptr

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Reposted from my old blog. Here’s the news from 2009… I’m currently in the final stages of converting a library from raw pointers to boost::shared_ptr. I’m mainly doing this to ensure the correct pointer/pointee ownership rather than the outright prevention of memory leaks, but the latter is a nice side effect of the former. One problem I ran into was that the library I’m updating and its clients make rather heavy use of polymorphism.

The official GNU Emacs 24.4 build is available for Windows

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Looks like the Windows build of Emacs 24.4 has been released to http://ftp.gnu.org/gnu/emacs/windows/ on November 15th. As usual, I appear to be a few days behind the times. Time to upgrade and see how it compares to the unofficial 64 bit builds I’ve been using recently. Top new feature in 24.4 for me so far is the new rectangle-mark-mode. I’m doing a bunch of code conversions right now - basically transferring a bunch of manual assignments into a big lookup table - and it’s seeing a lot of use because of it.

Using pantheios to log from a C++ JNI DLL

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I originally published this post on my old blog in 2009. I’ve edited it a little for readability but left the contents unchanged, so it may be out of date and not reflect the current state of the pantheios library. I also haven’t been using pantheios for logging since about 2010, and have been using Boost.Log instead. I recently had to come up with a logging solution for C++ code a JNI DLL/shared library that is providing the data translation layer between Java and underlying native C and C++ libraries.

Using tortoisehg and mercurial on Windows with openssh

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

The default setup for the Mercurial DVCS on Windows with tortoisehg uses plink and Pageant to manage SSH keys when you are using ssh as the transport protocol for mercurial. That’s most likely the right choice for a normal Windows setup, but if you already have openssh installed and configured to talk to various servers, it’s easy to switch mercurial and tortoisehg to use openssh. It’s also very helpful if you’re forgetful like me and forget to start pageant, add new keys to it etc.

A neat way of handling common C++ exceptions

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Another slightly edited post from my old C++ blog. Again, you may have seen this one before. This post is a quasi follow-up to the “little exception shop of horrors”_. As I mentioned in that post, I believe the reason for dumping all the exception handling code into a single header file was a misguided attempt at avoiding code duplication. No, I didn’t write that code, so I can only speculate as to why it was done.