Wednesday, July 22, 2009

Der neueste Kick

Mal wieder eine Meldung auf Tagesschau.de:

"Es ist offensichtlich, dass unsere Milchbauern gerade leiden", sagte sie. "Es geht um echte Menschen und nicht um Statistiken auf einem Blatt Papier."


Etwas weiter unten dann:

Der deutsche Bauernverband hatte das Schlachten von Kühen als eine Möglichkeit gesehen, um das Überangebot an Milch auf dem europäischen Markt zu bereinigen: Wenn anderthalb Millionen Tiere getötet würden, könnte das den Kick geben, um aus dem tiefen Tal wieder herauszukommen.


Mit etwas Glück kommt vielleicht bald die Milch im Kaffee nach dem Steak vom selben Tier. Prost Mahlzeit!

Immerhin, das Fleisch von anderthalb Millionen geschlachteten Rindern reicht in Deutschland keine sechs Monate. Wer wäre da nicht gern Vegetarier.

Sunday, July 19, 2009

Inkscape PDF Export

Inkscape is nice vector drawing program, especially for illustrating Latex documents. In the past, I've always exported to eps first and then converted the docs to PDF using epstopdf. This way, the bounding box is confined to the actual region of interest.

Unfortunately, transparency information is lost in the process. What works, though, is to fit the page to the selection just before directly exporting to PDF. Go to File > Document Properties and press Fit page to selection on the Page tab.

Friday, July 17, 2009

Almost done

At last, I've completed my final thesis. Seven exciting years as a student passed almost too quickly. In a week from now, it'll all be over. Finally, time for traveling, working on Pympler and SCons, getting an interesting job.

In the process of finding a new home, our old server will probably be disconnected before very long. Therefore, it is time to find a new haven for ideas, thoughts and casual code snippets.

Sunday, August 31, 2008

Empirical Comparison of SCons and GNU Make

A course work of mine, entitled Empirical Comparison of SCons and GNU Make, is now hosted at the company site of my tutors. Thanks guys!

Wednesday, August 13, 2008

Thursday, April 10, 2008

Upgrade to Hardy Heron vs Trac and sqlite

Today I tried something which I don't really expected to work. After a direct upgrade from Dapper to Hardy, Trac stopped working:

"file is encrypted or is not a database"


There's a version conflict between the Trac database and the accessing sqlite version. The best solution I found while searching the web, was to convert the databases manually:

sudo -s
apt-get install sqlite
cd /var/your-trac-project/db
cp trac.db trac.db.orig
sqlite trac.db .dump > trac.sql
rm trac.db
sqlite3 trac.db ".read trac.sql"
chown www-data:www-data *
trac-admin .. upgrade


After that, Trac worked again.

Saturday, March 1, 2008

Automatic make dependencies without sed

I'm currently working with plain GNU Make based projects and - again - I tried to find a nice way to automatically track dependencies and finally found a nice solution when skimming over the g++ manpage. There is a lot of black art flowing around, e.g. this gem is from the GNU Make manual:
%.d: %.c
@set -e; rm -f $@; \
$(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$


Not for the faint of heart, also the thing done by sed is quite trivial. If all you have to support is gcc (portability is overrated!), there's a much more simple way to achieve the same (and more):
%.o: %.c
$(CC) -MMD -MP -MT '$*.d' -c $(CFLAGS) $< -o $@