Writings Photos Code Contact Resume
This is my website. It's mainly dedicated to GNU/Linux, my writings, code, thoughts, news, ... You won't find any windows related materials here, So don't panic!

يا مصطفى يا مصطفى

Submitted by msameer on Thu, 14/02/2008 - 9:41pm

انا باحبك يا مصطفى

النهارده وصلني بعد الضهر كتاب رحاب, أرز باللبن لشخصين. لا و انا اللي الصبح كنت لسه باقولها عايز نسجه موقعه لما انزل اجازه!!

لا و انا اللي لسه عامل معاه حركة ندالة من يومين!! بجد اودي وشي فين:-(

طب ماحدش عايز يبعتلي عايزه اتجوز بمناسبة اني عايز اتجوز برضو ؟ :-)



Automatically insert a statement in each function in C++

Submitted by msameer on Fri, 08/02/2008 - 2:16pm

And I thought I'll never do such things again ?
I wanted to insert a debugging statement at the beginning of each function.

for i in *.cc *.c; do sed -i -e 's/\([a-zA-Z0-9 _*:~]*([^).]*) *{\)/\1 \nprintf("%s\\n", __PRETTY_FUNCTION__); /g' $i; done

It can probably be used to insert anything too.

It's dirty but it worked for me. Just keep a backup or make sure the latest code is in any RCS just in case.

It only failed with a function that was commented using C++ style comments "//".
I didn't try it with class methods defined inside header files


Katoob 0.5.9.1 is out

Submitted by msameer on Tue, 29/01/2008 - 11:25pm

This is a recommended update.

tarball, md5sum and gpg signed md5sum file
ChangeLog:
A problem that caused katoob to ignore key presses was fixed.


Dear Hebrew maemo users...

Submitted by msameer on Mon, 28/01/2008 - 2:45pm

I'm getting a lot of questions on how to enable Hebrew under maemo. I know that the fonts have been packaged already and I guess there's also an input method. It's as easy as writing an XML file for my not so broken Hildon Arabic input method.

I just don't understand why can't they be made available publicly or made known ?

I can neither host nor support them, nothing personal. It's just that I don't know Hebrew and I can't support a language I don't know!

Please, oh pretty please with sugar on top, can someone give me a URL or at least share the information so I can at least copy and paste it as a reply to the emails I'm getting ?

P.S this link is not what I mean.


Of GNOME and fonts.

Submitted by msameer on Mon, 28/01/2008 - 1:52pm

Thanks to those 2 comments. Although placing Xft.dpi: 96 in my ~/.Xdefaults did not help, but I managed to do it through the appearance control center applet. I had to purge the gtk-qt theme engine because it was freezing the dialog and setting it via gconf-editor didn't work as expected.

I had to fight with my fonts this morning but here's my configuration. Maybe it'll be useful to anyone:
DejaVu sans book 12
96 DPI
greyscale smoothing, subpixel slight RGB.

I'm not yet satisfied but it's more usable now.

Thanks Phaeronix for the help too.


I love KDE. It just works!

Submitted by msameer on Fri, 25/01/2008 - 5:13pm

I have 2 laptops. My personal one at home and my work one at the office. Both are running testing. A month or two ago, I did a dist-upgrade on the home one. Later on I rebooted (DUH!) it for a reason I can't remember just to end up with very tiny fonts under GNOME. It took me some time to tweak them back again and play with the GNOME anti-aliasing dialog. Now if you know me well, you know that the last thing someone should do to me is to touch my font settings. I have a very sensitive eye (Because I have a very low vision) and I hardly tweak the fonts. All went somehow fine after that. Problem is I wasn't sure whether it was fglrx or GNOME who's responsible for that.

I always do a dist-upgrade everyday (!) but never bother to restart X or reboot. A few days ago, GNOME at the office crashed on me and guess what ? I ended up with the same problem again. Fonts. Tried tweaking it this time but no use. Copying the font settings from the other laptop was not an option because I'm using a large LCD at work but I can't afford to buy one for my personal laptop :-)

I thought it was fglrx, downgraded the driver but no use.

I decided that's it. I always used GNOME because I know Gtk+, gtkmm and somehow pygtk but the fonts breaking again was really too much.

I ended up switching back to KDE 3.x at work and at home. I just don't feel like using 2 different environments. This will confuse me ;-)

I remember I used KDE 1, GNOME 1.4, KDE 2.2, window maker, GNOME2, tried all the window managers out there until I settled with pekwm, hpanel, a few dockapps and that was my custom assembled DE. Until I switched to amd64 and the version I was using of pekwm (It was a CVS snapshot) started throwing exceptions. I wasn't really sure why and didn't have time to fix it. I wanted my laptop to be up and running again. I ended up trying the latest release but it did not work with hpanel (It was a hacked version because it wasn't originally working fine). and that's why I went back to GNOME.

Anyway, No flame please but KDE just rocks, it just works! I'm still having problems with fonts under Konsole (Bye multi-gnome-terminal) but I just need to free a few hours to test all the fonts out there.
Amarok works fine although the UI is a bit "cluttered" (But I managed to get it to crash :-))
I remember my phone complaining about not being correctly unmounted and warning about data corruption whenever I unplug it from the USB cable after asking GNOME to unmount it, KDE simply doesn't have this problem. The bad thing is that they removed "panel icons zooming upon mouse hover" but the tooltips are large and clear. Of course Arabic is still not that good under Konsole but I'd blame myself for that :-)

Konqueror is crappy as usual. I'm still using Opera :-(

Well done KDE team, Debian KDE team, GNOME team and Debian GNOME KDE team.

Thanks for the fish :-)

Now I guess I need to get myself familiar with the KDE/Qt API.


It feels like losing a child...

Submitted by msameer on Sun, 20/01/2008 - 2:28am

So, today Multi GNOME terminal has been removed from debian as part of the efforts to get rid of gtk 1.x.

I'm neither ranting nor blaming. I'm just expressing my feelings.

I knew before it happened and I acknoledged the removel. It's dead upstream and I don't think it can be easily ported. I've been using this terminal since 4 or 5 years. Let's see if I can live without it. I know there are a lot but this one was lightweight and it was using zvt which was noticeably faster than vte.
This was one of the packages I worked on with "He" as part of the NM T&S and I quite learned a lot from it.


Katoob 0.5.9 is out

Submitted by msameer on Thu, 10/01/2008 - 11:59pm

This is a recommended update.

tarball, md5sum and gpg signed md5sum file
ChangeLog:

* Enchant is now used for spell checking instead of aspell
* The iso-codes package can be used to display friendly names for the spell checker dictionaries.
* The recent menu is displays the name of the file not the full path.
* Opening a non-existing recent file triggers an error.
* Better quality Arabic translation (Thanks Khaled Hosny).
* Maemo support.
* libcurl is now used for the network.
* Cairo is not used anymore to draw the extended toolbar extra icons.
* Make the buttons in the dialogs HIG compliant
* Pressing Escape will close the spell checking dialog
* We now use the gtk printing capabilities for printing.
* Syntax highlighting now depends on gtksourceview2 and it's been rewritten.
* We now save the documents every minute and recover any files when we start.
* We also autosave if we crash.


From Rome to Helsinki

Submitted by msameer on Mon, 31/12/2007 - 12:08pm

OK. I'm back to my HQ in Helsinki...

1) When flying to Rome, don't book a flight that will arrive there late at night.
2) When you are flying from Rome, don't book a flight on a Sunday and don't book it early. Busses are never on time and the frequency of trains is less so you might end up losing your flight.
3) Fucking morons can't run an airport.
4) I couldn't find anyone to ask for help.
5) The fucking morons change the gates without announcing and I discovered that by accident. I could've missed my 2nd flight.
6) Stupid Americans, please keep some energy to fight with your travel agency instead of fighting with me because you are so paranoid that you think I want to bypass you in the queue.
7) The fucking morons can't ask more people to be at the service point to handle emergencies.
8) No one knows anything in the fucking airport.
9) The Italian Cuisine is damn awesome. I don't believe I'm moving back to "Meal number 6 please...".
10) Rome is fantastic and you gotta love it... The city is marvelous and you discover great things as you walk.
11) The fucking morons at the airport delayed our Finnair flight and affected our Finnish reliability.
12) Sardinian cuisine is fucking fantastic and tasty. I never ate like this before.
13) The mixture of the 2 things is far better than eating each one of them alone.
14) I don't believe I liked that thing he offered us although similar thing is available in Egypt.
15) I'd have payed a 1000 euros if the restaurant owner had asked
16) If you don't have enough cash, you are doomed. They don't accept credit cards.
17) Corruption, the pub will be closed at a time depending on the owner relations with the police.
18) The girl from Bosnia was pretty.
19) I don't believe she changed her religion to Christianity just to drink!
20) They offer drinks in plastic containers. There's nothing better than broken glass on the floor.
21) Please please believe me when I say that I'm from Egypt even if I don't look like one. It's not that I hate other nationalities but it's because it's me.
22) The pub was very small.
23) I fucking ate falafel from a Syrian guy. Awesome.
24) Alaa, please don't interfere with my food. I don't like chili!
25) And again, the shoes is important, you'd better wear it even though you can still walk without it.
26) How come Rome is colder than Helsinki ?
27) I still want to get married :-)
28) This line has been left blank on purpose...
29) I'm sure I have more to say.
30) Happy 2008
31) I wish 2008 will be like 2006


Pages