skip to content | skip to sidebar

archive for the 'coding' category

pycpuid 0.2

Thursday, October 1st, 2009

It’s been more than two years since I’ve released the first version of my pycpuid module for Python. I haven’t been using it since, but as some people do, I decided to upgrade it a little. The result is pycpuid-0.2.0.zip. It’s still an unfinished work (I would like to add some more of the high [...]

name hiding and the using-declaration

Thursday, March 12th, 2009

This post is inspired by a question posed by a colleague some time ago. Consider following C++ code fragment in which B derives from A and declares a fun with a different signature: #include <iostream> struct A { void fun(int x) { std::cout << “int A\n”; } }; struct B: A { void fun(float x) [...]

How To Write Shared Libraries

Monday, March 9th, 2009

This post serves as a bookmark for a little gem I’ve found: How To Write Shared Libraries (pdf) by Ulrich Drepper. It’s a 47 page document on writing shared libraries in a Unix environment.

Python string interpolation trick

Sunday, December 7th, 2008

Today, I will show you a trick that may help you with the heavier string formatting jobs in Python. Most people using Python know how to format output using string interpolation. It works much like C’s sprintf, except for the funny % operator: >>> a = “the Knights” >>> b = “Ni” >>> “we are [...]

manuals on software optimization

Friday, December 5th, 2008

While looking for some info on 64 bit masm, I stumbled on Agner Fog’s site with five comprehensive manuals on software optimization. Each covers a different topic: optimizations in C/C++ and assembly, microarchitectures, instruction tables and calling conventions.

pyvtuneapi 0.1: VTune API for Python

Wednesday, July 11th, 2007

pyvtuneapi is a very simple extension that binds the VTune API to Python. If you have VTune, and you’re using it to profile a Python driven application, you can use pyvtuneapi to pause and resume the analyzer.

does KB936357 patch kill VS2005? (probably KB928365 instead)

Wednesday, July 11th, 2007

As you could read in my previous post, my devenv.exe stopped working since last Patch Tuesday updates. Since rebooting and even reinstalling the entire VS2005 suite didn’t resolve the problem, I’ve tried the only other approach I could think of apart from reformating my laptop: reverting the windows updates. I made an extra backup of [...]

today, vs2005 died, badly!

Wednesday, July 11th, 2007

Today, after a mandatory reboot because of a patch Tuesday windows update, devenv.exe of Visual Studio 2005 no longer wants to start. Well, it tries to start, and sometimes it gives a flash of its main window, but then it dies without a cry. The first thing one tries to resolve the problem is to [...]

Cross-platform minidump with Google-Breakpad

Sunday, June 17th, 2007

From my previous post, you might know about my recent interest in minidumps to debug remote applications. Since then, I’ve been trying to implement an automatic and unattended crash dump facilitiy in Lass. On the Win32 platform, the key functions are SetUnhandledExceptionFilter in kernel32.lib and MiniDumpWriteDump in dbghelp.lib. The former lets you set a function [...]

fun with crash dumps and remote debugging

Saturday, June 9th, 2007

Yesterday, I had some fun playing around with remote debugging and examining crash dumps. In the lab, we’re currently running a lot of noise map simulations for a project we’re involved in. These simulations are distributed over all available computers in the lab, a mixture of old and new, often actively used by other people [...]