4/13/2013

Waking up with an alert just before a big earthquake

Early this morning, at around 5:30, I woke up with unfamiliar sound of alert. A few seconds later, everything started to shake with big noise. It was a M6.0 earthquake hit Awaji Island near Kobe. I got a phone call then from my working place for a request for an immediate checking of a machine there. I changed my clothes, washed my face in a few minutes and drove to the working place. After spending a busy quater day there checking and restarting for the normal operation, I found myself wondering about one thing: What was that sound of alert? TV was off and we have no radio in our house and all computers were shut off. Finally I found it was my iPhone5 which received a signal from J-alert system and made that sound of alert. This was very impressive incident.

4/10/2013

Plan for a new MacBookPro: Writing specification

When we have a plan to purchase something, our administrators require us to write a specification to open for a bidding. I can not, however, just write "I want a MacBook Pro quad-core Intel Core i7, 2.8 GHz model." They don't accept names of commercial products and I can not use words like "Mac" nor "Intel". They accept only descriptions of characteristics which I need for my purpose. So, only "quad-core" and "2.8 GHz" are accepted in the sentence above. This is something like

namespace admin{

class Specification{

     public:
        Specification & cpu_arch(std::string const& arg);
        Specification & cpu_speed(double const& arg);
        Specification & memory_size(double const& arg);
        Specification & memory_speed(double const& arg);
        Specification & storage_size(double const& arg);
       ........
};

} // admin namespace

to use it as

using namespace admin;

Specification I_want_a_MacBookPro(
          Specification.cpu_arch(X86-64)
                            .cpu_speed(2.8)
                            .memory_size(16)
                            .memory_speed(1.6)
                            .storage_size(512));


ROOT5.22 doesn't have TFitResult

I was to include root/include/TFitResultPtr.h in my c/c++ fitting routine. But I was told "No such file..." I found this class was not included in the root version 5.22, which I got from fink! (Yes, I'm getting old.) I have 3 choces:
(1) to upgrade 5.22 in my current MacBookPro,
(2) to install a brand new 5.34, or
(3) to find another way in 5.22 without TFitResultPtr.
My estimate for required elapse time for each case is as follows.
(1) a week, (2) 3 days, (3) 1 day
I take (3).
....Result
I was right. It took a few 10 minuits to find the information I needed was
available through TF1 object used in the fit for TGraph.

lesson:
If you don't find an object in your old root, find another way to obtain the information you need. It can not be happen that there is no way in 5.22.


4/09/2013

Plan for a new MacBookPro: Budget

I want the swiftest system with large enough memory and disk space. Therefore, it is straightforward for me to choose the high end model: 2.7 GHz quad Intel i7 with 16GB, 1.6 GHz memory and 512GB flash storage. I'm going to use it in the clamshell mode connecting to my old display and my lovely HappyHack keyboard. This means I don't need an excellent 15" Retina display. But it comes with anyway. OK, I'll take it. Cost = J¥245,800.

 I take an upgrade of the quad i7 to 2.8 GHz. Cost+= J¥22,800.

I don't take an option to increase the capacity of the flash storage. 512 GB is enough.

I need a Mini DisplayPort-VGA to connect to my display. Cost+=J¥2,800

I should have a Time Capsule. 2TB is enough, I think. Cost+=J¥26,400

Cost: J¥297,800 (Apple Store)

(Why I want a brand new MacBookPro?)
My current MacBookPro: Intel Core 2 Duo 2.8 GHz with 4GB memory. OS X 10.6.8. Used to be good enough for my purpose. I am just beginning to feel the limit of capacity when I run my 10K line c/c++ routine including root and geant4 libraries. More important is that I have installed these libraries in 32 bit mode. Why? Because CLHEP2 used in geant4 was only available for 32 bit. The real limitation with my MacBookPro is not of the hardware one. Some libraries like xmlrpc, when I use it to communicate with my computing environments, dosen't allow me to use 32 bit mode compiled with gcc -m32. So, I apparently need 64 bit environment somewhere at my hand. In principle, I can install 64 bit versions separately on my current Mac. But I don't want to get a mess like ones I have experienced in the past. I want to leave all 32 bit libraries working on the current MacBookPro and want a new 64 bit platform.

How did a japanese guy purchase a rice cooker on internet?

0. I made my wife a little nervous and she broke a rice cooker in our home.
1. I started to search for a new one, I mean a rice cooker, of course, on internet referring to prices and people's votes. Then chose the Zojirushi NP-RH05-TC, which has the volume of 3 rice cups (3*180 ml), just adequate for a couple of people.
2. I surveyed the cheapest offer (includeing tax and sending cost) among shops in kakaku.com and rakuten shopping mall, most popular internet shops in Japan. I chose D-Price.
3. I looked for so called point sites where one may purchase goods from registered shops and earn points (typically 1 to 5 % of purchasing prices). I didn't find the shop chosen in any of them.
4. Then I went to the shop directly and ordered the rice cooker. They will send me a mail of confirming my order tomorrow.
5. Finally I've reported all these steps to my wife. I don't know why she was getting nervous again?





4/08/2013

Specifying a file path at runtime

1. In c/c++ source code, specify the file with an environment variable:

std::string fileName = getenv("package_SRCDIR");
fileName = fileName+"<file.name>";
doSomething(fileName.c_str());

2. Ask bash users to prepare a run.sh which reads

export package_SRCDIR=/users/share/package_dir
$package_SRCDIR/source_cxx

where source_cxx is an executable of the source code.

Environment: Mac OS X 10.6, bash