Wednesday, July 30, 2008

From FAT32 to NTFS

I have an external usb drive which I use for backup and since I need to access it from Windows and Linux I kept it as it was when I bought it, i.e., FAT32 file system. However, FAT32 is not the best file system around :-) and since I now can access NTFS from Linux too, I wanted to convert it to NTFS.

Luckily the Windows utility convert.exe seems to work pretty well since it performs the conversion without destroying your data!

All I had to do was to run this command (the external hard disk has letter H:):

Convert H: /FS:NTFS /V /NoSecurity

and insert the current label of the disk, and everything went fine :-)

Thursday, July 24, 2008

Gengetopt Eclipse 1.1.0

Here's the new version of the eclipse plugin for editing gengetopt files:

I've fixed a bug that did not make gengetopt editor share the standard text editor features such as line and column numbers and quick diffs.

Code completion is now improved and double quoted strings are automatically completed.

Furthermore I've implemented the formatting strategy so that the gengetopt file contents can be automatically formatted (probably this feature needs some more tweaking :-)

Furthermore, now a small help is available (basically it's the same content of the web page).

The next step should be the (background) parsing of the contents of the ggo file.

Thursday, July 17, 2008

GNU Source-Highlight 2.10

Here's the new release of GNU Source-Highlight.

From the architectural point of view, I completely re-written the engine that uses regular expression, since it is now oriented towards a library (I'll try to extract a library from source-highlight as soon as possible, in order to provide, e.g., highlighting functionalities to qt text editors without the need to implement the qt highlighter yourself).

Here's the complete list of changes:

Version 2.10

* formatting is applied even when generating anchors and references
* noref is handled also for output languages using onestyle (e.g., xhtml)
* improved fortran highlighting
* improved python highlighting
* fixed title in docbook output
* language definition for ldap files (e.g., ldiff files)
* language definition for autoconf files
* improved m4 language definition
* improved logtalk language definition
* url.lang handles ~ in urls
* language definition for glsl.lang (provided by Cesare Tirabassi)

There are some new languages that are highlighted, in the following you will see some examples:


dnl this is only for developers who use double dispatch
dnl doublecpp can be found at

dnl this is for testing purpose and development

dnl this is only for developers who use change command line options
AM_CONDITIONAL(NO_HELP2MAN, test -z "$ac_cv_path_HELP2MAN" )

dnl this is for generating references
AC_PATH_PROGS(CTAGS, ctags exuberant-ctags)
if test -n "$ac_cv_path_CTAGS"; then
AM_CONDITIONAL(NO_CTAGS, test "$ac_ctags_flags" = "no" )
AM_CONDITIONAL(NO_CTAGS, test -z "$ac_cv_path_CTAGS" )


# comment line

dn: cn=Foo Bar,
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mozillaAbPersonAlpha
givenName: Foo
sn: Bar
cn: Foo Bar
mozillaNickname: albe
modifytimestamp: 0Z
my_odifytimestamp: 0Z


#version 120
#pragma optimize off
#pragma debug on

uniform vec4 vSkyParams;
varying ivec4 vpos, lpos;
varying bvec2 wave0, wave1, wave2;
const float lambda = 2.0;

void main(void)
// Texture coordinates generation
vec2 vTexCoords = gl_Vertex.xz*vSkyParams.z;

// Scale texture coordinates to get mix of low/high frequency details
wave0 = vTexCoords * lambda + vSkyParams.w * vec2( 0.5, 1.0 );

// Perspective corrected projection
gl_Position = ftransform();
vpos = gl_Vertex;
lpos = gl_LightSource[0].position;

// Compute normal (assumes this is a sphere)
vec3 norm = normalize(vpos).xyz;

//Compute sun light
vec4 sunlight = vec4(pow( max(0.0, dot(light,norm)), 1024.0 ));

// Get bump layers
vec3 vBumpTexA = texture2D(BumpMap, wave0).xyz;

//Add an horizon haze
float haze = pow(gl_FragCoord.z*(1.0-norm.y), 10.0);
skyColor = mix( grey, skyColor, haze );

gl_FragColor = skyColor + vSkyParams.x*sunlight;

Wednesday, July 16, 2008

Eclipse & CVS in Windows

As you might have guessed I'm a Linux fan, and I'm using it most of the time, especially when I program. I'm also a big eclipse lover! However, sometimes I happen to have to use windows for programming and there's no problem concerning eclipse, since it runs perfectly on windows. Eclipse also provides an excellent CVS integration, but concerning this point I've always found that it is a big lacking that you can only use remote CVS servers and not local repositories... Well, I know that CVS is thought for collaborative programming, but I'm using it also to store all the versions of programs I work on alone (and I know many others do like this). Of course, under Linux it's a not big problem, since you install a local ssh server. But in Windows I had always experienced problems...

I then decided to go back to WinCVS,, which I had been using for a long time before eclipse came. During the installation, I noted that it was installing also CVSNT, a server for CVS under Windows. My problems with trying to setup a CVS server under windows were probably due to the fact that I was trying to use the one with cygwin which required an involved procedure (which never worked for me).

Well, CVSNT seemed to have solved all my problems! First of all you need to configure your repositories. Note that you can give the repository a symbolic name. This is pretty cool since it allows me to use the same path as in Linux

Then I checked the option "Pretend to be a Unix server", since the help says that programs like eclipse require this.

At this point, everything already worked fine, and I could access my local repositories from eclipse using pserver protocol, and using the user/password of Windows.

However, for C++ programs using autotools, I kept on having problems since the autotools scripts failed due to the \r\n DOS lines that seemed to be introduced during checkout.

Fortunately, this is easily solvable by configuring eclipse, by disabling "Convert text files using platform line ending" as shown in the following screenshot:

After a brand new checkout, everything worked like magic! :-)

Sunday, July 13, 2008

Videos on Ipod

I finally got an Ipod classic! I was quite skeptical about this music player, but since the price went down, and the giga bytes up, I decided to get an Ipod classic 80 gb, and I'm really enjoying it. However, I cannot say the same about the way I can access it. For the moment, I couldn't access it with Linux (well, I actually accessed it with amarok, added new files, deleted some, changed playlists, only to find out that afterwards the Ipod did not see any music, and I had to restore it; I'll work on this anyway), so I had to resort to Itunes.

I'll talk about some problems about this probably next time. The real sad surprise was that I just couldn't add videos on the Ipod (not even on Itunes), since you need to convert it to the required format. Actually the documentation does not say much, but you need another program for the convertion (actually, I'm not talking about the stuff you might buy on Itunes store).

After the disappointment about the converter I found here, which basically does not work at all for me, since it crashes after taking quite a long time even for a simply video of about 10 minutes, I tried this other one (which is also free): Videora converter.

This program is actually really full of ads (it contains a browser), but it does what you need, and it's actually quite fast!

But watch out Italians: you will probably get a terrible 10000 error when you start the conversion. It looks like it does not like the way dates are expressed (dd/mm/yyyy), so you need to change your regional setting from the Control Panel, and set it to English (at least when you need to use this program).

After this everything works fine, and after the conversion, you'll be able to import the generated mov file into Itunes and/or into the Ipod.

By the way, videos on Ipod really rock! :-)

Eclipse Ganymede

I finally took the time to give a try to the new version of eclipse: 3.4, codename "Ganymede".

I've been using it only for a few days now, but I was really impressed :-)

It looks like it's a little bit faster in many operations (but this might be an impression).

But what I really appreciated now, is the new update mechanism. Although the previous update (and also install new features) procedure was not bad in the previous versions, it still required to select manually the mirrors if you wanted to make sure the get a fast one, or simply rely on its automatically mirror selection feature, which, however, never chose the right mirror, at least for me.

Moreover, you first had to wait that all the update sites to be contacted, or select only a few sites in advance; if something went wrong, you needed to start again.

Well, now once you select the software update menu, you have a single windows with two tabs; the first one shows the installed plugins (really useful to have it in this place) and possibly update them, and the second one for installing new ones.

Moreover, you can inspect each single update site and its provided features directly from this window (and no mirror selection is required):

Really really much much better now :-)

Eclipse rocks! :-)