How near is Drupal 7?

15 December, 2009 - 10:52
Categories:

Since May 2009, I'm monitoring the Drupal 7 issue queue sizes. I use a cron job in Python that goes out four times a day to drupal.org to scrape the issue queue sizes mentioned in the "contributor links" block.

The idea is to see if the time series can be used to have some estimate when Drupal 7 will be ready. For a long time, the overall trend was a rising one and simple extrapolation would tell that Drupal 7 would never be ready :)

Since the beginning of December 2009, it seems that the "critical D7 issues" queue is finally in shrinking mode, so I thought the time was right for releasing an overview of my current data. Moreover, there is now a public Drupal 7 issue size tracker with more web-2.0-shininess by Damien Tournoud (with less history however), so I should contribute my data instead of keeping it for myself.

Read more...

Inkscape and Gimp on OS X: ALT key and copy/paste issues.

5 December, 2009 - 03:13
Categories:

Inkscape and the Gimp are trusty tools in my daily tool box for various vector and bitmap image editing. Being open source applications, they have firm roots in the Linux world, but luckily they are also available for Windows and Mac OS X. No wonder I have them installed on my MacBook too.

The problem

On OS X, Inkscape and the Gimp are not completely native applications, but they depend on X11.app. This extra layer makes the user experience unfortunately less streamlined than with native applications. Especially the keyboard interaction of an out of the box setup can be clunky.

Read more...

An audio conversion use case: comparison of execution speed between SoX, FFmpeg and MPlayer

4 December, 2009 - 15:44

In a previous post I listed some options for audio data manipulation (conversion of format, sample rate, bitrate, trimming, etc), with SoX, MPlayer and FFmpeg. The obvious question is now: which one is best?

Read more...

Audio format conversion cheat sheet (aka how to)

2 December, 2009 - 14:17

In my day job, I regularly have to convert/transcode/re-encode audio data from one format to another. Because I typically have to do this in batch jobs, I'm mostly dealing with command line tools (on Linux) like Lame, SoX (Sound eXchange), MPlayer and FFmpeg. Having a cheat sheet of how to invoke them with the desired options has proven to be very useful, so here is mine. Note that I only cover the operations I mostly need, like format conversion, sample rate conversion, conversion to mono and trimming/cropping. If you need more/other functionality, look in the man pages or ask your favorite search engine.

[Update] also see a follow up blog post about an execution time comparison between SoX, FFmpeg and MPlayer.

Read more...

Overwide figures in LaTeX

26 November, 2009 - 13:05
Categories:

When using default LaTeX styles, you get a rather small text width. This is for a very good reason: readability. However, when you want to add an image, figure or table, this width can be a bit limiting. If you naively add an image (or table) that is wider than the text width, the image will typically align on the left margin and extend into the right margin, which is not that pretty. Moreover, because you're not using the left margin, it limits the maximum width you can use.

Read more...

My bashrc, bash aliases, profile and other files

19 October, 2009 - 15:30
Categories:

I spend a lot of time on the (bash) command line in (Linux and OS x) and it's always good for productivity to have your favorite set of shortcuts, aliases, perferences, predefined (environment) variables and such at your fingertips. You know, all the stuff that lives in .bashrc, .profile, .vimrc, .git, etc.

I have access to several systems (at home, at work, remote servers, etc) and from time to time I'm sitting behind a system that doesn't know my preferences yet. I considered using some sort of version control system to "synchronize" these preference files between my setups, but (apart from the practical hurdles) it generally seemed overkill, especially since each setup can have its own peculiarities and customizations.

So, mainly for my own reference, I'm keeping an list of the most important general stuff here. Be welcome to cherry-pick (or suggest additions).

Read more...

Time-lapse of construction site "Het Ufo" of Ghent University

1 October, 2009 - 13:04
Categories:

In front of the place I work, Ghent University is constructing a new building with two large auditoria and office space, called "Het Ufo" (Universiteitsforum). Being in the digital age, there was of course a webcam pointing at the construction site. Since 21 September 2007, I had a cron job running to capture a photo each day. Apparently, the cron job died on 18 august 2009 for some reason, so my pile of daily photo's stopped growing. Time to put them together in a time-lapse video:

Update: Michiel Ronsse (see comments below) also had a cron job running and kindly provided me with extra frames from July 2007 to September 2007. This is the part when there is no concrete yet.

Read more...

Matlab WTF: Inconsistent short-circuit behavior of logical operators

24 September, 2009 - 09:38
Categories:

I just stumbled on another reason to dislike Matlab: the stupid inconsistency of the short-circuit behavior of the elementwise logical operators: the statement

fun(2) | fun(9999)

does not short-circuit, so both fun(2) and fun(9999) are executed, but when used in an if or while expression like

if fun(2) | fun(9999); end;

the expression does short-circuit, meaning that only fun(2) is executed.

I know, you also have the || and && operators, which are defined as short circuiting operators, but the inconsistency with the | and & operators is just stupid, if not evil.

Read more...

C++-MEX files compilation problems under Ubuntu 8.04 (Hardy)

23 September, 2009 - 18:09

How unpleasant I may find it, sometimes I have to use some tools in Matlab at work. Today I stumbled on a problem with compiling MEX-files written in C++ on my Ubuntu 8.04 (Hardy Heron) box. To illustrate, I'll use the example C++ MEX file mexcpp.cpp provided with Matlab (Matlab r2007a) in the extern/examples/mex/ folder.

Out-of-the-box compilation with

mex mexcpp.cpp

gave the following warning:
Warning: You are using gcc version "4.2.4". The earliest gcc version supported with mex is "4.0.0". The latest version tested for use with mex is "4.2.0". To download a different version of gcc, visit http://gcc.gnu.org

Despite the warning a MEX-file mexcpp.mexglx was generated. However, its usage resulted in the following:
Invalid MEX-file '/foo/bar/mexcpp.mexglx': /matlabdir/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /foo/bar/mexcpp.mexglx).
As a sidenote: compiling MEX-files written in C also caused the warning message, but using the compiled MEX-files did not fail.

Read more...

Python: hiding attribute getters and setters behind standard attribute access

22 September, 2009 - 15:41
Categories:

Look at this small snippet of Python code:

x = TooMuchAlcohol()
 
x.value = 10
print x.value
 
x.value = 'foo'
print x.value
 
x.value = [1,2,3]
print x.value

Seems like pretty boring stuff, but look what it spits out:

20
foofoo
[1, 2, 3, 1, 2, 3]

Oh my god, I see everythin' double!

Read more...