IRC helps a lot

We always search the information from Internet with the search engine. The search engine crawls from web to web through hyperlinks. Then the search engine will index the keywords of the websites. Then we search the information based on the keywords.

When we face some problems, and there is no website provides sufficient solution, then we can go to a forum and post our questions. Wait for several days, someone might respond to the questions. The forum is normally a website. Thus, when we search through the search engine, we will also get the results from the forum. Currently, there are services like Yahoo! Answer and WikiAnswers help a lot to solve our problem.

But there is another channel from Internet, that is IRC (Internet Relay Chat). It is not a website. So, we cannot search the information from the result of IRC. But this is a really good channel for us to get the instant solution. For example, when I was doing the GTK+, and have some difficulties about the usage of the library. Searching around from Internet did not get the answer. Then, search for the IRC channel of GNOME. Run an IRC client, connect to IRC server, join the channel, and ask the question. Finally, get the solution. Not only that, when I was trying on Ubuntu, I also asked the questions through IRC. Though I didn’t get the solution, but I got some good information about Ubuntu. Besides that, IRC also allows file sharing, I used to download files from IRC.

Bookmark and Share

Prayer Clock

Written by using C and C++, depends on GTK+ and Expat. I spent about 3 days to study GTK+ and Expat since never used them before. I wrote this application because sometimes, I want to say a prayer, especially Angelus. But I need the prayer to read and also a reminder. So, I decided to wrote this program, at the same time I can also learn about GTK+ and Expat. And I decided to open source it as a contribution to Catholics.

I upload it with the source code included. Click here to download. There is a lot of improvements can be added.

After running the program, minimise it. Then at 6:00 am, 12:00 am, and 6:00 pm, the window will pop-up with Angelus. At 3:00 pm, 3 o’clock prayer to the Divine Mercy will pop-up.

Bookmark and Share

USB flash drive partition on Linux

Previously on booting PC-BSD through USB flash drive, I mentioned that I used Linux to perform “dd” operation towards the pendrive.

Yesterday, I just found that, my 8G pendrive now only 2G. There are 6G storage missing. I used Windows’ Disk Management Utility to check, then I found that there were two partitions in USB pendrive. And we know that, we cannot perform partitioning in Windows platform. Try to search from Internet about some information for partitioning USB pendrive, but none of them works.

So, go back to Linux, the most possible solution. Then using “fdisk /dev/sdb” (because my USB pendrive is /dev/sdb), delete the partition, make new partition. Then using “mkfs.vfat /dev/sdb1”. Yes, format my USB pendrive to FAT32 with 8G storage and only 1 primary partition. How great it is?

Bookmark and Share

MinGW and Cygwin

I am a software developer. I like cross-platform development. And I prefer lower level programming language like C. My OS is Windows. Thus, I normally use Visual Studio Express Edition to compile the source code. But using Microsoft Visual C++ compiler is not a good idea for cross-platform development, because it highly depending on the Microsoft platform. Besides that, it doesn’t have C99 standard.

So, the best cross-platform C and C++ compiler is GCC (GNU Compiler Collection). However, it is used in Unix-like OS. Yet, there are two projects porting GCC to Windows: MinGW and Cygwin. These two projects provide us GCC to compile cross-platform source code such as libjpeg, libpng, zlib, etc. This indicates that, we can also write our own cross-platform source code and compiled by using GCC in Windows and other Unix-like OSes.

However, there are limitations and advantages for both projects. Cygwin is more powerful to develop the cross-platform applications. This is because Cygwin provides a POSIX layer on Windows. Therefore, it is able to compile the source code which depends on X11, pthreads, etc. As a result, we can use Cygwin to compile some of the libraries that Visual C++ cannot compile.

On the other hand, MinGW is highly depends on Win32 API. Therefore, MinGW cannot compile the source code depends on X11. And because of this limitation, several cross-platform libraries downloaded from Internet are difficult to be compiled under MinGW.

Therefore, Cygwin can be considered better than MinGW in the sense of software development. However, there is licensing issue about Cygwin. Using Cygwin to develop an application will link against cygwin1.dll. And, this cygwin1.dll is released under GPL license. Consequently, the applications or libraries linking against cygwin1.dll will be affected by GPL license. Cygwin licensing terms mention:

In accordance with section 10 of the GPL, Red Hat permits programs whose sources are distributed under a license that complies with the Open Source Definition [See  for the precise Open Source Definition and a list of the licenses certified by OSI as conforming to that definition] to be linked with libcygwin.a/cygwin1.dll without libcygwin.a/cygwin1.dll itself causing the resulting program to be covered by the GNU GPL. [Cygwin API Licensing Terms]

As a result, the applications and libraries need not be GPLed, but must be open source and conform to Open Source Definition. MinGW which doesn’t depend on cygwin1.dll allows permissive license. That means, if we develop an application using MinGW, we can commercialise the application and make the application close source. Therefore, in the sense of commercialisation, MinGW is more suitable to be used.

Actually, Cygwin has a feature allows us to build the application without linking against cygwin1.dll. We can do this by using “-mno-cygwin” during the linking of the objects and libraries. This is because Cygwin provides MinGW runtime libraries. That means we can use Cygwin as it is MinGW, but giving up the POSIX related functions.

Because of the licensing term, I am very confused. And I also emailed and asked for the information about the Cygwin licensing terms. But nobody can a definitive answer. Since Cygwin license allows linking to cygwin1.dll with the Open Source Definition, that means if library A is zlib/libpng license, it will not be GPLed. Then, the question is, if another library, B, linked against library A, which is zlib/libpng, yet A linked against cygwin1.dll, could we commercialise the library B without open source?

Still very doubtful.

Bookmark and Share