Saturday, January 20, 2007

Some time to spare ...

Hi!
Come to university, it's a bit cold. The registration time for my courses had been set to 8:00 AM, but now I find out that it is changed to 1:00 PM. So ... Some time to spare ...
Could have spent it on photo.net, but I don't feel like it.
I want to mention some points caught lately, but before I have to mention this comment thirst I am having... (0 comments) next to every post; my own fault, not a good writer, neigther a good reader ... so ... Don't bother with the last paragraph, it's the neurotic inside me ...
The points:
  • I'd thought less of the effect, seeing relatives and friends has on the mind. Been to Isfahan and back in 24 hours and I saw lots of relatives. Some I hadn't seen for a long time. It made me much more happier and I feel more energy to do the things I want... so put some time to see your relatives, even the not so near relatives, it is healing and ...
  • Some little school boy was told to study more and become top student of his class. He answered that they already have a top student in their class and so there is no need ... Get the point? ... don't put too much pressure on your self. I did that for some time -not educational in my case- and it made me sick. so ...
End of points.
My thanks go to some people (I cut my relatives out) who have been very kind in the last two months that I'd been ill. I am getting better, and the order is not on purpose:
  • Saeed: I hadn't thought that he care much ... yet he phoned and the tone of his voice showed how worried he was ... like a caring friend. Thank you Saeed.
  • Farid: He phoned, he cared, he gave me advice on my courses (and he lent me some films) and more... For being the only person I gave the most exact detail on my problem. Thank you Farid.
  • Bahador: Again for his caring, and for lending me about 20 films and wanting to hear my problem. Thank you Bahador.
  • Mohammad: For the 1 sentence he said. He was annoied for finding out so late ... Thank you Ali. (I rather call you Ali).
  • Amir, Ali Seraj, Fayyaz Farshchi, Ali Ahmadi, Abdolhamid, ...
I bet nearly none of them will read the last few lines.

Monday, January 15, 2007

For the record ...

This won't be written in my so called diary or journal or what ever. Been busy writing programs these days, sort of caught my whole attention so I haven't been updating my diary.
But here, I will for the word I gave ...
Oh and further notice is postponed.
I learned a few things in the past few days :
  1. If doing something -like fixing a program in my case- is important, and yet on your nerves -because its got bugs and you don't know how to fix them and there is no tutorial and the reference is not descriptive enough-, don't continue doing it for at least two or three hours; And if you can't even stop thinking about it in those few hours cheer your self up, and see which is more important you, a human or it; And if you still can't do that, then keep on doing what you were doing until you fall off your knees. Then you'll learn what I just said.
  2. Never get upset of the computer, its a machine, it doesn't want to hurt you.
  3. When something is very important and crucial to you and doesn't work out, seek inside your self, see if you'r aware of the creator ... He might have done this to you to let you see how you react ... and learn from that. If he gave you the problem then ask him to solve it.
  4. If you were dumb enough and didn't know the last point-like me- then he will kindly solve your problem and teach you the last few points.
I am getting emotional ... got to stop.

Emm! Announcement :
Did something to cheer me up. Wrote a little program named salam that greets you back with something like :
Salam ali! Che khabar?
Its smart enough to use your login name to greet you! The output in general is :
Salam [login name]! [a greeting]
One can add his own greetings with the -add [new greeting] option.
You can think what you like, but my dad said it's like how Mr. Bean sent Christmas cards to himself and got happy when they arrived through the post.
I would like, if anyone wanted to give the code so they could use it or change it, work on it and perhaps send it back if it got better.
Added two lines to .bashrc on my home directory and it greets when ever I open a terminal.

And the program that was important is named Audvis. Audvis plays .av files, a kind of animation. The animation is made from sound; It is supposed to help the deaf, hear by seeing the animation that was generated by the sound they couldn't hear through their ears. Its like they hear the sound by seeing the animation. Producing that animation from the sound was a PHD thesis of about ten years ago and is not my work. My work was writing a program that could play those animations e.g the .av files. Audvis stands for Audio Visualiser. My problem was learning to synchronize the animation with the sound. Each frame had to be synced with its corresponding 20 ms of sound. That means the animation is 50 frames per second. Walt Disney gives you animations of 30 or 20 fps.
The original program was written on a UNIX power station ten years ago, and so I decided to continue on Linux, but from scratch. For the visual part I used Gtkmm, a C++ wrapper for GTK+ and for the sound I used ALSA (Advanced Linux Sound Architecture).
The Program aims a day when it can work real time. I mean produce and play the animation as the sound is being generated. In this way a deaf person can not only hear what people say, he/she can listen to music, hear the horn of a car, listen to the sound of flying birds.

Thursday, January 11, 2007

Hi,
Looks like further notice already arrived since farid invited me to this game of theirs.

برای آدمی که وجدانش میگرن دایمی دارد یافتن اعرافاتی یا رازهایی که بیانشان خیلی هم تلخ نباشد کار ساده ای نیست. یک جایی شنیدم که هیچ دوایی مثل یک وجدان پاک نیست... پس بخوان عزیز ...
1- از دعوت فرید تشکر کردم نه چون از این بازی خوشم آمده بود-هرچند خوشم آمده بود- و نه چون در رودربایستی گیر کرده بودم بلکه چون از اینکه دعوتم کرده بود خوشم آمده بود؛
2- دبستان که بودم. قبل از سوم دبستان را می گویم ، زمستان وقتی می رفتیم مدرسه، اول مسیر سربالایی داشت که خوب زمستان ها یخ می زد. بالا میرفتم یک روز به صد زحمت از روی یخ هایی که آن قدر بلورین بود که آسفالت کف خیابان را می شد دید. وقتی با مخ خوردم زمین یک خانمی آمد دستم را گرفت، گفت پسر جان بیا از پیاده رو برو. پیاده رو یخ که نبسته بود هیچ ... خشک خشک بود. انگار دنیا را به من داد؛
3- همان دوران تا سوم دبستان بود یا قبلش، یادم نیست. یک ظرفی را آن قدر باهاش ور رفتم تا شکشت؛ از ترس مامانم رفت توی کمد پتوها به هر بدبختی بود یک جوری پنهانش کردم که تا خانه تکانی عید مامان نفهمید. البته وقتی فهمید کلی بهم خندید چون جنس ظرفش از ملامین بود؛
4-سیزده سالم بود وقتی دوستانم دعوتم کردند به دیدن فیلمی در سینما که برای سیزده ساله ها و بزرگترها رده بندی شده بود. در خارج. خوب بابام تبلیغات فیلم را در تلویزیون دیده بود و راضی نبود به دلایلی که حالا می فهمم چقدر حق داشت. من هم به پدر گفتم دوستان را قانع کرده ام برویم یک فیلم مستند در مورد حشرات ببینیم!!!؛ خدا و خودش می داند که چطور قانع شد ... ما هم رفتیم فیلم را دیدیم. یادم هست دم در ورودی جوانک مثلا هجده ساله ای یه نگاهی به ما کرد و پرسید : همگی سیزده سال دارید دیگه ؟
5- ترم اولی که آمدم شریف درس زبان و ماشین برایم غولی بود. تمام درس ریاضیات محض است که خوب خواندنش به هیچ پیش نیازی جز هوش و درک کافی احتیاج ندارد. منظور اینکه اول دبستان هم می شود یک استادی را بیاورند به بچه ها تئوری زبان ها و ماشین ها را بگوید منتها مگر اویلری یا فرمایی بینشان باشد که در آن سن درس را پاس کند. عاجز از حل تمرین های قابل توجه کتاب و غرور بیجایی که مانع می شد از دیگران بپرسم، من را به این سمت برد که ماکسیمم ممکن است با 10 یا 12 پاس کنم و بعید هم نیست درس را بیفتم. شدم 19.5 و آن وقت شاخ غول شریف شکست؛

گویا نوزدهم یا بیستم دی است و دیگر از شب یلدا کمی گذشته ولی به رسمی که گفتید محمد و چاقو را دعوت می کنم به اعترافات؛

Monday, January 08, 2007

The last two weeks or so ...

Hi.
The following is a log of what I've done and thought in the last two weeks or so. It's not in persian because I used fedora (no farsi fonts), and I have personal reasons too which I would discuss if it matters to anyone who reading this might matter.
If you find something personal in them just forget about it, I must have missed cutting it out when I copy, pasted the following. If you want to comment (rare happening) please refer to the date.
I'll be updating here in this manner from now, until further notice. I'll try to update every two or three days or so.

Saturday 12/23/06
Its snowing outside, Shajarian is singing, writing GTK+ code and just decided to write some of the stuff I am doing here.
The mountains of Qazvin, the ones I love -the beauty and magnificence of- aren't visible; It still snows.
The snow has stopped, its a bit cold. The helloworld2 program worked, I am going to take a little break, I thinks I deserves it.

Now the mountains I long to see have come to my vision; I can bring my head up and look at the glory of mount. Soltan Gheis, wearing the white and glorious snow; I've been home, and back. Let's get back to work.
Some points I caught.

  1. Pointers of type void have to be cast before they can be referenced using the * operator. So for example if you want to pass string * str using a void * p, and print it you have to write something like this : std::cout << *( (std::string*) p );
  2. In GTK+ there is a major difference between signals emitted from widgets, and events that occur; event callback functions need a GdkEvent *event parameter, while signals don't need that.

No more points for now.

After a long time I am listening to Sute-Delan, and it works magic. Yes!
No time to tell what I am doing; loads of brain stuff needed to work this out. Sorry.
Going home. Enough for today.

Sunday 12/24/06
Listening to Sharghe Anduh.
One nice thing to do when your tired is to chat with a friend who is also tired and online; but to my least expectations, I can't do that because of the heavy network proxy and every other thing they use to cut people like me from the online world. I can't even play MP3's or DVD's. Fedora 6 is cool, but it sucks for missing an MP3 player. I searched the net, and there are plugins that one can download for both MP3 and DVD play, but those aren't downloadable with the network I am using. Makes me sad. I'll look to see if I have brought any music that might cheer me up. Cheers.

The mountains have come into vision again, it's around 4 o'clock and Sultan Gheis is visible, yet not in whole, clouds surround him and he still wears white.

Monday 12/25/06
Today There is no snow, no fog, no clouds in the blue sky of Qazvin. The office, still looks like a mess, though.
The table_demo program was written succesfully. No big problems. I've learned to use boxes and tables for packaging widgets. Oh and I think I did something great.

Yum is used on fedora for doing updates and stuff like that; it wasn't working first, so I searches the yum documentation online and found out that I needed to set the proxy server and port to make it work. I configured the file /etc/yum.conf. Adding the line:
proxy = http://176.20.8.1 :8080
and to my surprise it works. I like this, I feel like I am learning stuff I hadn't dared go around, in fear of failing. I can. Oh and yes the MP3 plugins are being downloaded. Still no MP3 though!

At last GTKmm is installed, not tested yet, but that should be done in fairly little time. Yes, it was just tested and it works. The only thing is that C++ looks fairly unfamiliar compared to C for me. I am all going for the challenge.
Looks like there are loads of things to learn; got to start somewhere.
Listening to seir (Journey). shall it be.

Saturday 12/30/06
Yes, at last I got Totem to play MP3 for me, it hadn't been as hard as I had expected, but time consuming, and now I am listening to Fritz Steinegger playing one of Beethoven's piano pieces. I downloaded 4 of his performances. The network was fast today after a power failure. To my chance I guess.
The main thing I am here for is GTK+ and GTKmm so I better go off to my coding. Forgot to tell you about the weather and what went on Friday. Hope to find some time.

Breaking news is that Saddam was hanged. That marks a point in history. Who could or would deny the evil he committed against the Iraqis, the Iranians, the Muslims, the human kind, but more to my mind's concern against himself as part of the human race. How grateful one should be for the death of an evil dictator, yet how sad to see the end of a human being like this. Peace be upon the world. As I read the news, thought of it, and saw the videos I could see through the office window an old man carrying a heavy load and a student coming out of the copy room with her copies in her hand, Life goes on, and the death of such a dictator will bring no change to the way our world goes on. I must admit, the hard moments I had seeing, hearing, and thinking of this news, yet now for the peace of my mind I shall end it.

Thanks god.

Back to Iranian music, Heirani.
I did lots and lots of Gtkmm.

Sunday 12/31/06
Today I only downloaded music from download.com. Now I listen to Susan Raven singing I Think Of You. Not a lot to say. I couldn't get the update thing to work on fc6 after all. It takes loads of time and normally it hits errors. This, I write is what I call a log. A log of what I've just done, in the world I have been let to live in.
The diary has been brought home and now I can also log some of the stuff I do at home on my i686. The MP3 decoder was installed tonight. The Plugin was downloaded from www.fluendo.com.

Monday 01/01/07
1st of January 2007. Just wrote the date in another manner to make it obvious. Some relatives are here and I decided to stay home for now. I rather not do any Gtkmm in front of them.
On the condition of finding some money I want to go out and buy some stuff, like a long enough headphone and some thick socks.

Thursday 01/05/07
The whole day was spent on fixing my computer, which went off on a random sequence. The Olive garden from, the music of The Passion of the Christ, I listen to now, the music that truly suits the movie and has taken my heart for the least. Oh the computer seemed to have a loose connection, one that provided 12 Vs of power to the CPU. Oh yes! very important. Cleaned the connection several times using a contact cleaner. Still unsure of the security of the connection, I write in full English words.
Caught a cold; throat burns. Loads of pills, I've taken. Not the issue though.
Jesus is being arrested according to the music;
Insight, or enlightenment, the word is not the issue; the state though as the music suggests -most sadly- is that Peter is denying Jesus three times before the cock calls. Yet the issue on which one may ponder deeply or much better see in full is what is. I see now, never before, what is. Maybe through a lighter fog than before, but to watch, just to see, even through this fog, is indeed meditation, for I am calm, and the state of my mind is free; free to observe in whole the beauty of what is. What is now. The beauty of life as it has always flourished, and I can not say it always will, for the future is indeed, never seen.
Mary goes to jesus, the music lovingly fills my ears. The ears of a human, not of mine as the me, but the human.
Will this be an end to the misery of the me? I care not, for the me is the misery.