Memoirs In Free Fall

February 23, 2004

An approach toward normality

Filed under: Uncategorized — Tags: , , , — amit @ 11:26 am

No, I’m not dead. ;)

My sister left for Vellore this morning, so I’ll have enough time on my hands again to occasionally write something for Linux.Ars. It’s too bad Jorge is on hiatus — he was the prime motivator of the Linux.Ars effort. I hope someone else is interested enough to take over. I’ll try to help out as much as I can.

The KDE 3.2 article by Datschge and Henrique Pinto was published. It’s very well done, and I can’t wait to have the CDs Jorge mailed me in my grubby hands, so I can try it out. From the description given in the article, KDE is designed as a UI should be — made up of generic functional components with integrative shells, unlike GNOME, where this sort of embeddability and modularity is somewhat lacking. If I can figure out how to make KDE look pretty (and I’m sorry, but Plastik is ugly to my eyes), I might start using a full-fledged desktop environment again. (I don’t think I’ll give up Sawfish, though — I’ll just configure KDE to use it as the window manager.)

I bought a used IBM P275 monitor (21″ flat-faced Trinitron) this past week. It’s in good condition, apart from a tear in its anti-reflective coating that can be distracting when I’m viewing something with a bright background. I’m running it at 1600×1200 at 90 Hz, and while the abundant screen real estate is nice, I think I might get a display adapter with better visual clarity once I have some more money.

My current project appears to be growing without end in sight. I estimate about three or so more weeks’ worth of work.

I’m thinking of starting to train for the Sun Certified Programmer for Java 2 exam again. I’d prepared for it most of the way, but then slacked off for months. I should just get it, then apply for jobs in Bangalore. That way I’ll at least be approaching employability.

I’ve also borrowed some .NET and C# books from the public library. .NET jobs are hot these days, and knowing this skill can’t hurt. (Besides, there’s that elusive MCSD to get . . .) I’ll probably be learning and practising for the .NET exams in Windows; the .NET Framework for Windows at least has better implementations for System.Windows.* (obviously).

I hope that once all is said and done, I’m out of this town and doing well enough for myself to have enough time to write again.

I’ll see if I can get something done for Linux.Ars by Wednesday this week. I’m being squeezed again this week, but I think I might be able to pull something off for TTT. I’ll need support for /dev/random, though; I’m hardly in touch with Linux and OSS happenings these days, apart from what I read on Ars. (That’s about the only website I read any more.)

February 13, 2004

Working complex text layout, finally

Filed under: Uncategorized — Tags: , — amit @ 2:27 pm

Gecko-based browsers such as Mozilla and Firefox (formerly Mozilla Firebird, formerly Phoenix) have long claimed to have support for complex text layout. While this is more or less true for platforms such as Windows, on X11, attempting to view a complex script such as Devanagari (a script used widely in India) or Thai would result in diacritical marks being shown in the wrong order, etc., since these languages aren’t purely left-to-right or right-to-left.

Well, that is, until recently. There’s been real development towards a Gecko renderer that uses Pango for text layout. (Pango gets complex text layout right, and GTK+ 2.x gets it right.) Unfortunately, this isn’t in Mozilla CVS yet and, knowing how tardy Moz developers are, I don’t expect this to make Gecko mainline during my lifetime, which is a pity. Who knows how long the developer of the patch will stay interested long enough to maintain it against trunk?

Thankfully, there’s a Mozilla 1.6 binary available for Linux with GTK+ 2.x and Pango support in contrib, and it works.

This is how Mozilla 1.6 with Complex Text Layout support shows it:

And how Mozilla 1.6 with the Pango support shows it:

Note how some of the characters are turned into ligatures, and how the order of the diacritical mark ‘ि’ has changed.

(For some reason, Mozilla’s built-in FreeType2 support didn’t allow the font being used in both screenshots, Raghindi, to be antialiased.)

If you don’t have fonts that carry multiple script glyphs and you wish to view web pages in other scripts, you can get the Microsoft core Web fonts, the Free UCS fonts from the Free Software Foundation and the fonts from OpenOffice.org. The FSF fonts, in particular, are fairly extensive in their coverage of glyphs.

Incidentally, OpenOffice appears to render Devanagari and Arabic scripts pretty well. :D

February 12, 2004

Temporary freedom

Filed under: Uncategorized — Tags: , , — amit @ 7:04 pm

The weekend’s here! Yea!

My mother was released from hospital yesterday. The biopsy results won’t be here till sometime next week. She’s been ordered to have three more days’ bedrest, but there’s no way anyone’s keeping my mother off her feet for long.

I’ve given up on the DVD-to-VCD thing for now, especially since my sister’s content with watching DVDs on my computer (mplayer does a great job there—I just put items on the ROX pinboard that run scripts that play the DVDs with pan-and-scan, using the crop video filter to crop the picture down to 4:3 aspect).

Now maybe I’ll get some time to do the delayed XKB/i18n writeup and the SELinux writeup (once I figure that part out ;p).

The pity is that I only have tomorrow free . . .

February 10, 2004

No sign of the light at the end of this tunnel

Filed under: Uncategorized — Tags: , , — amit @ 1:33 am

So my mother’s been hospitalized. She went for a checkup on my sister’s insistence and they suspected something so she’s admitted into the hospital until Wednesday. They’ll take a tissue biopsy tomorrow and keep her one extra day for observation/recovery from the procedure, which involves general anæsthesia.

I tried this incantation to try to get mencoder to produce VCD-compliant MPEG streams:

mencoder -oac lavc -ovc lavc -lavcopts acodec=mp2:abitrate=224:vcodec=mpeg1video:\
vratetol=224:aspect=4/3:vbitrate=1152:vrc_eq=1 \
-vf crop=404:360:158:59,scale=352:288 -af resample=44100 -ofps 25 \
-srate 44100 -of mpeg -o output-file.mpg -frames 100000 dvd://1

Combined with vcdimager, it sure did give me a VCD disc-at-once image, with worrying lines like these in vcdimager’s output:

++ WARN: mpeg stream will be padded on the fly -- hope that's ok for you!
++ WARN: autopadding requires to insert additional 94469280 zero bytes into MPEG
stream (due to 342280 unaligned packets of 342281 total)

This indicates that just about every MPEG packet is being messed with because, ostensibly, mencoder generated an MPEG stream playable only by mplayer. The resulting ‘VCD’ gives me choppy sound and half a frame every four or five seconds in the standalone Video CD player, with the rest being a garbled version of the remainder.

I’m about to give up and boot to Windows, but still looking into a working solution. ffmpeg seems to butcher audio-video synchronization very effectively.

For this week’s Linux.Ars, I’m considering doing a writeup on XKB and internationalization, if I can find the time. I get the feeling that I won’t, between visiting my mother in the hospital and taking care of things at home.

Finally, rest in peace, Safedin Kajoshaj.

February 6, 2004

Turbulence in free fall

Filed under: Uncategorized — Tags: , , , , — amit @ 10:56 pm

So my sister arrived two days ago. It turns out that while she was enthused about watching RotK earlier, she doesn’t really feel like watching it now. Oh well.

I did something stupid yesterday. I attempted to upgrade my Windows 2000 installation on the SCSI drive to Windows XP, and had a BSOD during the upgrade, rendering Windows 2000 unusable. So I decided I’d back up my files, nuke the whole install and do a fresh install of Windows XP. My idea of a backup was to copy the files (including my email, which is stored in my Windows Mozilla profile directory as a set of MBOX-format mailboxes that I read with Pine, Mozilla and Thunderbird) into another directory on the same partition. Without a dosfsck/ScanDisk/etc. first.

Whoops.

The result was heavy cross-linking of files that dosfsck merrily truncated (they were useless anyway). Including my main inbox mailfolder, where the newest message that survived was from September 21, 2003.

I had backed up a version of the MBOXes about three weeks ago onto CD. Unfortunately, that backup was of the MBOXes as they were on September 26, 2003, the net result being that I’d only managed to restore five days’ worth of mail, the rest having been lost forever. Fortunately, there wasn’t much that was important.

Now I’m kicking myself for having been too lazy three weeks ago to have tarred up my email before backing it up, instead of backing up three-month-old (at that point) email.

Oh, well.

I’ve spent much of the past two days trying unsuccessfully to transcode a movie off a DVD to a Video CD so we can play it on our Video CD player that can’t handle Super VCDs or DVDs. I tried to use mencoder to create an AVI with VCD-compliant MPEG-1 video transcoded from the MPEG-2 video from the DVD, and another AVI with PCM samples decded from the AC3 audio. Then I tried to use sox followed by mp2enc from the mjpegtools to create a 224 kbit/s MPEG-1 Layer II audio file. However, using ffmpeg to multiplex the MPEG-1 video and MPEG-1 Layer II audio stream as Kyle recommended resulted in a playable MPEG where the audio stream ran faster than the video stream, and ran out well before the end (and, of course, utterly out of sync with the video). Sigh.

I might use a Windows utility to generate VCD-compliant MPEG-1 AV streams on a MPEG-1 + PCM AVI generated by mencoder, since there doesn’t seem to be much that can do this properly on Linux. (Unfortunately, mencoder doesn’t seem to be able to encode mp2 audio, only mp3 via lame.) Otherwise, mencoder is a pretty awesome video processing tool — pretty unparalleled.

Today was the weekend. Most of it was spent trying to get my corrupt copy of Service Pack 1 for Windows XP working somehow so I wouldn’t have to spend the time and money on the bandwidth needed to pull down a fresh copy. I’m out of luck, it would seem.

Now I get to go to work in the morning to do a job I despise. I think I’m slowly but steadily going mad. I just need to get the heck out of this place.

Not having been on OpenIRC #linux for any appreciable amount of time during the past few days is taking its toll. My family is halfway to the loony bin and I have precious few real-life friends in this country as it is. #linux is, astonishingly, one of my last few anchors to sanity, and I can’t afford to lose that contact at this stage. I need something to look forward to just to get myself through the day. #linux helps a lot with that. Thanks, guys. Thanks very much for being so supportive.

Update: Turns out that newer versions of mencoder are capable of using libavcodec to encode audio. libavcodec happens to have support for mp2, so I’m hopeful that it’ll work.

February 1, 2004

Did someone just speed up time?

Filed under: Uncategorized — Tags: , , , , — amit @ 3:09 am

So I managed to wriggle out of the Abu Dhabi trip and went to purchase parts instead. I got myself an ATX midtower (AED 70, US$19), a little thermal paste (AED 5, US$1.50), a PCtel HSP688 winmodem (AED 25, US$6.80) and a BenQ (Acer) 16x DVD-ROM drive (AED 115, US$31). I assembled the machine, snagging the storage subsystem from the old box (an 80GB Maxtor DiamondMax D740X, a 36GB IBM UltraStar 36LZX and an Initio INI-9100UW clone SCSI card) and a video capture card from my Dad’s box (that he didn’t use anyway).

Turns out that the winmodem has no Linux drivers whatsoever, so I swapped it with the ES2898-based Creative Modem Blaster DI5655 from Dad’s box. I’m using the esscom port to kernel 2.4. It’s pretty noisy — someone left in pretty garish debugging output — so it consumes up to 45-50% of this 1.4 GHz processor’s time.

Maybe, once I have money, I’ll purchase an external RS232 unit and be done with it.

Anyway, I’m happy. The NVIDIA drivers accelerate RENDER, so I can afford to use antialiasing without having to wait forever for repaints to finish. Everything seems snappy now, whereas earlier it was an endless wait. The NVNET drivers work for the LAN adapter (so does forcedeth, to an extent).

My week is made. :D

Update: It turns out that the CPU ‘consumption’ is attributed to the action of athcool, since it happens when athcool is turned on and the esscom module isn’t loaded. It also goes away, esscom or no esscom, dialed in or not, when athcool is turned off. I ended up turning it off anyway, since it was causing my mouse pointer to go for a random walk.

Blog at WordPress.com.