McEs, A Hacker Life
Old Bug
Comment #1 from Matthias Clasen (glib developer,
points: 25)
Weird Spam
Date: Tue, 23 Mar 2004 21:49:34 -0500
From: Owen Taylor <stats@thepostmansyndrome.com>
To: license@farsiweb.info
Subject: Photoshop, Windows, Office
By the time Scarlett had undressed and blown out the candle, her
plan for tomorrow had worked itself out in every detail. It was a
GEGL
GEGL is to
ImageMagick what
GStreamer is to
MPlayer. Good to see it
taking off.
GnomeGoals Rules!
A few weeks ago I had to repeat the same maintenance work over and over in gucharmap, vte, dasher, and devhelp. Things like the right way to install an icon, or various metadata files like MAINTAINERS, etc. So I was thinking about pointing things like that, the best practices of maintaining GNOME modules, in my weblog as something like a GNOME Maintainers' Tips series. So I started listing them in a file in ~/blog till I get to them later. Well, I don't have to anymore.
Vincent's
GNOME Goal series is just that, with a subtle difference: when he sets a goal, everybody hurries up to fix all modules he maintains or commits to (
Update: or better yet, others contribute patches to fix these.) Nice indeed. So I simply dumped my list and filed my tips at
GnomeGoals wiki page. I even wrote drafts for a couple of them. Help up and add your secret tips. Given that we only have about 20 more weeks to go before next code freeze (if not less), we may need to accelerate.
A not-so-irrelevant idea is
Gnome Recipes project. What both projects have in common is that they generate very good material for the GNOME ISV guide, and that's a good thing.
On a completely unrelated note, I'm enjoying the new Bugzilla My Bugs page even more and actually using the "Assigned to" field of bugs, assigning bugs that I want to look into shortly to myself, and find them right there in my bugs page.
Computer Illiterate Officials
I'm sure everybody has read about the
Oklahoma city threatens to call FBI over 'renegade' Linux maker story from last week. It's fabulously sad... Full email communication
here and follow-up story
here.
That made me understand that it's not just Iranian officials who can be extremely funny when commenting about computers. There was this other news three weeks back about
User-friendly computers developed in Iran, weirdly named 'Colonizer'. The English news item is not funny, but the detailed Persian item was, full of quotes, like a cleric commenting on the developed technology and all... A good part of it was about how with the new computer, students could send a message to someone and have it delivered in a few minutes. Yay!
Update: Another classic is the
Attach of the Repo Men. Weird.
Vte Newsletter
As a caring maintainer, I would like to draw your attention to a couple of vte patches for cool features in gnome-terminal that can use some testing:
Kosai points out in his gnome-terminal wishlist something like incremental backward search in gnome-terminal. I've been thinking about this too, it's not that hard. If somebody familiar with the search widgets (say in gedit or evince) is willing to do the gnome-terminal part of the work, I can help with the vte side. Discuss
here.
Update: Another interesting feature Kosai requests is (or comes down to) a split feature in gnome-terminal, like some editors used to had back in the days. That requires a model/view split in vte first, but such an split will greatly help to do all kind of cool stuff, like his other request: display-independent persistent terminals, that you can detach from and attach to later (like screen does, but at gnome-terminal/vte level.)
Update: Both features are committed now.
Happy! Happy! Happy! Happy!
My last post here was on 15th, a few hours before GNOME 2.14 was released. That's not a coincidence though, having the release out kinda felt like I can rest for a while and don't do any GNOME-related work, and so no blog post about it... Anyway:
Happy GNOME 2.14, released to the date on 15th of March 2006.
Happy St. Patrick's Day, on 17th of March 2006.
Happy Fedora Core 5, released on rescheduled date on 20th of March 2006.
Happy Norouz, the Iranian New Year, as scheduled on 20th of March 2006 this year.
We had a little party on Friday night, covering all the events above. I started by going to the Iranian neighbourhood of Finch & Yonge for some Norouz shopping, then started cooking Persian food and cheering up with
Farhang and
Siamak. They left around 7pm to get to other Iranian parties in town.
At that time the GNOME/RedHat friends started arriving, which were Ben (GOK), Tom (Java Gnome), and John (inotify, gnome-vfs). Zishad and Alireza joined us too. John also brought a bottle of Shiraz
the Little Penguin (which has got a red label), with a little penguin on it. We talked about GNOME, including the bugzilla point system, (hopefully) enjoyed the Gheyme beef stew dinner, and the Little Penguin.
Next, around 11ish, Alireza left and we found a taxi to let the five of us in and we got out in front of the
Duke of Argyle in John St. We had to wait twenty minutes in the cold to get it, but John had some drinks to warm us up in the street. There we had pints of Guinness and
car bomb, until past the last call at 1am. So another taxi and we were in a pub in Bloor St., I don't remember the name (or the place either, that's when my memory started fading for the night.) I had a Green Beer, and we came back home for more chit-chat. The party ended around 3ish I am told.
Finally,
Hossein and a friend of him arrived at around 4am, coming back from the huge Iranian party and not going back to Hamilton and that hour. So we finished the evening making sure the bottles are emptied properly, and I found myself sleeping on the couch all dressed up with a bad headache in the afternoon... Fortunaly we had lots of left-over food from last night to eat.
As a little new year present to my Iranian friends, I worked over the weekend on moving
The RiRa Persian Digital Library to
SourceForge from it's previous host in Iran. Lots of nice features added as it's based on an improved code-base I've been working on for a while. I had to migrate from PostgreSQL to MySQL, which was a bit painful as I use views heavily, but I short-circuited by saving the views as static tables and import that in MySQL. Not perfect, but works for a digital library. Getting the Lucene 1.2 based search to work on sf.net was far easier. Uploaded the class files and installed a Sun JRE and voila, it works great! I never enjoyed Java this much ;-). Make sure you subscribe to the
RiRa-announce mailing list to get updates. Enjoy!
Update: 25000 pages hit for RiRa on the first day!
New Cairo Stable Release
Just released
cairo-1.0.4. Get it while it's hot!
It fixes
the infamous Pango crasher.
Now we will have a rocksolid text rendering subsystem in Fedora Core 5. Rock!
Happy Pi-nstein Day
3/14 is π day and Albert Einstein's birthday.
More Releases Moron, More
Pango-1.12.0 was released with minor win32 changes from the 1.11.99.
Vte-0.12.0 was released with only translation changes.
Gucharmap-0.6.0 was released with only translation changes.
Dasher-4.0 was released with only translations changes.
Now if I can get Cairo-1.0.4 released tonight...
I also happened to fix
an old vte bug from 2003 on 9th of March. On 12th,
desrt comments on
another old vte bug from 2003, offering a music CD of their choice to whoever fixes this in time to be included in Ubuntu Dapper. He even adds me to CC. Ten minutes later I point him to the other bug suggesting that it's a dup and he should test the patch. Later on the day he markes it as a dup and confirms that the patch fixes his (and many others') problem and he notifies Ubuntu. The next day I submit a better patch and commit it to CVS after releasing vte-0.12.0. A few hours later dholbach finds me on IRC to tell me that the committed patch breaks some other stuff for him. I fix that too and he uploads vte-0.12.0 plus patch to Ubuntu. I choose
a music CD (Dan Bern - Dan Bern) for delivery on Friday night's GNOME 2.14 Release Party at my place :).
Hackergotchi Love
As per
jdub's request, I made some hackergotchis for vektor, and also new ones for desrt, hub, and jamesh. Find all
here.
Various Points
I try not to make posts like this, but it saves a lot of time for me and you every once in a while :-)...
Gnome:Amazing Nautilus startup analysis by Federico. I'll probably take a look at the gtk_icon_cache issue later if nobody else does. (Update: Seems like Manny already looked into that one.)
Philip, GLib and Gtk+ do have lots of tests. Just look inside
tests/
. No fancy framework, not included with the source code of the functionality, but testing. And new tests are added whenever a new feature is implemented or a bug fixed.
Released vte-0.11.21 to tune the timeouts that I messed up in 0.11.19. Get it from
here and test if you don't want to see a messy vte in GNOME 2.14.
I got a
Coverity account like about 12 other Gnome hackers did. Looks like they've found some real bugs for us. Their list of modules has been pretty off so far, including many many deprecated and unused modules, but not including such core modules as gedit, vte, and gucharmap. They have been informed though, and we are looking forward to an updated report. The plan is to file all their reports as bugs in bugzilla...
Internet:linuxcaffe in
NewsForge. Got to pass by the cafe to check out
the paintings.
Sand Fantasy. Check out the video clips. [Thanks
Behnam]
Persian stuff: Both
Behdad's Editor and
Behdad's Calendar now have links to their source code. The editor now can Open files from your local disk, and the Save capability has been improved to choose a file name from the first (nonempty) line of your memo. When working on it tonight, I thought two of my short PHP utility functions may be useful for other Persian web developers, so I put them into public domain, and they are available
here.
Lazy web:Is it just me or
Blogger really doesn't have a way to contact them? Didn't found anything by looking at the front page and "Help" pages. All they refer you to is a Google Group for more help.
In a web form with one of those widgets to choose a file to upload, how does one change the "Browse..." label on the button? (like in
this page.) I didn't find any way (eg. setting value) in Firefox. That means I cannot have upload-files UI in a Persian web-based interface! Weird...
Music:Dan Bern will
tour Ottawa the week before
Desktop Developers' Conference 06 mid July.
Found this
The Pink Floyd Movie Synchronization Story tonight. I've watched
Dark Side of the Oz before (search net for details). Today I got a copy of (what I call)
Pink Floyd in The Wonderland, but unfortunately I couldn't watch it as there are two audio tracks, xine and mplayer only play (the boring) one (yes I know how to change audio tracks in both, doesn't work), while GStreamer 0.10 plays both, but not the MPEG4 video )-:.
Watched
The Battle of Algiers (1965, Gillo Pontecorvo) and liked it. Liked the soundtrack by
Ennio Morricone too. Speaking of Ennio Morricone, man, did he really composed music for 555 movies?!?! His
The Legend of 1900 (1998, Giuseppe Tornatore) soundtrack is one of my favorites, with the Roger Waters song Lost Boys Calling at the end. I recently got his
Sacco e Vanzetti (1971, Giuliano Montaldo) soundtrack and loved the
Joan Baez's vocal. It's totally brilliant stuff.
Misc Points
It's
on slashdot now: Toronto to become one huge hotspot. Yay!
I'm happy to see people
feeling that GNOME 2.14 is faster. Means that weeks of our optimization work is worth more than "you rock!" comments. (-:
I think
Calum has a point about the C++ template thing. He's absolutely right, the C++ compiler cannot determine whether a C++ source code can be compiled in a finite time or will loop forever... That's indeed an obvious result of being Turing-complete. The C preprocessor on the other hand, has been designed carefully enough to not let such a thing in. It's at best a pushdown automata (whose states being the defined macros and their values that can take a finite different values, and the #include stack.) As a result, you can write a C preprocessor that will either process the input, or
decide that it will loop forever
without putting an arbitrary limit on the recursion depth. At that point you may do what Python does and refuse to get into the infinite recursion and continue. That's not how most of preprocessors are implemented though.
Cutting VCDs or How I Learned to Stop Worrying and Love GStreamer
For a few weeks, I was looking for a way to cut three VideoCD images I had sitting on my hard disk for a while (three years!?) and
write the results (with other things) to a DVD. As I'm
always short in space, decided to cash those 4.5GB this time and so started my GStreamer pilgrimage...
Normally, if it was audio, I would have done this:
freq=44100
channels=2
depth=16
bitrate=$((freq*channels*depth))
mplayer -ao pcm:nowaveheader:file=/dev/fd/10 -really-quiet "$infile" </dev/null 10>&1 &>/dev/null |
tail --bytes=+$((start*bitrate/8)) |
head --bytes=$((length*bitrate/8)) |
lame --quiet -r /dev/stdin "$outfile.mp3"
(works like a charm.) This is clean. This is what Unix is supposed to be. This shows various rules of Unix philosophy in action. For example, I don't like spending two hours to figure out how to compress using
mencoder
, so I simply use
lame
without selling the rest of my pipeline to it. But for video, it's more complex. I decided to finally go the GStreamer way instead of finding my way through
man mplayer
for the zillionth time (I suspect it may not be feasible using
mplayer
.)
Meeting: Being the good GNOME hacker that I am, I decide to try out gstreamer 0.10, although I already have 0.8 installed on my system. So I check out and build gnome-python (and lots of prereqs), gstreamer, gst-plugins-base, gst-plugins-good, and gst-plugins-bad stuff from HEAD. Multiple bugs are filed in the process and I
go mad by the sheer amount of packages spitting Werror on my face... At this point I call it a night (morning should have been more appropriate.)
Attraction: I read the gstreamer FAQ and start experimenting with
gst-launch
. Pretty excited about finding the
Pango element and wanting to try it out. So I figure what playbin is, and build a few pipelines from the FAQ to use decodebin. Apart from it crashing randomly (which turned out updating liboil fixes), it seems to be working. I figure out that
GNonLin should do what I want, i.e. reinventing
head
and
tail
. What I fail to figure out is how to use
PiTiVi. But in the end, I fail to find any video on my harddisk that it can play, and I give up.
Separation: Days later. For the first time in my involvement with Free Software, I feel what the users are possibly feeling most of the time and I'm aimless as a developer. At this point I the least I care about is the Free Software license of the code and what it allows me to do. All I see is that I just want to cut the damn clip out of the VCD image and I cannot. Decide to go back to gstreamer 0.8. At least I have an installation of it that does play my movies, out of synch though. I manage to find and compile a version of GNonLin that works with 0.8, but trying to run any useful pipeline that contains a gnlfilesource element with
gst-launch
stalls at PREROLLING and never enters PLAYING mode. Need another few days of break.
Reconciliation: From the Accounts Team work I remember bilboed, who is the author of PiTiVi and GNonLin. I find him on #gnome-hackers, and he enlightens me that the most decoders I want (MPEG, MAD, ...) are in gst-plugins-ugly, one module that I simply missed. Installing -ugly (after figuring out *why* it's not enabling each external plugin first) did it. Now I could play my videos using gst 0.10. Using Pango to show subtitles using playbin still doesn't work though. I also found out that #gstreamer on freenode is a much better place to ask questions than #gnome-hackers is. Turned out (via its author) that GNonLin needs a glib main-loop to run, and so cannot be used via
gst-launch
. I still don't understand why, but bilboed was so nice that he wrote a short Python piece to use the gnlfilesource to delay the audio track of an input movie. It actually revealed a couple bugs in GNonLin it seems and took a few days until he thought the script should work. It segfaults on most of the video files I have (segfaulting Python that is), but I could finally find a very short piece (a 600kb MPEG) that it *plays*. No video window though, only voice. Playbin refuses to play the test piece for what seems to be a playbin bug with very short files. Bilboed's experience with the test case was different: he had video but no voice. So he patched the script to *fix* the voice issue and was wondering how it worked for me :). Anyway, after boring myself with it for a few hours, sleep overcomes and I give up.
[The movie ends here, so this stage doesn't have a name]In my dreamz we were relaxing in the
Ein-stein Cafe (man, they do have the best chicken wings in T.O.) on College St. on a Friday night and walked to my place afterward, for tea and watching a few episodes of
Barareh (an Iranian TV show.) Everybody left soon after midnight and it was only me and Alireza. I dreamed I started my weekly harddisk cleanup and passed by the 4.5GB thing again and so asked Alireza whether he had any tool to cut a VCDs into clips. Hell he did. There was this tiny Windoze app in his old stuff called
vcdcut
that did that and just that. Setting up a a samba share and voila, two hours later all that was left was my the clips and no VCD images anymore. I felt something heavy hitting my head from the back and glanced at the floor that was approaching with increasing speed...
When I opened my eyes I was in a court room. There were masters McIlroy and Thompson sitting in the jury and master Kernighan too. There were the GStreamer developers standing in the defendant's place, accused of violating several laws of Unix philosophy and customer lock-down via running on a proprietary pipeline, different from that of the Unix systems. I heard Eric Raymond whispering "got to add this case to my
book."
All of a sudden I could hear a loud noise boom booming all around my head, like when xmms jumps to a song with a much higher volume level... And I wake up.
When I really woke I was frozen in between
I didn't know who I was, it was a dream inside a dream
It's all a dream
Oh what a dream
I had a dream
Epilogue:GStreamer is an exciting framework. One that opens up a lot of new possibilities in Linux multimedia. There are
a few bugs here and there, but they will hopefully by fixed by the time for
10x10.
Writing both
stdinsrc and
stdoutsink gstreamer elements should be extremely easy, and that would make it possible to use gstreamer with Unix pipelines, like the one I used for cropping audio. Same thing about writing
head and
tail elements (which is what the GNonLin elements are supposed to do, among other things.)
A notable side-effect of lack of Unix philosophy on Windoze land is that people write (non-free, fwiw) tiny applications that do one instantiation of one problem and only that. By that I mean you find an application to cut a piece out of a VCD image. You find another to cut a piece out of an MP3. You find another to convert a WMA to MP3. Another one to convert MP3 to WMA. Seriously. While that makes a Unix hacker laugh and look down his nose to the poor Windoze user, there has been moments in my pilgrimage that I wished there was a 50kb binary I could download and run that would cut that piece out of the VCD image and just that...
On the other end of the spectrum, it's a source of controversy where the modularity line should be drawn. There are various widely-used featureful tools that are both a proof for and against the
do one thing and do it well essence of the
Unix philosophy. Emacs is
one of them, a rather clean one. Mplayer and ImageMagick are two other, nasty ones. They are not extensible, feature-packed to the state of decreasing user's performance, and simply ugly. Yet they do the job no other pipeline will do. Whether GStreamer is the true way to implement what Mplayer does, we still need to figure out. But better integration with the traditional Unix practices (whatever that means) is something to be explored.
Update: Apparently GStreamer already has stdinsrc and stdoutsink. They are called fdsrc and fdsink.
My Language is Bigger!
Reading hub's
How to bash foolishly a programming language...:
First, the C one is not really C, it's C preprocessor. Oh, if that counts, it works in C++ too :-).
Anyway, my favorite fork trick (like everybody else's I guess) is the shell snippet: ":(){:|:};:"
My other favorite is "while(!fork());", also known as
PID anonymizer.
Today
Today was a special day in the Iranian multi-system calendar:
- 1384-12-12 Persian
- 2006-03-03 Gregorian
- 1427-02-02 Islamic
Match Point
Watched
Match Point (2005, Woody Allen) last week in theater. A turning point for Woody Allen as the IMDB tagline of the film says. This is the fourth movie of
Scarlett Johansson that I've watched. The other ones being Lost in Translation (2003), In Good Company (2004), and A Good Woman (2004). It may be just me, but I see too much similarity between the roles she plays and those of the Iranian actress
Hedye Tehrani. The latter wears a veil though!
Like
Luis, I wish I'd read this article on
Academic AWOL earlier, when I started my Masters.
[Posted the solution to the graph problem in the comments
here.]