10 Jan 2005 (updated 14 Jan 2005 at 20:32 UTC) »
My brother-in-law (who lives in Canada) is on a short visit here. He has been into Siebel and is a big fan of M$ (yuck). He'd been like an elder brother to me most of the time, especially if he is around. His recent favour is that he is giving me a loan to buy a CUS (Cheap, Used and Small :)) Car. This would make my life in Karachi quite better as here going somewhere in a bus is a waste of time and energy and opting for a cab is a waste of money.
Waheed (who is i think my best friend) is also arriving in a day or two. I'll spend my Eid holidays with him most of the time.
My mouth (especially my tongue) is in a very bad shape. I've been ignoring sores on my mouth/tongue since a week or so and now the sores have started to become 'wounds'. I'll definitely go to a doctor tomorrow.
Glade
Glade people should really put a big label saying "Not to scale" on Glade as you mostly can't know what would your widget actually look like. I am sick and tired of executing my app. again and again to see the actual results.
Who's the Communist here?
Regarding Bill Gate's recent blame on the 'Forces of Freedom': if i could meet him, I'll ask him if he knows anything about 'communism' and especially the big difference between communism and Communism? Anyway, assuming the same meaning of the word he assumes, we note that it's not us who have a lot in common with the USSR then they themselves: We are talking about freedom, they are talking about restrictions; We are talking about open systems, while they are talking about secrecy; They are talking about creating a monopoly, while we are talking about free-market, etc.
dorward: Thanks a lot for your efforts.
30 Dec 2004 (updated 6 Jan 2005 at 18:56 UTC) »
ATM, i am extremely depressed because
As you can see reason 1 and 2 means that I wouldn't be able to get out of the slave routine any sooner. The thing that makes everything worse is that I am not getting enough spare-time for hacking or anything that I think as productive. So much for the damn capitalist system that many people think is going to give 'freedom' to the people. I hope some bourgeois friends of mine shall be smart enough to come out of their childish dreams about Capitalist system before it's too late.
Musharaf was in Karachi the last two days. I am glad he was here cause I normally don't have to walk this much. You must be thinking what has Musharaf's visit to khi to do with my walking long distances. It's because the whole road was blocked to let him pass easily and safely. My western friends should not be disappointed to hear this as they know how important he is :-P
Things have started to settle down a bit now. I have a phone line, a table and a chair.
Gstreamer
As it was Sunday today, I got some time to hack on the plugins I am working on. Both elements are quite near to completion now. I was able to optimize the aavideo2text (which would be the actual name of aafilter) by writing my own code to do the escaping of markup text. Now it takes 1 milliseconds which is quite better than 32 milliseconds at least. This should work perfectly for videos <= 1000 fps (Am i right?).
Unfortunately, pipeline still is quite slow. Upon investigation i came to know that the culprit was gdk_draw_layout. It takes about 50 milliseconds for drawing a layout of ~2000 chars (80 * 25) on a 320x240 pixels wide pixbuf. Now how the hell would i optimize this? Don't tell me i need to write my own version of this function. :(
While i am busy at office, my mother and sister are busy setting-up the house and buying the req. stuff at the same time. I've also heard that my brother-in-law (who was responsible to get me my current job) is going to visit karachi in January.
There are also some seemingly impossible-to-solve problems regarding the aptt. Like there are no separate pipelines flowing for hot and cold water so either you'll get water flowing from the main-storage (cold) or from the geyser (hot). Another problem is that my cell-phone only works near my room's window.
Yesterday was another Sunday that i spent in nothing more than sleeping and watching TV. I always get a very annoying headache on Sundays after i got this job which I think is because of sudden change in my routine on Sundays (I wake-up around 12-1 pm).
Office
I was told to make a demo ATM machine (using the card-reader and the printer) to show to someone (i don't know who) who'll come to see it in the evening. That i did and now I am bloging so i can do other things in the evening. :)
Gstreamer's text2video element
Looking at the pango docs and help from people at #gtk, I now know that font sizes are in the units of points (rather than pixels), but how do you translate pixels into points?
The Linux Course
Now I am to teach (GNU/)Linux at some place in the evening. The classes shall be held on alternate days (3 days a week) and the duration of the course is 6 weeks. I opted for it in some confusion while I was new at job. But I'll try my best to stay away from ANY kind of business in the evening after this course is finished, as I already do not get enough time for 'my stuff'.
8 Dec 2004 (updated 13 Dec 2004 at 11:15 UTC) »
I had been very busy since the last time i blogged, which is one of the two reasons I didn't blog. The other reason was the priority: Because of the busy schedule, I was spending all the time i could get on finishing up the gstreamer plugins i am working on. Today i chose to blog instead. :)
Yesterday, my family arrived to Karachi along with all the luggage. So I'll be far more busier trying to settle down things. The first thing i need to make sure is that I get the telephone as soon as possible, so i still be able to connect to the Internet at home after i move from my sister's appt. to mine.
Gstreamer
I finally got a video playing from using this pipeline:
gst-launch filesrc location=~/video.mpeg ! mpeg2dec ! aafilter ! text2video ! hermescolorspace ! ximagesinkBut there are still a lot of things to take care of, especially the code to convert the aalib's text buffer into a pango markup string is very slow (takes about 32 mili-seconds for each frame) and ugly (one g_malloc each byte). As Tim Philipp pointed out, i need to write my own markup escape code, since glib doesn't provide a version that works on a provided buffer instead of allocating it for you.
Job
Not only i am finished with writing a stable device driver for the card-reader, I also demonstrated a simulated bank transaction to my boss yesterday. Coding which, i came to know that I am a complete newbie to writing GUIs. Like, should i have multiple windows or keep one window changing all the time? Anyway, i just full-screened the window and used the gdk for everything i wanted to draw on it. It took quite less time than trying to achieve the same through Glade :)
Job at Nokia
As some people seem to be more curious about the job at Nokia than me, so I must keep everyone up2date about that as well. The status is 'WAITING', I am told to wait. I have no idea how many days would that take. :( If anything happens, I'll definatelly throw the news to my blogs, so keep an eye on my blogs. BTW, if I am not blogging, it means that there is no news from them.
19 Nov 2004 (updated 20 Nov 2004 at 04:58 UTC) »
I had an interview with the Nokia guys on phone three days ago. I had given them the number of Salim's house as there I can easily get some privacy. In the interview, mostly they were asking short questions and I was trying to answer them with long answers (I tried to make it as short as possible though). They told me that they'll contact me in the end. Before they do that, I can't say if it went good or bad, only they can tell. :)
Went to the beach after a while yesterday. It was 2 am. There i was amazed to see a number of tiny blue lights appearing and then decaying. I thought of touching them, but I fortunately approached Salim before actually doing so. He told me that they are blue-bottle (a kind of jelly-fish or something) and told me how dangerous it is.
Gstreamer
I have the aafilter (we can change the name later) element ready for testing. But I can't actually test it out without an text2video. While I was coding that using pango, I came across a totally unexpected problem: The only rendering functions to support rendering to memory are the pango_ft2_render_* and Free Type doesn't have any color rendering. :( It should work for aa but not for caca, so I am looking at what to do next.
I was trying to make a small "hello world" sort of app. using gdk, but I couldn't. Since it's not very big, I'll just paste it here:
#include <gdk/gdk.h>
int main(int argc, char *argv[]) { GdkDisplay *display; GdkWindow *window; GdkCursor *cursor; GdkGC *gc; GdkWindowAttr window_attr = { "Hello World", 0, 100, 100, 320, 240, GDK_INPUT_OUTPUT };
gdk_init (&argc, &argv);
display = gdk_display_get_default ();
if (display == NULL) { exit (1); }
cursor = gdk_cursor_new_for_display (display, GDK_X_CURSOR);
window_attr.visual = gdk_visual_get_system (); window_attr.colormap = gdk_colormap_get_system (); window_attr.window_type = GDK_WINDOW_TOPLEVEL; window_attr.cursor = cursor; window_attr.override_redirect = FALSE;
window = gdk_window_new (NULL, &window_attr, GDK_WA_TITLE | GDK_WA_X | GDK_WA_Y | GDK_WA_CURSOR | GDK_WA_COLORMAP | GDK_WA_VISUAL | GDK_WA_NOREDIR);
gc = gdk_gc_new (GDK_DRAWABLE (window)); gdk_draw_line (GDK_DRAWABLE (window), gc, 10, 10, 100, 100);
gdk_window_show (window); gdk_flush ();
sleep (3);
gdk_window_destroy (window); gdk_cursor_unref (cursor); g_object_unref (gc);
return 0; }
All i could see was a black window. I tried to play around with different gc options too but that didn't change anything. Can anyone give me a hint?
Serial Port Interfacing
With the kind help of my ex-boss, I finally hunted down the problem, which made my app. miss bytes when it tried to read the card-reader on my serial port. The problem was actually "multitasking" combined with direct hardware access from the user-space. The problem vanished when i nice'd my app. with the maximum possible priority. Tomorrow I'll write a complete driver for it, but in the kernel space of course :)
Why I am having weird problems accessing the card-reader through the ttySO device is still a mystery.
15 Nov 2004 (updated 19 Nov 2004 at 20:11 UTC) »
It was the 2nd day of eid and my holidays. On holidays I get too lazy and sleep a lot. Maybe my body tries to cover-up.
I got an advertisement on gmail regarding this article, claiming to prove God. I had a look at it and it turned out to be one of the many other such articles by creationists on the web. I even posted a comment, in which i tried to make them realize that they wouldn't be able to go very far by wrapping-up obsolete argument in fancy new clothes in this age of Science. Although I am not quite sure that this really is true about the general public, who wants to remain in some kind of dogmas no mater what.
While I was about to post this blog, I got a reply from everystudent.com regarding my comment. Just have a look at it and see how rational, intelligent and educated such people are:
Isa. 45:22 "Turn to Me, and be saved, all the ends of the earth; For I am God, and there is no other.
Isa. 45:23 "I have sworn by Myself, The word has gone forth from My mouth in righteousness And will not turn back, That to Me every knee will bow, every tongue will swear {allegiance.}
Gstreamer
I was coding the aafilter (we can change the name later) element today, which is now ready for testing. But I can't actually test it out without an ascii2video or an ascii-video-sink. I'll try to code the former using pango tomorrow.
10 Nov 2004 (updated 12 Nov 2004 at 18:48 UTC) »
When i logged-in today, i got this fortune cookie:
...And no philosophy, sadly, has all the answers. No matter how assured we may be about certain aspects of our belief, there are always painful inconsistencies, exceptions, and contradictions. This is true in religion as it is in politics, and is self-evident to all except fanatics and the naive. As for the fanatics, whose number is legion in our own time, we might be advised to leave them to heaven. They will not, unfortunately, do us the same courtesy. They attack us and each other, and whatever their protestations to peaceful intent, the bloody record of history makes clear that they are easily disposed to restore to the sword. My own belief in God, then, is just that -- a matter of belief, not knowledge. My respect for Jesus Christ arises from the fact that He seems to have been the most virtuous inhabitant of Planet Earth. But even well-educated Christians are frustated in their thirst for certainty about the beloved figure of Jesus because of the undeniable ambiguity of the scriptural record. Such ambiguity is not apparent to children or fanatics, but every recognized Bible scholar is perfectly aware of it. Some Christians, alas, resort to formal lying to obscure such reality.
- Steve Allen, comdeian, from an essay in the book "The Courage of Conviction", edited by Philip Berman
I was quite happy to see that there exists/existed people who not only have thought/feelings quite simillar to mine but unlike me, they are quite good at expressing them as well.
Job
I've got the Cisco ADSL Modem working, but i had to configure it through it's driver (windoz only). But after the configuration, it works ok with all OSes.
Also got successfull in interfacing with the Card Reader device though the low-level interface. As i no more open/close any FDs I've got rid of the worst problem: Had to reboot to open /dev/ttyS0 after the fist time i close it. I still sometimes get weir characters, but I think that happens whenever i do something wrong. I'll work further on this tomorow.
I told my boss about the ASCII video (he already knew about static images) and how it can be used to construct cheap video-walls. I think he took it prety well.
Gstreamer
Working on a new element (GstAAfilter) that would take video on it's sink pad and produce ascii on it's source pad. We also need an element to do the ascii -> fourcc translation. It seems GstTextOverlay already is capable of doing this as it has a sink pad for "text/plain" or "text/x-pango-markup" mimetype. If it does'nt, i'll just hack on the textoverlay to write one for this purpose.
9 Nov 2004 (updated 9 Nov 2004 at 23:22 UTC) »
Sucks as badly as always. Having observed that even most of the people in advanced countries can't escape out of myths and dogmas, my respect for humans has decreased enormously. I can find only a few people who are critical to ALL myths/dogmas, e.g Stallman, Chomsky and Paul Graham, which is why many people don't like them. When you ask people what's wrong with Stallman, they would say "He doesn't shut-up", "He criticizing everything" etc. Hence all the typical opinions ordinary people always had about intellectuals are put forward as valid arguments.
Gstreamer
I am back on cacasink and aasink too this time. The goal is to enable the app. to capture the output of these libs. A typical use of this would be to display the output of these libs in your own window. One solution was to implement the GstXOverlay interface, but that wasn't a good idea since it's X-specific and these libs are not. So after some discussion with rbultje I concluded to have filter elements for these plugins besides sink elements for this purpose.
GObject Serialization
Upon the advice of two great developers I know of, I've filed my proposal as a bug report. Perhaps it wouldn't get ignored/forgotten this way.
Job
I'll be told today if they would like to keep me as a permanent employee or not. Most probably, they will. Besides, where would they get a nice slave like me? :)
From my /dev/random
How crazy/stupid is this idea:
speech -> text -> compressed text -> ... -> compressed text -> text -> speech
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
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!