19 Jul 2004 shlomif   » (Master)

Installing GIMP 2.1.x

To keep up with GIMP development (also see below) I needed to install GIMP 2.1.x from the CVS Head. So far so good, only that it requires Gtk-2.4.x, while Mandrake 10.0 ships only with version 2.2.x of it. I decided that in order to not mess too much with my system, I'll install it (and all the other dependencies) in a separate /usr/local/apps/gtk-2.4.x prefix.

So I started downloading and compiling everything with the --prefix flag, but then run into a problem. When compiling gtk+ (after compiling its dependencies), I got:

/home/shlomi/Download/unpack/gui/gtk+-2.4.1/gdk/.libs/libgdk-x11-2.0.so: undefined reference to `g_unsetenv'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_type_instance_get_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_completion_complete_utf8'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_param_spec_get_redirect_target'

Someone on the IRC told me that it was because it linked against an older version of glib. After some grepping the .la files, I found out that the atk .la file contained a reference to /usr/lib/glib. (the global un-upgraded glib).

Eventually I realized that I had to use the following script for compiling atk:

export PKG_CONFIG_PATH=/usr/local/apps/gtk-2.4.x/lib/pkgconfig/
export LD_LIBRARY_PATH=/usr/local/apps/gtk-2.4.x/lib:"$LD_LIBRARY_PATH"
LDFLAGS="-L/usr/local/apps/gtk-2.4.x/lib" ./configure --prefix=/usr/local/apps/gtk-2.4.x/

That solved the problem. Afterwards, I had to install some support libraries that GIMP required. I eventually opted to use --with-svgz=no (no gzip compression) for librsvg, because otherwise it required a bootload of dependencies.

Eventually everything was installed, GIMP was compiled fine, and I was able to continue hacking on it.

Gradient-Fu Patch

As the GIMP 2.1.x development started, integrating my gradient-fu patch was one of the first priorities. This patch, as you may remember, supplies the GIMP with PDB entries to manipulate gradients. So, early in the GIMP 2.1.x tree, Michael Natterer integrated the patch into the GIMP (with some cleanups and modifications to the API). Then, when I wanted to adapt a script I wrote to it a while back, I discovered it did not have functions to actually manage the gradients list (create, delete and rename gradients). So I wrote one, and Naterrer added it after some modification.

I also adapted my old "Rainbow Strips" gradients' demonstration script to the new API. I also performed some general cleanups to the otherwise amateurish Scheme code I wrote back then. (not knowing better). It was eventually ready, but I don't think it's in the Gimp CVS head yet.

My sister and UNIX

My sister Noa had some C-shell assignments in her homework as part of her "Introduction to Systems Programming" course. I helped her in it. While I did that I explained to her about using basics: wildcard expansion ("*" into all files), program return code, argument values, etc. I also demonstrated some bash paradigms to her, and kept tauting its superiority over csh.

Some time ago, a record was broken: both my sisters were at the working room, and both were working on the Linux system, while I did not and could not. Michal was playing the KDE game Kolor Lines on the desktop computer (where the Linux system is installed), while Noa was using a VNC connection for her homework from the laptop. Amazing!

Job Interviews

Having graduated from the Technion, I'm now looking for a job. I've sent my C.V. to job ads in newspapers, the Internet, etc. and renewed my availability in various human resources agencies. So far, I had 4 job interviews.

The first one was for the DIMES project, which is a project in Tel Aviv University, that aims to map the Internet, by volunteers installing clients on their computers, and using them to send information to the server which will concentrate them. I think the interview went pretty well, but they did not contact me since. (they had other candidates) Tel Aviv University is very convenient for me, as I was able to walk there from home.

The second one (that took place last week), was at a startup called DiskSites. They manufacture an embedded Linux box that caches files that are transported over remote-file-service protocols (like SMB) over a WAN connection, so there will be less latency. The interviewer talked with me a bit about my past and then asked me a few technical questions. I did pretty well at it.

Today, I had a second job interview there, with the CTO (if I recall correctly). He asked me about my professional past and wanted to learn some things about my personality. It also went pretty well, but since they probably have other candidates, I'm not sure I got the job. He told me that they will let me know what their final decision regarding my employment is, at most two weeks from now.

Then, I had a job testing application at a company called Flash Networks on Tuesday. The questions there were challenging, but I did well on the test. ( except for the last question which required some TCP/IP zen). An employee there called lately, when I wasn't available, but I don't know exactly when . I know it because I saw a sticky note my Mom wrote for it.

Due to the fact that there are still more people looking for jobs, than job openings, finding a job may take some time. I just have to be persistent and not give up.

(BTW, the DiskSites office is located at Azrieli Center right next door to Qlusters, which is a past workplace of several friends of mine - sometimes nicknamed "Clue-less" by them.)

Bike Incident

One day when I was biking, I stopped at my usual place next to the water fountain in the Yarkon Park. An Arab kid approached me, and kept requesting me if I could let him have a ride on my bike. I told him I was just drinking water and that then I'll go on. Still, he kept insisting. Then he asked me if I had a pump to fill the air in his bike's wheels. I did, so I helped him fill some air there.

While, I filled some air, he got on my bike (without receiving my permission), and rode it. I think he was too short for this bike, and he also rode on the lawns. But he eventually came back, thanked me and jokingly asked if we could switch bikes. This wouldn't have worked, naturally, as his bike was far too small for me.

Ahh! Kids these days...

In any case, my bike had a few other issues since then. First of all, I changed the tire of a wheel, because the previous one got veryworned out. Now, there's a problem that the pedals are jumping, and I have to take it to the bike fixer.

Installing Maypole

I was considering writing a better NNTP reader for the perl.org newsgroups/mailing lists. I asked for help on FreeNode's #perl channel, and was told that the Maypole framework can do a lot of the things I'm looking for. One can also write a NNTP driver to it, so it will read things out of NNTP. So I set up to install it. Well, easier said than done.

Typing install Maypole at the CPAN.pm prompt failed to do the job. Eventually, it turned out I had to install a suitable driver for the DBI (for SQLite or whatever), and to temper with libapreq to get Apache::Request (which I think I eventually installed from RPM). Eventually, all the modules were installed, but getting the sample application to run was also problematic. I had to configure Apache accordingly. Afterwards, it turned out I missed the part in the documentation where I had to put the templates, in the appropriate path, and without it, it refused to work..

Then I got it to work, but the site looked considerably uglier than the screenshots at the Perl.com article. Possibly tweaking the templates and the CSS stylesheets will make it look better.

Maypole has a whole slew of dependencies and I was afraid the perl.org admins won't be willing to host an application written with it. I e-mailed them, and they told me it was relatively OK, but that there were other tricky parts.

I did not yet get to writing the NNTP interface because I was busy in other things. Maybe I will, sometime.

Perl Zen

I never really understood what was the difference between the ".." and "..." Perl operators. So, one evening I set out to understand it. I read the perlop man page again, and consulted people on the IRC. It turns out that with .. both states can change at once, while with ... the true one needs to change by himself. I wrote an example to illustrate the difference, and sent it as a patch to perl5-porters. It was incorporated immediately, which made me disappointed.

Hebrew Common Errors List

I started preparing a list of common grammatical and syntactical errors in Hebrew. (the page is in Hebrew (naturally), sorry) After I finished some of them, I posted a message about it to the Hebrew translation mailing list, with a small rant saying that I was tired seeing errors like that times and again on Hebrew forums, which was why I wrote the article. Some reader of the translation list has Whatsupped the document, which caused an active discussion (if not flame-war). Some of the comments there were useful, but not too many. I think I'll continue working on the document, and hope it won't get whatsupped again, without me initiating it.

Gimp Gimpressionist Work

Gimpressionist is one of my favourite GIMP plug-ins. What it does is take a picture and paint it using a specified brush and other parameters. A few days ago, I noticed it did not have a usable GIMP Procedural Database entry - you could not even specify one of the pre-defined preset. So I set out to correct it and sent this patch. It was eventually applied by Michael Natterer.

As I did, I noticed that the gimpressionist code was very messy, and started to clean it up. I refactored it heavily (reminded me a lot of Joel Spolsky's Rub a Dub Dub article) and also fixed many bugs. Most of my changes were incoroporated into the GIMP CVS by Michael Natterer or Sven Neumann. Eventually, they saw that I was consistent enough, and gave me a CVS account.

So now I can incorporate things on my own. There is a certain modified version of gimpressionist available (of before I applied my modifications), by Bill Skaggs that has some interesting ideas. I'd like to look into doing something similar starting from the current codebase.

As a long term goal, I thought that instead of generating a bitmap, that it could generate an SVG ("SVGimpressionst"), with one component for each stroke. Skaggs liked the idea quite a bit, but it's just long term.

Technion Graduation Ceremony

My father, my mother, my sister and I attended the Technion graduation ceremony. It was scheduled at the exact time of the Israeli Perl Mongers meeting and so I was not able to attend. Instead, I went to see the ceremony.

Before the ceremony began, I met Eran there, who returned my "Programming Perl" book which he borrowed. We talked a bit, and it turned out he graduated with an average of 85%-86%, which was only slightly better than mine. I expected his average to be considerably higher than mine. He left before the ceremony started, because he did not want to attend it.

The ceremony was split into two parts: the Technion-wide ceremony, and the ceremonies of each department. The Technion-wide ceremony started by the Academic March of the various deans in their black graduation suits (a few collar colours were missing though). It was followed by speeches by various people. One of them told quite a few old jokes (and not very well). There were also some performances by Technion students of three songs ("Take a Wife and Build a Home for Her" by Shalom Hanokh, "In My Life" by the Beatles and "A New Beginning" by Yehuda Poliker). I like these songs and the performances were good, so it was quite nice.

What was stressed was that the Technion governmental budget has been heavily decreased, which placed its future in jeopardy. A part I really liked was that one of professors said, that although only some of the students were cum laude students ("excelling" students in Hebrew), due to the Technion academic requirements, all graduating studnets were excellent ones. I could not agree more, but I still think there are many unnecessary frustrations in Technion studying, that can be eliminated, without lowering the academic level. Another thing that happened, was that the Summa Cum Laude students were awarded the degrees before the rest.

Then came the department ceremony. The department's dean speech was amusing with some nice jokes. (like "I know you are anxious to receive your degree, and I realize the only thing that delays that is me speaking here"). Then started the long process of giving the degrees: first to the Summa Cum Laude students, then to the Cum Laude ones, and finally to the other students.

When I was giving my degree, the dean asked me what I was doing now. So I told him: "Looking for a job, and working on Open Source software". :-)

I recognized a few students I knew, which was nice. As the ceremony progressed, my father started jokingly shooting the first names of the students who received the degrees, to cheer them. That was quite silly of him, and he knew it. Eran's name was given, somewhat after me, but he naturally, wasn't there to receive the degree.

We returned home, taking the road behind Mt. Carmel. (to avoid the traffic jams from the rest of the graduates). On the way back, we stopped to eat McDonalds' at Yoqne'am. We arrived home quite late.

Perl.org.il Variable Naming/Tabs vs. Spaces/Editor war etc.

Check this thread on the Israeli Perl Mongers mailing list for an amusing and long thread that discusses editing conventions. (variable naming, code style, editing features, etc.) It's hard to summarize and has many amusing parts so just read on.

Subversion's get_locations() Patch

The Subversion get_locations() patch monolith was applied into the Subversion trunk (after some rework) by Peter Lundblad. I'm happy it finally was, because I invested quite a lot of work into it.

Telux Lecture

I gave a lecture in Telux which was a re-run of my Haifux' Autoconf/Automake/Libtool presentation. Before the lecture, Eran called to inform me he had an interview in my area, and would like to meet. I told him I was going to give a presentation and invited him to hear it. He had some problems in getting there, but eventually attended it.

As far as I could tell the lecture went quite well. A few questions were asked and answered, and I was able to give some interesting demonstrations. (which were quite missing from the early one). Among the things I learned was that there was no strdup() function in the ANSI C89 standard, and only in C99 and in most UNIXes. This explains Autoconf has a macro to check for it.

After the lecture Eran and I went to Kanyon Ramat Aviv to grab a byte. On the way, while we were eating and afterwards, I told him about the history of UNIX (AT&T UNIX, the BSDs, System V's, GNU, Linux, etc.) and other things. Then we went to meet his sister, and as she was in Tel Aviv, but not familiar with the geography, we walked all the way to the Train Station (a very long walk, where I decided to escort Eran, even though my home was in the opposite direction), after which we had to walk somewhat more, and to enter her car on the road. I instructed them how to drop me at home, and to get to the Haifa highway.

It was nice meeting Eran again, and the lecture was also a fun event.

C++ quirks

My sister has to prepare a C++ assignment for her homework. I instructed her how to do it, using what is left of my quite rusty C++ knowledge. One thing we tried was to use qsort() with giving as a callback an instance of a template function. This worked perfectly in g++ 3.3.2 on Linux, but Visual C++ 6.0 gave some weird compilation error, which we could not understand. One guy on the IRC (FreeNode's #c channel) just instructed us to use a newer compiler. It's weird that there is this limitation, even in this version. It also worked fine in a newer version of DevStudio.

Eventually, my sister resorted to working on it on Linux, using VNC. The assignment needs to work on Solaris with gcc, so it isn't required to make sure it runs nicely on older versions of DevStudio.

Perl Zen (2)

Yesterday, I attended a FreeNode #perl discussion where someone (calling himself simcop2388) was trying to figure out why his Perl code was failing. It was generating some kind of regular expression to parse Assembler code, and Perl indicated there was an error in the regex. The error reported was of an extraneous ")" character right at the end.

To find out what the problem was, I wrote a perl Module, that overloaded the strings constants, by putting them inside classes with an overloaded "." (= string concatenation) operator. I logged all the places where it concatenated two strings with the right string ending with ")", to STDERR.

After a while, I detected where it happened. The offending code looked something like this:

my $string = "(";
foreach (@elements)
    $string .= myfunc($_)."|";
$string .= ")";

Now, chop will remove the last character, but if there are no @elements, then it will remove the beginning "(" and we get an extraneous ")". A more correct way, is to either collect all the strings in an array, and use join, or to use $string =~ s/|$//;.

After that, the error was corrected. I experienced some other random errors, because I continued to use the module (which caused some random string escaping problems), but after I removed it everything worked fine.

Anyway, simcop2388 was so impressed from what I did that he eventually said: "rindolf, you are a fucking god." (rindolf being my IRC nick). I received many compliments in my life, but it was the first time I was labelled a god (and a f**king one as such...).

Review of the Gtk+ 2.4.x File Chooser

I wrote a rant^H^H^H^H review of the Gtk+ 2.4.x file chooser and planned to post it here as well as on my site. However, after I've shown what I intended to post here to the good people at #gimp, I received some valuable input including a reference to its informal specification. So I'm still relative unhappy with its usability and "intuitiveness", but will have to revise my report in accordance with the new things I've learned. So, stay tuned.


Certified lewing as Master for his work in Ximian, and naturally for creating the super-important Tux the Penguin image. ;-) Certified neo as Master for his work on the GIMP. Ditto for carol to Journeyer, and mitch to Master. I certified vidar as Journeyer for his work on gimpressionist and gimp in general.

I think I'm a good Advogato citizen in the fact that I certified more people than people certified me. Have you certified an Advogato personality, today? ;-)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!