This is a dilemma. Modern operating system does not like slow system with not enough memory. Let me give my old laptop as an example. This is Celeron 1.1Ghz with 256MB ram. Cache size is 256Kb. First, Windows XP, the mostly used OS these days, can survive barely with fresh install from original recovery CD (Home edition). But, as patches and service packs are added up, getting sluggish. Eventually, fully patched machine will give unusably slow machine. To use this computer, exposing to risk of unpatched status is inevitable.
Second, Windows 2000. Ha ha ha. Unless somebody has a too much time to experiment how long it takes for fully patched with gazillian times of reboot. I don't want to try, but I can imagine myself stuck in this ugly box patching and rebooting repeatedly.
Then, linux becomes the key. However, current ubuntu/kubuntu desktop release will not be happy with 256Mb ram. It will be as slow as Windows XP. We can use debian or ubuntu server and start from there. Light window manager like fluxbox or window maker with small but powerful system monitor like conky will do it. Personally, I prefer fluxbox.
When eagerness to offload unused kernel module or strip down application thanks to USE flags comes into play, gentoo brings serious dilemma. As much I don't want to be stuck updating windows machine, as the same I don't want to be stuck looking at compiling screens.
I can just compile and leave. What if emerge process failes in the middle? Okay, then use the box while compiling. That's what I do. Then, the machine is usable, but not fun. Especially, when emerging, it already lost sometimes half, sometimes fully lost cpu resource. Plus, firefox is slow!!
But, the result will be the cleanest.
The last thing that I want to see is 'update candidate, glibc.'
Thursday, July 12, 2007
Wednesday, July 11, 2007
gentoo: ndiswrapper can't find CONFIG_NET_RADIO
I was very interested in tickless kernel for longer battery life on laptop. So, when I saw kernel-2.6.22 on portage, I began to emerge. Although it was 3:00 in the morning, I couldn't go to sleep without finishing the job.
My gentoo system is very slow machine. 5 year-old Intel Celeron (256KB cache) with 256MB ram. Taking so long time for kernel compilation was bothersome especially in sleepy brain. Well, finally finished, (GOSH! forgot to check how long it took. Kernel compile does not leave a log in /var/log/emerge.log )
By reboot, I found two things broken. My sound and ndiswrapper. ndiswrapper 1.44 ebuild was complaining CONFIG_NET_RADIO. At first, I thought, 'I forgot to visit networking section.' :) But, before menuconfig, grep 'NET_RADIO' .config on /usr/src/linux surprised me. Nothing!!
Okay, if an application is complaining an non-existing CONFIG option in kernel, most likely this must be gone. I found this entry from googling:
http://bugs.gentoo.org/show_bug.cgi?id=179951
I turned on new config, CONFIG_WIRELESS_EXT, and spent compiling kernel in sleepy brain once again, rebooting, touching /etc/portage/package.mask and package.keywords for ndiswrapper, and emerging... And it was solved. modprobe successfully loaded ndiswrapper.
My gentoo system is very slow machine. 5 year-old Intel Celeron (256KB cache) with 256MB ram. Taking so long time for kernel compilation was bothersome especially in sleepy brain. Well, finally finished, (GOSH! forgot to check how long it took. Kernel compile does not leave a log in /var/log/emerge.log )
By reboot, I found two things broken. My sound and ndiswrapper. ndiswrapper 1.44 ebuild was complaining CONFIG_NET_RADIO. At first, I thought, 'I forgot to visit networking section.' :) But, before menuconfig, grep 'NET_RADIO' .config on /usr/src/linux surprised me. Nothing!!
Okay, if an application is complaining an non-existing CONFIG option in kernel, most likely this must be gone. I found this entry from googling:
http://bugs.gentoo.org/show_bug.cgi?id=179951
I turned on new config, CONFIG_WIRELESS_EXT, and spent compiling kernel in sleepy brain once again, rebooting, touching /etc/portage/package.mask and package.keywords for ndiswrapper, and emerging... And it was solved. modprobe successfully loaded ndiswrapper.
Thursday, June 28, 2007
oracle: data with single quote
When using java, prepared statement can insert string with single quote easily. I tried to achieve the same thing with python. I finally got prepared statement using cx_Oracle, but it was very ugly and unintuitive.
I tried this task with postgresql hoping for a better solution. Things were worse in Postgres. I knew that my favorite psycopg2 does not support prepared statement, yet. But, the rest of the drivers, such as pypgsql and all others that I have researched, were in the same status.
Anyway, I found this this link:
http://catherinedevlin.blogspot.com/2005_07_01_archive.html
Oracle had a different idea. Different quote operator. q'| |'. Like python block quote('''), it relieves single quote when wrapped around it.
Insert into tbl(txt) values ( q'|Hello world's geeks.|' );
I tried this task with postgresql hoping for a better solution. Things were worse in Postgres. I knew that my favorite psycopg2 does not support prepared statement, yet. But, the rest of the drivers, such as pypgsql and all others that I have researched, were in the same status.
Anyway, I found this this link:
http://catherinedevlin.blogspot.com/2005_07_01_archive.html
Oracle had a different idea. Different quote operator. q'| |'. Like python block quote('''), it relieves single quote when wrapped around it.
Insert into tbl(txt) values ( q'|Hello world's geeks.|' );
Coming back to work after the vacation
Thanks to my second son, Jaron, I had a wonderful vacation. It was the best and the busiest vacation that I had. Actually, I came back early this week. I already spent three business days in my office. I was afraid of the big eagerness of leaving my office, but that wasn't too much bad. I sit down nicely and processed pending jobs.
Programming skills needed time to get up to speed. English was troubled for a while, Korean much more fluent :) I hope my kids pick up Korean first.
Now, the good days of vacation is over and the life resumes with an additional responsibility. I don't mind, though. Maybe, Jake will object?
Programming skills needed time to get up to speed. English was troubled for a while, Korean much more fluent :) I hope my kids pick up Korean first.
Now, the good days of vacation is over and the life resumes with an additional responsibility. I don't mind, though. Maybe, Jake will object?
Thursday, June 7, 2007
my new family.
On May 26th, 2007, my second son, Jaron, was born. Having paternity leave now. Yeah~~~. It was the same hospital, the same level, but the room was the other side of hall as we were there two years ago. Funny thing is that not my wife but I am having emotional fluctuation mostly toward happy side with a little bit of tears ( Shame on ME, a man with tear! )
Anyway, his first image brought a deja-vu. He looks exactly the same with my first one, Jake. When getting a chance, I want to show pictures of my sons side by side. My wife and I took a picture on purpose when we put Jaron in the baby basket for the first time. We successfully took the same angle, the same pause, but in different clothes two years ago as we took Jake. If somebody sees these pictures side by side, 'Hmmmm,... Why did you change baby's clothes on discharge from the hospital? Were you guys bored enough?'
Anyway, his first image brought a deja-vu. He looks exactly the same with my first one, Jake. When getting a chance, I want to show pictures of my sons side by side. My wife and I took a picture on purpose when we put Jaron in the baby basket for the first time. We successfully took the same angle, the same pause, but in different clothes two years ago as we took Jake. If somebody sees these pictures side by side, 'Hmmmm,... Why did you change baby's clothes on discharge from the hospital? Were you guys bored enough?'
Wednesday, May 23, 2007
Python twisted part 2
Several days ago, I have introduced python twisted (and I just mentioned perl POE. ) The application that I have created on that day needed a new feature, Control Port. It wasn't a big deal. I opened another port with separate protocol that I have defined and spit back CSV of requested report. CSV can be easily turned into a graph. Supporting XML seems like too much for this but can be done easily thanks to BeautifulSoup. I also supported 'stop the daemon' for fun. Took me just 1 hour !!
The beauty of this was that control part seamlessly communicates with collectors because they are running under the same application. At the same time, I do NOT need to think about Threading and locking. How nice it is !!
The beauty of this was that control part seamlessly communicates with collectors because they are running under the same application. At the same time, I do NOT need to think about Threading and locking. How nice it is !!
Thursday, May 17, 2007
python twisted
It is just over 1 year that I have used twisted. I actually used Perl POE before I used twisted. It does not matter which one is chosen. Python users will use twisted, Perl users will use POE. They both are very useful. Personally, I prefer twisted simply because I am a python user.
These are called asynchronous high level network framework. Sometimes word 'abstracted' is attached in introductory contents.
First thing we have to focus is what it is. 'Abstracted' or 'High level' can be best described as 'Protocol Implemented'. I do not have to worry about protocol specifics. I just call methods from objects instantiated from twisted.SomePackage. And asynchronous means, not synchronous. Then, someone may ask what is synchronous? Let's simplify that 'synchronous' is similar way to have conversation between human beings. One person asks, and wait until the other responses. Peers don't speak at the same time. In asynch mode, they do. More in detail can be found in Unix Network Programming ( a.k.a UNP ). There are more in detail about asynchronous communication (non-blocking, signal driven, etc.) I recommend reading UNP for network programmers. Chapters about Async-communication was the best.
With these network frameworks, any network driven application can be very simplified in terms of number of lines of code. Especially, server applications processing custom protocols are very simplified. Buffer handling/IO handling is almost trivial and the performance is even faster thanks to async IO's better utilization of bandwidth.
This morning, I have written another network server processing message from various servers. The key word is 'This Morning'. That's right. I wrote this in low degree of hours. Actually, in 2 hours. I just process the message and stuff into sqlite3, and my life goes on. If I have to write the same code in C, it should take up at least 1 day. :)
These are called asynchronous high level network framework. Sometimes word 'abstracted' is attached in introductory contents.
First thing we have to focus is what it is. 'Abstracted' or 'High level' can be best described as 'Protocol Implemented'. I do not have to worry about protocol specifics. I just call methods from objects instantiated from twisted.SomePackage. And asynchronous means, not synchronous. Then, someone may ask what is synchronous? Let's simplify that 'synchronous' is similar way to have conversation between human beings. One person asks, and wait until the other responses. Peers don't speak at the same time. In asynch mode, they do. More in detail can be found in Unix Network Programming ( a.k.a UNP ). There are more in detail about asynchronous communication (non-blocking, signal driven, etc.) I recommend reading UNP for network programmers. Chapters about Async-communication was the best.
With these network frameworks, any network driven application can be very simplified in terms of number of lines of code. Especially, server applications processing custom protocols are very simplified. Buffer handling/IO handling is almost trivial and the performance is even faster thanks to async IO's better utilization of bandwidth.
This morning, I have written another network server processing message from various servers. The key word is 'This Morning'. That's right. I wrote this in low degree of hours. Actually, in 2 hours. I just process the message and stuff into sqlite3, and my life goes on. If I have to write the same code in C, it should take up at least 1 day. :)
Subscribe to:
Posts (Atom)
