Mind Bogglingly Large

Space is big. Really big. You just won't believe how vastly hugely mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist, but that's just peanuts to space.

-- from The Hitchhiker's Guide to the Galaxy, by Douglas Adams

A few days ago I was asked, how likely the hash function used in eMule would collide. Well, eMule use 128-bit MD4 which could have 2^128 distinct value. So, how big is 2^128?

I once heard that that number is somewhere around the number of the atom of something, Earth?, maybe. So I googling around and found a nice page in WikiPedia talking about the order of magnitude of numbers. It turns out that 2^128 is roughly 10^38 and the number of the atom on the earth is estimated to be around 10^50, a trillion fold more than possible hash values. Hence, it is not possible for 128 bit MD4 to uniquely identify every atom on Earth. Never mind, a trillionth of the whole atom on the earth is enough for my safety threshold. However, the number of atom on Earth is something we cannot grasp. Is it large? Definitely. But how large, I don't actually know.

Interestingly, IPv6 address space is also 2^128 and one nice description of that number that would make us go "Wooow" is something like this.

To put this into perspective: there are currently 130 million people born each year. If this number of births remains the same until the sun goes dark in 5 billion years, and all of these people live to be 72 years old, they can all have 53 times the address space of the IPv4 Internet for every second of their lives. Let nobody accuse the IETF of being frugal this time around.

-- Iljitsch van Beijnum, Everything you need to know about IPv6.

OK, that looks Mind-Bogglingly-Larger than the number of atom on the Earth.

PS. It also means that IETF is a trillion time short on the IP address if, in some way, we would like to assign each atom on Earth an IP address. Would it be necessary? Only the time will tell.

Tamiya Paint

This weekend is three days long and to me it is a good opportunity to tidy up the house. The target is to get rid of anything I no longer need (but somehow is still in the possession of mine). I started by trowing away all used PC parts, mobos, sound card, vga card, old ram. I found a 486 board sitting in the cabinet, with 8MB of rams that I once kept in the hope that it might be useful someday, a bad habit that will eventually render your place into a garbage castle.

Now, I found a handful of Tamiya's [enamel paint](http://www.tamiya.com/english/products/list/enamel_1.htmb that I bought for my pla-mo. No, I hardly do any pla-mo and by no mean I could call myself a plastic model hobbyist. I constructed a few gunpla's and a few aircraft fighter but all of them turn out to be a failure of mine.

Nevertheless, I were serious about assembling one, such that I bought air spray and a lot of paint, quite a spending spree. They served me well at that time and they sitting in the cabinet for almost 10 years without any further use. Shame on me. Anyway, I disposed all of them this morning and it is a kind of sadness for me. So I took a few picture of what is the remnant of my short-live hobby.

What to be disposed Image removed.

Tamiya paint has a code starting with X or XF, X means gross paint while XF mean flat paint. The following number is the color code which is the same for gross and flat, e.g., X-1 is gross black, XF-1 is flat black. The back row is the Acrylic color of Gunze along with its thinner and Mr. Masking Solid.

Close up look of the flat paint. Image removed.

Some of gross paint, the clear cap ones (X-23 and X-26) are special because they are clear paints, used for painting a clear part such as windscreen of a car or a canopy of an aircraft. Image removed.

X-20 is the thinner. Image removed.

A wall of enamel paints. Image removed..

I almost forgot Putty. On the left is the lacquer. Image removed.

Finally, everything is disposed. God of Tamiya should be furious. Image removed.

The full album can be found here.

Latex DocClose applet

LaTeX is a de facto standard for most academic publications. Just like an html, a LaTeX document is a plain text file which could be edited by any text editor of our choice. Some editors stand out for being tailored specifically for LaTeX. One nice free (as in a free beer, but not quite as in Free Speech) is LEd (LaTeX Editor). However, LEd lacks one tiny feature that I need most. It is very irritating when I compile a LaTeX document using pdfLaTeX to know that I didn't close the last revision pdf in the acrobat first. This would make pdfLaTeX complain to me that it could not write to the pdf file because Acrobat wouldn't allow so.

The obvious solution is to close the document in the Acrobat first and it would be really nice if LEd could do this for me. Other editor can do this, for example, WinEdt. However, as I stated in my previous post, Acrobat already allow us to close the opened document using DDE. So I modified the example from the acrobat SDK to get this little applet that can open and close pdf file.

To use the program, just run it with one parameter, the file name of the pdf file and the document will be closed. For example,

acroddeclose c:\test.pdf

would close the file (if it has been opened). If we put any other argument following the file name, it will open the file (if it has not been opened yet). For example,

acroddeclose c:\test.pdf 1

will open the file.

The application and the source code could be d/l here.

Now, to integrate this into LEd, we need to modify the script of LEd. Luckily, LEd makes it very easy to do so. Everything is stored in a text-based script file. First, we need LEd to supply us with the full file name. We have to look for the main script file, located at Definitions\tex_cmd.gd. This file controls the shortcut, bitmap image, label, hint, etc., of the script that appears on the toolbar of LEd. Most importantly, it controls the parameters that are passed to each script file. Locating the following line in the file.

11007=11007=F7=PDFLaTeX=/l53007/l=exec:pdflatex.bat <MAINFILEDIR> <MAINFILENAMEEXT> <MAINFILEDISK>

This line controls how pdfLaTeX.bat should be run. Be noted that your actual text might be different from me but what we have to look for is the line containing the word exec:pdflatex.bat. Now, as you could see, file directory, file name and the drive is already supplied to the pdflatex.bat. However, what we need is the full file name with path, which LEd kindly provides us already. Simply append the code <MAINFILE> to the line so that the forth parameter given to pdflatex.bat would be the full path. The line should be something like this now.

11007=11007=F7=PDFLaTeX=/l53007/l=exec:pdflatex.bat <MAINFILEDIR> <MAINFILENAMEEXT> <MAINFILEDISK> <MAINFILE>

Next, we have to modify the batch file script for pdfLaTeX. Locating the file Batches\PdfLaTeX.bat inside the LEd directory and add our program so that it closes the pdf file before compiling the document and opens the file after the compilation is done.

The new pdflatex.bat should look like this.

rem @echo off
AcroDdeClose.exe %4
%3
cd %1
pdflatex.exe %2
pdflatex.exe %2
AcroDdeClose.exe %4 1

That's all.

OpenVPN for DotA again, once and for all

-- updated 08 March 07 --

From the stat at mybloglog, many ppl come to my web from the Google search about OpenVPN and DotA. I will summarize the howto again because my previous two entries do not give enough information.

First, let us define the problem. My particular problem is that we have several players sitting on different subnets and each subnet has a very strong firewall rules, i.e., the firewall block most of the ports and doesn't allow UDP package.

If this is not the case of you, e.g., your subnet is an open subnet then the solution is simple, just logon to any existing PvPGN server!!! (the battle.net emulator). That should solve all the problem.

However, in our case, we don't enjoy such luxury. Our network administrator are much more paranoid. UDP port is blocked, so that it is not possible for the gaming data to be sent between the player. The straightforward approach is to create some virtual privacy network (VPN). My solution uses OpenVPN. However, configuring OpenVPN is not a simple task for non-tech-savvy user. Besides, having everyone install OpenVPN seems like a bit over cost. The requirement is that the solution should be done in a minimum of fuzz.

I have to add a remark here that, if UDP is allow in your network, you might give Hamachi a try. Hamachi is a zero-configuration VPN. It is surprisingly easy to use and if every body can use Hamachi, that should be OK. But again, my situation does not sport such luxury.

In contrast, OpenVPN allows you to config various thing, you can pick protocol, port number, etc., at the cost of configuration complexity.

Now back to my solution. I am lucky enough to have a machine with a public fixed IP in one particular subnet. So, that machine is used as a central server for OpenVPN and PvPGN.

My solution is like this:

  1. Install PvPGN on that server.
  2. Install OpenVPN on that server also, and configure the server to forward the package from the VPN interface (Let that machine do NAT for its OpenVPN interface).
  3. Let the ppl on the different subnet (not the same subnet of the server) connect to the server, using OpenVPN.
  4. Let the ppl on the same subnet as the server create the game and let the others join.

This solution is possible because I configure OpenVPN to route every package from VPN client to the server subnet. Hence, gaming data using UDP port will be packed and sent to the game server via VPN, while other ppl on the same subnet of the server could directly use their network, without using OpenVPN.

Here are the detailed description of the solution.

Step 1 is really simple, just go to the PvPGN website, download the latest version and install, that should be OK.

Step 2 requires some manpower. I won't describe the detail here. My earlier post already gives some detail and the Official OpenVPN HOWTO provides a very detailed step-by-step explanation. In general, what you have to do is to set up OpenVPN server normally as described in the official how-to. Then, you have to re-configure your server to accept multiple client using the same client key (this is not recommended by the OpenVPN standard since all client would be able to decrypt other clients data, but we just want to play DotA, no secret is required to be protected. So, this should be fine).

Step 3 is to generate one client key and configuration and let the ppl on the other subnet use them. What you have to do is to configure the client configuration file such that all data that is bounded for the server subnet should go through VPN. However, this must not include the traffic from the client to the VPN server, this particular traffic has to go via the normal network, otherwise, OpenVPN will not work. This could be done in the routing setting of the client configuration file. Adding the following line should do the job.

route a.a.a.a b.b.b.b
route s.s.s.s 255.255.255.255 net_gateway 1

where a.a.a.a and b.b.b.b is the network and the subnet mask of the server while s.s.s.s is the IP of the server. Consider this example,

route 11.22.33.0 255.255.255.0
route 11.22.33.29 255.255.255.255 net_gateway 1

In this case, the network is 11.22.33.* and the server is located at 11.22.33.29.

That is all, let everybody login to the PvPGN and let someone in 11.22.33.* create a game. Everybody should be able to join and play.

Step 4 requires no explanation, I believe that you know how to create the game.

Some might ask, why we have to do step 3? The point is that, when a Warcraft III client from different subnet join the game, gaming data (UDP) must be transmit to the machine of the creator that resides on the server subnet. That is not possible, so we have to route the traffic from the client on different subnet via OpenVPN and let the OpenVPN server do NAT for us. And since we don't generally know the IP of the game creator beforehand, we simply route everything bounded for server subnet to the OpenVPN server. However, this also include the "data-for-VPN" packet to be routed in the same way, and it won't reach the server, so we have to add the exception that, if data is to be routed to the openvpn server, we simply use the normal routing.

Chill Out

Admittedy, I am not a trendy man. I cannot follow what is out there in those eccentric character style. Some new thing, slang, fashion, trend starts there and spread into mainstream somehow later. Late enough so that the eccentric group comes up with something cooler, or kinkier, or just plain flat out of the box.

Anyhow, I just sit there and wait until some of that thing hit me. For example, my first sight of Murakami's Book is when everybody have read more than dozen of his. This is entirely, but not quite, overly exaggerated. Now it comes the phrase "Chill Out". Oh no, I am not that bad, I have heard the words for long. The word "long" for me in this case is within the past year. Up until now, I believed that the words is just a new emerging trend. However, I just watched pulp fiction(1994) and the character just said the words. OK, that is not new but I just know that.

I remember hearing some dean of some geeky department in some of those nerdy universities saying that their student should catch up with the current trend, in the social way. Well, obviously I didn't follow his recommendation.

You could call me a prehistoric caveman.

Another embedded subset problem

In my latex installation, \bigcup produces pdf using F73 fonts!!!, it is Type 3 and I don't know how to make it become embedded subset.

-- UPDATED --

The way to fix this problem is to use the option [cmex10] for the amsmath package. It is stated in the new version (1.7) of the IEEE transaction template by Michael Shell.

In short, just use

\usepackage[cmex10]{amsmath}

Another Interesting Stat from Google Webmaster Tools

From my last entry, I mentioned that I misspelled "my space" into "my spaec" and that made my blog appear in the Google search of "my spaec". At that time, my blog appeared at around the fifth position. However, I have rectified the misspell and wrote about it the last entry which obviously still contains the words "my spaec" (and so is this entry). When I checked with GWT again today, it turns out that my blog moves to the third place (try it). Is that the marketing tactics of google?, linking misspell of its enemy into worthless blog :D.

Usually, I have around two or three visitors per days (obviously, one of them is myself). However, Google Analytics reports that there are around 30 visitors on the Valentine's Day. I investigated further and, to my surprise, visitors came from various locations, Netherlands, India, Hungary, Italy, etc. As I said, my blog is not popular, it is me and only a few of my friends that regularly visit this page. Unlike [Mr. Wood](http://pit.dogpositive.com/blog] whose blog is visited by several ppl around the globe, to see his expertise in photography, I don't do photographing, and I never had a nice picture on the web.

No, it has nothing to do with the Valentine. On that day, I wrote about how I like "An Inconvenient Truth". Coincidently, a news entry in AOL also reports the similar story about Global Warming and Al Gore. AOL features Sphere link at the bottom of the story. Sphere is the blog search engine and it lists my entry as a related story about the news. Obviously, some people follows the link into my page, (to find almost, but not quite, entirely unlike anything more informative to them, sorry for that).

Another interesting thing is that some visit my page about the DDE for acrobat I mentioned long ago. I wrote a small program that close PDF by using DDE, which should be handy for those using pdflatex, I will post the program here, soon.

Google Webmaster Tools

My stupidity, I didn't check carefully the result from the Google analytic. From the previous entry. I said that I will never know where is the original link to this site from lewcpe. That is because searching with link:our.obor.us does not return result from lewcpe.com. However, the original link is right there in the Google analytics!!!.

Well, the page in lewcpe.com that link to this page is about another Google product, Google webmaster tools. He used the Google webmaster tool to identify webs that link to blognone, which including this site.

Well, the tool is handy anyway.

It can identify link that point to my site. It can report top query that put my site near the top. Strangely, if one search my spaec (the misspell of my space), my site appears at the first 10 pages. That is because one of my post misspell the word!

I am using too much of Google's products. Lucky that they are free, at least for now.

An Inconvenient Truth

I had watched Super Size Me, the 2004 Oscar-nominated documentary film and March of the Penguins, the 2005 Oscar documentary. Both are good. However, today, I watched An Inconvenient Truth. Even though it does not awarded yet (right now it is nominated for 2006 Oscar), I like it more than the previous two.

The film features Al Gore giving a presentation about Global Warming. The presentation is very professional, (well, for Mac-fanatic, he uses Keynote) however, the best part lies in the content. The film presents very interesting fact about global warming, saying that it is happen, it is serious, and many key contributors of the problem still refuse to rectify the problem. Gore illustrates the serious of the problem and giving out three important misconceptions, and saying that the correct conclusion are

  1. Scientists have reports unanimous consensus that Global Warming is really a problem.
  2. Solving the problem is not the same as destroying the economy.
  3. We still be able to solve the problem.

Interesting Facts:

  • Scientific reports have been altered by a small group of people whose earning are based on old technologies that cause global warming.

It is difficult to get a man to understand something when his salary depends upon his not understanding it.

  • Ozone problem is about to be fixed!!! The ozone hole is recovering because a big drop in ozone-threatening chemical which is a result from worldwide agreement.

Well, I cannot write up all the detail but what I want to say is that the film is strongly recommended for everybody. Try it.