Just a quick note: I feel like I’ve accomplished a lot today just because I READ this article. Nice bomb drop. We’ll see what I do with it… I think it’s a bit too crunchy to put into use – I don’t feel like dealing with any gotchas on all the versions of all the compilers I’m using, as there are a LOT these days. But it has lead me to research other progress in the C++ standard. The boost function library, which has been accepted into TR1, is already available in some compiler spaces, whoop.

I started down this path because I wanted to store a predicate function in my sorted_vector class. For now I can get by without this stuff, always passing in a functor to the function calls that need it, but that’s not as elegant.

Meanwhile, it’s upwards and onwards with QT slots and signals – QT is getting the job done for me in a major way. There are boost::signal and boost::bind as alternatives to that, but I’m really kicking out the jams with QT, so I’m not stopping now. More to come soon, hopefully.

UPDATE: C++0x is hopefully coming soon. Wikipedia, as usual, gives a nice overview and some nice guidance. In particular, I need to avoid std::auto_ptr and function object base classes (std::unary_function, std::binary_function) which are slated for removal(!). Sounds like I need to keep my eye out for polymorphic wrappers for function objects, they may be just the ticket I need. Check out the whole standard, it’s juicy! :>

UPDATE 2: Here is a nice rundown of options for the sort predicate function, leading into the C++0x solution.

A recent mysql update from portage requires this to get it back up and running:

mysql_upgrade -p
/etc/init.d/mysql restart

The article is on the wiki, check it out if you have a minute and see what you think.

To get through “libpng12” errors on latest [emerge world] (it apears that libpng14 went stable before its time :0)…

gcc-config -l
gcc-config (pick most recent number)
lafilefixer --justfixit
revdep-rebuild -i (a bunch of times, unemerging old blockers)
emerge --unmerge libpng
emerge libpng
emerge libpng:1.2 (see here for the whole ugly story)
lafilefixer --justfixit
etc....

Still working on this… Note that one way to find all the libraries that need libpng12 is…

grep png12 `find /usr/lib64/ -name '*.la'`

… but that’s a LOT OF SHIT. :>

Still going… lots of [emerge -Davu world] and [emerge –skipfirst –resume] attempts… and this to get past lots of kde blockers…

emerge --unmerge kde-base/solidautoeject kde-base/soliduiserver kde-base/kontactinterfaces kde-base/solid-hardware kde-base/akonadi

I love the flexibilty that git provides, and the way it fits into distributed development.  That’s the only reason I’ve been able to tolerate the hackery that is known as msysgit, the “official” Git release for Windows.

msysgit basically dumps an entire linux distribution on your Windows box when you install – ported versions of perl, vim, bash, it’s all there, just to wipe msysgit’s butt.  What a mess.  Imagine if every port was done this way.  But we’re stuck with it for now, so let’s get it working.  Which.  Isn’t.  Easy.  Especially when it comes to setting up an editor for commit messages when using a batch file script.

There are alternatives.  You can right-click on a folder and run a “Git Bash” from that location, which is hacked together to work well enough.  VIM will kick in to let you edit your commit messages.  And there are writeups on getting Windows Powershell to get along with msysgit.  But I want to use git from simple Windows batch files.

To do so, I had to do the following:

  • Install notepad++, a nice reliable simple Windows editor.
  • Set up a batch file to run notepad++ – make sure that the batch file does not have any spaces in the path to it – I named mine [c:\short\npp.bat]:
    #!/bin/sh
    "C:/Michae~1/System~1/npp/notepad++.exe" -multiInst "$*"
  • Note that I used short names in the notepad++ path to avoid spaces.  I also found that a single quote in the path will screw up msysgit.
  • Now in a batch file, you should be able to set EDITOR to use it:
    set EDITOR=C:/short/npp.bat
    git commit -a
  • You can now set the editor up for use in the msysgit bash prompt as follows, it doesn’t seem to interfere with the batch setup (for SOME strange reason):
    git config --global core.editor C:/short/npp.bat

Without ALL of these steps, it just won’t work.