30 January 2008

TextChas

I've enabled TextChas on the DRI Wiki. It is now necessary to answer a question when creating an user account and editing pages.

Two weeks have passed, and there was no new spam since TextChas were enabled, which is really nice for a change.

I'm sure spammers can try harder and beat TextChas if they are up to the challenge. But I definitely think that TextChas is a simple and effective solution for the current spam in freedesktop.org wikis. It will, at the very lest, allow us to fight spam against spammers more evenly.

11 December 2007

Profiling DRI drivers

I've been spending a lot of time profiling DRI drivers for Gallium 3D. I've tried gprof, valgrind, and finally oprofile. Oprofile seems the best in my opinion for this purpose. More details on the DRI Wiki.

I also wrote a script to generate a time-colored call graph from oprofile output, using graphviz. See an output example of profiling glxgears on Gallium 3D:

The hotter the colour of a function is, more time is spent on that function and its children.

Using Eclipse for X.Org/DRI development

I've never learned to use Emacs. I love vim, but it doesn't scale for me when editing more than three files at the same time or projects with more than one directory. After two years using Eclipse for Python and Windows C++ development, I've been using almost exclusively Eclipse for X.Org/Mesa/DRI development during the last three months.

I think Eclipse is really a pleasant development environment:

Also, the CDT (the C/C++ Development Plugin for Eclipse) folks are now actively working to get Eclipse not only to debug remote applications, but also build remotely, which will greatly simplify testing on multiple software/hardware configurations.

The thing I miss the most is better git integration. Of course, it is advisable to have a big screen and lots of memory.

For those interested, I've wrote some instructions to get you started on the X.Org Wiki.

07 December 2007

Loading ~/.bash_profile when logging from X

In Debian/Ubuntu, when logging from gdm your ~/.bash_profile or even ~/.bash_rc are loaded, preventing you to set environment variables for all your session. The reason is that gdm starts /usr/bin/x-session-manager directly.

There are many ways to get ~/.bash_profile loaded. Many of which are wrong.

I found that a very simple way to loading ~/.bash_profile when starting X is to write the following ~/.xsession script:

#!/bin/bash --login
exec /usr/bin/x-session-manager

18 May 2006

Mass Renaming in Nautilus

One can easily add new actions in Nautilus context menu by adding shell scripts to ~/.gnome2/nautilus-scripts . Below is a script for mass file renaming, using Perl's rename utility and zenity. Add it to ~/.gnome2/nautilus-scripts/Mass Rename.

#!/bin/sh
# Nautilus script for mass file renaming

set -e

TITLE=`basename "$0"`

# Path to perl's rename
RENAME=/usr/bin/rename


rename_all() {
        IFS=$'\n'
        for FILE in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
        do
                cd "`dirname "$FILE"`"
                "$RENAME" "$@" "$EXPR" -- "`basename "$FILE"`"
        done
}


EXPR="s///"
while true
do
        EXPR=`zenity --title "$TITLE - expression" --entry --text "Specify the Perl expression for modifying the filenames." --entry-text "$EXPR"` || exit

        rename_all -n | sed -e 's/^\(.*\) renamed as \(.*\)$/\2\n\1/' | zenity --list --width 800 --height 600 --title  "$TITLE - Preview" --text "" --column "New name" --column "Old name" && break
done

rename_all

Here are some screenshots:

The latest version of this script can be found here.

01 April 2006

Building the whole Debian archive with GCC 4.1

A lot of hard work from Martin Michlmayr which provided quite an interesting reading.

Technorati Tags: ,

30 March 2006

XML based CVs

XML + a XSLT toolchain is an excellent way to maintain your Curriculum Vitae, supporting several languages and several formats with minimum effort. I've been using the XML Résumé Library for my CV for a while, but the lack of recent updates and a slight unsatisfaction with the look of the PDF output made me want to take a peek on what else is out there.

Didn't find much though: the overall feeling I get is that, though not perfect, the XML Résumé Library seems to be the safest bet out there.

The sole exception worth mention is the work done by David Sora for a subject of his masters degree. He designed a XSD schema together with HTML and PDF XSLT stylesheets for CVs based upon the Europass Curriculum Vitae layout. His report is written in portuguese, but an example CV and XSLT are available for english too (in the parent directory of the report). This might not be picked up a community (such as the one behind XML Résumé Library), but the schema is complete and the output looks nice. Also the layout of the Europass CV is comprehensive and professional — as you'd expect from an initiative backed by the European Union. So definitelyinetly something to look upon whenever I need to tweak or drop the XML Résumé Library.

Technorati Tags: , ,