Cross Compiler – How to

For those who want to test your program on different architectures. For example, you are having i386 but want to compile and execute on alpha, arm, i686, mips and so on. Most of the crosstool available on the internet are out of dated. Here is easy setup for cross compiler.

I am running Fedora on my virtual machine and I am using the tool from kegel.com

[1] Download and unpackwget http://kegel.com/crosstool/crosstool-0.43.tar.gztar -xzvf crosstool-0.43.tar.gzcd crosstool-0.43

[2] No TLS: edit the demo-alpha.sh unrem eval ‘cat alpha.dat gcc-4.1.0-glibc-2.3.5.dat’ sh all.sh –notest

[3] Static Link : edit crosstool.sh like this http://sources.redhat.com/ml/crossgcc/2005-07/msg00153.html

[4] As root:mkdir /opt/crosstoolchown $USER /opt/crosstool

[5] sh demo-alpha.sh [6]Running GCC: edit you $PATH or compile from /opt/croostool/….

Keystone CO

I rarely go ski this season, due to the works load and stuffs. So, after the midterm, I decided to hit the slope at Keystone.

World of Warcraft, a time drainer.

For the past months, I have been really hooked with the most popular online game in the world. The game is called “World of Warcraft“, a polished game from Blizzard Entertainment which is my favourite game development company. World of Warcraft is a very socialize and addicted online game. According to the news, there are currently 8 millions subscribers are subscribed to play this game.

So why I am telling you here about this game, because I have spent lots of my time killing monsters in the game. Three years ago, when the game was first released, it was so bored for me, I couldn’t handle doing the same thing over and over again, I couldn’t find any fun of it, so I went to look for something else to entertain my brain. How’s about having a robot to play the game for me while I study…. sounded fun to me.

I was in the scenes of Wowbot, ISXwow and Wowglider for a while, These softwares will play the game for you while you away from keyboard. They are third party software and against the game term of services. It is cheating!, some gamers take serious about the use of these kind of softwares, but I found it is quite interesting, the developers of the softwares are very talented and they already earned lots of money from their inventions. However, many players have been banned by using these softwares, because they can be detected by the anti-cheat program from Blizzard which is called “warden”.

For those people who don’t know about warden, it is a small program which integrated with the game, update itself dynamically. It acts like a spy ware, such that it looks at the user processes in memory or even read the user hard drive and scan for the suspicious botting programs, if it founds out that the user has such programs installed or running, that user game account would be flagged and most likely to get a banned stick.

Regarding to the software design, at that time, Wowglider were implemented in different way of others, instead of using code injection like Wowbot, Wowglider focused on the manipulation of the mouse and keyboard so it was harder for warden to detected. I am not so sure in detail of how the developers implemented those features, so I had better not to speak. About ISXwow, it is an extension of Innerspace program which is acted as layer between OS and game applications, so the software has more flexibility and can support many DirectX games. I also contributed by wrote a client-server application in JAVA language, it is a small tool which is hooked with the software, so that I could remotely monitor and control my cartoons from my workplace 60 miles away.

Since the warden has been released, the accounts which found out to be involved with third party softwares were banned from the game. The developers have been trying hard to avoid the warden detection. Due to the increment of banned users, Many of them had to stop the development of the program and released their product as a open source code under license.

There are many debates about the right of using these automate softwares or “botting” programs around Internet. Some people think it is cheating, but some people think it is another way they enjoy their game. So even they got banned, they will be happy to get a new copy of the game and come back to bot again.

In previous months, I began to play this game again(manualy at level 70), somehow I was hooked and can’t get away from my desk. I felt it need a rehab and finally I decided to quit playing the game after the release of 2.3 patch, with 1870 points for 2v2 Arena team for. For PVE, I was one of the founders and officers of the guild. I have lead my guild members from 10 man Karazhan to the 25 man Serpent shrine.

Due to the limited time I have, I must say good bye to this game. The game is great and it was fun while it last but you know what? I feel that I shouldn’t have played this game. It sucked too much time from my life. My suggestion is don’t ever think about playing it, trust me…it is really addicted. I see many kids playing this game like a full time job. It is sad.

Here are a clip and pic I left as a memorial of this game.


Masterbate my math equation

Masturbation?? You might think how could I came up with such a nasty word. Well, I don’t know what would be a perfect word to express my feeling when I have to use all my brain cells to memory things before the exam.

From my personal experiences, let me tell you one of the facts about Computer Science students in my University, and count me as one of them. When we take a Math course which is taught by Math professor, we always have a feeling of being dominated by Math/Engineering students and professor. I don’t know why, such that everytime the Math students have to sit in front of the class and nod everything the professor said, while Computer Science students sit at the corner back of the room and crying. It is cruel, the lectures are full of math equations, the homeworks are all about the derivation of math equations, the text book is ten years old and full of math equations in every single pages. About three weeks after attending this class, I have an illusion of mathematics symbols like seeing Integral, summation symbols floating all around me. It is such a nightmare!

I am one of the Computer Science student who never enjoy working with math equation. Also, it has been ages since I have touch Calculus. This evening, for my Communication Networks class, we just had a midterm exam and to be able to kick the math students’s butt, I sacrificed myself three whole days remembering all the needed equations for the the midterm. Some of them I don’t know how to derive so, i just remember them all. When the professor handed the exam to me, I just wrote those ugly equations from my brain cells to the paper as fast as I can before I would forget. The feeling is nuts but it works like a charm, I almost throw up in the exam room…Anyway, the exam went very well. Thanks for all those chocolates, soda, sugar, I injected to myself.

Why Events Are A Bad Idea

According to the paper, ‘Why Events Are A Bad Idea (for high-concurrency servers), R. Behren, J. Condit and E. Brewer, Proceedings HotOS IX, Kauai, Hawaii, May 2003, pp. 19-24.’ As we know, thread versus message passing(event-based) programming has been debating in term of which is the best in term of performance lately, and many people believe that the event-based programming is much better in many ways than thread programming. In the paper, the main motivation of the authors is to show that thread programming is better than event-based programming in highly concurrent applications environment. They have shown us that thread could perform about the same as event-based in many criticize cases and it could have done better if we have fixed the complier. In other hand, they have concluded that thread will outperform event-based programming by judging from their analysis from the simulation they built. For this review, I will explain the authors main contribution, theirs deficiency. Lastly, I will rate the significance of the paper based on my personal opinion.

According to the paper, the authors has shown us the different between events and threads in term of their responsibilities such that events use event handlers and send /wait for messages, while threads use the function forks and so on. They also describe the problem with threads which has been criticism from other who think that event-base does better, such as performance, control flow, synchronization, state management and scheduling. They proved that these problems caused by the implementation of the programmers.

To make us believe that thread could perform better than event-based, they points of the two important properties of why thread could do better. For example, in modern servers, the requests from the client are independent, and the code which handles the request is sequential. So, they came up with the experimental by modify the compilers and integrate the complier and runtime system. Moreover, they ran the simulation and analyze the results such that event-based requires too many contexts switches and use too much heap due to the fact that its execution is so dynamically. Therefore, they conclude that the thread avoids this kind of problem and could give us a better in execution time.

In my opinion, I think the deficiency is that they haven’t done enough experiments with other cases such as they could test on other operating systems, or by using other benchmark suits to test on various inputs before they conclude that the simple thread programming perform better than the event-based one. However, thread versus message passing is an interesting topic, but in term of practicing in real world applications, it would cost so much time and afford to modify or integrate the complier and runtime like they mentions in the paper. Finally, what if their future results show a big advantages of thread and huge different in term of performance between them, but in reality many programmers still don’t quite understand how the thread really work, so are we going to achieve the utilization of the computer resource we have? I would rate the significance of this paper 3/5 because of the lack of evidences in term of real-application and the lack of references from others research which support the author’s arguments.

My 2008 Valentine’s day

I am about to upload some of my pictures which are taken from Chicago, the most recent place I just visited weeks ago. Too bad, I didn’t bring my camera with me there, so most of the pictures are taken from the Thai Club with my friend’s camera.

Web blog and me?

I have been visiting many blogs these days and I found many of them are quite interesting, some of them are very useful and have motivated me. It is a good idea to have one for myself. But why web blog? I see many of people love doing it on hi5, but not for me. Is hi5 a blog? wait… what is the different between hi5 and web blog? Actually, I do have a hi5 and still visit there time to time, but not to be offense I feel it is like a dating or mate matching site, or whatever you want to call it.

So I want a place for free speech! and Yes! time is flying like arrow, I feel like my life is so short, many things I want to do. Bloging seems to be an interesting one, therefore, I am making it, and since I have been a Google fan boy, so I should start having my first blog with the Google parther which is blogger.com. I hope this will be a good place for me to write something out.

As I am writing now, I plan to dedicate this blog for my job professional, thoughts, some of my personal life styles and so on. At least for my private sake as for keep tracking what I have been doing lately. This year is the last year for me in Colorado, I have been living here almost 9 years, so, start from today and I am moving forward. 🙂

…….

Whoo!, so cool, the editor I am typing has a spell checker feature implemented!. I am wondering in the future, we wouldn’t need MS word anymore, everyone can do theirs office work from a web browsers. Taking about web blog, as an experienced webmaster, creating a personal website today is a piece of cake like typing in word processor. They do everything for you from designing to publishing the web, except your own contents. A trade off, the tools help our life easier but we are also losing something…