tag:blogger.com,1999:blog-25906827960277144792024-03-14T18:54:00.371+09:00Concurrently ChaoticRandom notes on concurrency-oriented technology by Kenji RikitakeKenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comBlogger69125tag:blogger.com,1999:blog-2590682796027714479.post-31809315662059992822018-08-20T09:50:00.001+09:002019-02-21T13:29:17.336+09:00Keybase proof==================================================================
https://keybase.io/jj1bdx
--------------------------------------------------------------------
I hereby claim:
* I am an admin of https://concurrently-chaotic.blogspot.com
* I am jj1bdx (https://keybase.io/jj1bdx) on keybase.
* I have a public key ASDzBVChbICNAjHuZdRZp2kwSbrerCQEfsf4i1K7UmbEZQo
To do so, I am signing this object:
{
"body": {
"key": {
"eldest_kid": "0101556d805f32363b408685ee1b3239a1c4d3dec6ae4f584192522cc7512536c7130a",
"host": "keybase.io",
"kid": "0120f30550a16c808d0231ee65d459a7693049badeac24047ec7f88b52bb5266c4650a",
"uid": "83ae904642f02e14858494dd69442400",
"username": "jj1bdx"
},
"merkle_root": {
"ctime": 1550723293,
"hash": "4bf48b10d2c1941c1b971d958f8327f84ae4deea1e72b41c8fe85fc88483feade2d1b1be213e949a2891343078093812702cd2e59ff5a57fbd06906fb0e99859",
"hash_meta": "ec0f59c22c080fe20b8078a7702a2bff3e1bef030cdb7cf46d10e06105ae38ad",
"seqno": 4803196
},
"service": {
"entropy": "pTFxLcPUKm97UZ0blG/4DtHA",
"hostname": "concurrently-chaotic.blogspot.com",
"protocol": "https:"
},
"type": "web_service_binding",
"version": 2
},
"client": {
"name": "keybase.io go client",
"version": "3.0.0"
},
"ctime": 1550723341,
"expire_in": 504576000,
"prev": "3ebaf4f278037d5b621def6565644c6387c6d4ad5f280bec2858bbdeb3a972ab",
"seqno": 246,
"tag": "signature"
}
which yields the signature:
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEg8wVQoWyAjQIx7mXUWadpMEm63qwkBH7H+ItSu1JmxGUKp3BheWxvYWTES5cCzPbEID669PJ4A31bYh3vZWVkTGOHxtStXygL7ChYu96zqXKrxCAY53hbVlcXwXn5pHYyXx2BpW/K5BIol9linLS70OdhawIBwqNzaWfEQKzXVM2NsVaLmpOQw4u62A+qWaBZpY9qzB5cBFrw1Hi5dZqEBEwlPXN1dVg8w7fbenEuVagNmE2gb3WQ6SuDQQGoc2lnX3R5cGUgpGhhc2iCpHR5cGUIpXZhbHVlxCAgq06zW3Air56YB/fY9YOPEu1FgDUHIr6hZaKr74eZgqN0YWfNAgKndmVyc2lvbgE=
And finally, I am proving ownership of this host by posting or
appending to this document.
View my publicly-auditable identity here: https://keybase.io/jj1bdx
==================================================================Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-11672263170602843812016-11-05T18:00:00.001+09:002016-11-05T18:19:01.019+09:00Erlang and my inferiority complex against functional programming<p>A few weeks ago in the middle of October 2016, I had some interesting exchange of tweets inspired by <a href="https://twitter.com/old_sound/status/788349221946662912">an Alvaro Videla's tweet</a>. Alvaro wrote he always told people Functional Programming (FP) in Erlang was a necessity, <em>not part of the original design</em> (emphasis mine).</p>
<p>I later found Robert Virding, one of the founders of Erlang language and concurrent system, explicitly stated in <a href="https://youtu.be/iypTz5HoE-U?t=4m23s">this talk (video at Functional Conf 2016) (at 4m23s)</a> as follows:</p>
<blockquote>
<p>We were <em>not</em> out to implement a functional language<br />
We were <em>not</em> out to implement the actor model<br />
<strong><em>We were trying to solve the problem</em></strong></p>
</blockquote>
<p>Robert's statements in the quote above are the exact reason why I started and still like Erlang.</p>
<p>I've already erased the tweets (I keep most of my tweets ephemeral) of my response, but I would like to write my story about FP.</p>
<p>My first exposure to FP was through the books of Lisp in 1980s. I didn't understand the FP principles, but I got rather interested in the symbolic processing capability and the ease of handling data structures.</p>
<p>I'm not interested in slow (i.e., not sufficiently fast for a purpose) systems. In 1980s Lisp systems were running mostly on interpreters, so I have a strong recognition bias that tells <em>functional languages are slow</em>, which is incorrect as of 2016; a counter evidence is shown as a production level documentation tool written in Haskell called <a href="http://pandoc.org/">Pandoc</a>, and by compiler-based FP systems such as Common Lisp. Nevertheless, in 1980s, FP systems were mostly <em>slow</em>. Until the late 2000s, I hadn't been really interested in FP again.</p>
<p>I've got a very strong inferiority complex when I tried to study something about FP and Lisp from 1988 to 1990 at a university laboratory where the main research topic was about the programming languages and paradigms. I utterly failed, because my main interest then was how to connect the people in Japan and the world, through email, USENET (NetNews), UUCP, and affordable TCP/IP links.</p>
<p>My inferiority complex against FP is still not gone yet. Three PC member roles, Two accepted papers, and one workshop chair role (in 2011) for ACM SIGPLAN Erlang Workshop events were something I would have least expected in the late 1980s or early 1990s. FP people are generally much smarter than me and they are amazing. I have been lucky to meet the talented and productive researchers, including John Hughes, Simon Thompson, Kostis Sagonas, and many others (which I'm very sorry to omit their names here).</p>
<p>On the other hand, however, I still have some feelings that some FP people are too theoretical and not respecting well on practicality of currently programmed system, when I am watching on (mostly Japanese) FP communities, especially those on Twitter. My gut feelings are like this: Theory is nice. Theory is beautiful. Beauty is important and often essential in programming. I think that's what academic and research communities for software are for. But the real virtue of programming prevails on how it solves the real-world issues and problems. There's no side-effect-free world so long as having to deal with I/O devices. Memory is limited. CPU speed is limited. Network bandwidth is limited. Isn't FP a way to deal with these real-world limitations while maximizing the ease of abstraction on programming? (I think Object-Oriented Programming (OOP) is also trying to solve the same issues, but that's another issue; I still need to understand why Java/C++/C#-like OOP languages are simply <em>that much complex</em>.)</p>
<p>Erlang has been one of the rare language systems which didn't impose or force me to do the things in "functional" way, though the FP principles are embedded deeply in the core, such as the immutability and no-shared object/process principles. I think Elixir follows these principles well, though I see some interesting FP technologies in Elixir such as macros and metaprogramming. In short: Erlang (and Elixir) didn't trigger my inferiority complex against FP!</p>
<p>So some trivial lessons I've learned:</p>
<ul>
<li>You are never too late to learn new paradigms.</li>
<li>You are never too late to <em>re-learn</em> things once you failed to learn.</li>
<li>There's something fits for you even for a category you don't feel like to study.</li>
</ul>
<p>I think my inferiority complex against FP will stay until I die, but now I don't have to feel FP is not my stuff. And that is good.</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-45124877431874181782016-09-19T17:56:00.001+09:002016-09-19T17:56:25.661+09:00Phasing out old media<p>Getting rid of the old stuff and formats is one of the hardest things to do in a materialistic society.</p>
<p>I've managed to dump and have gotten rid of the following formats of media so far as of September 2016:</p>
<ul>
<li>MiniDisc (MD)</li>
<li>Digital Audio Tape (DAT) and the data format DDS (including DDS2/DDS3)</li>
<li>Various optical disks other than CD/DVD (including Panasonic's PD)</li>
<li>Flash memory formats other than SD including Smartmedia / Compact Flash</li>
<li>5.25" and 8" floppy discs</li>
<li>Vinyl LPs</li>
<li>VHS video tapes</li>
</ul>
<p>The following media formats are not acceptable as of September 2016:</p>
<ul>
<li>Blu-ray (including BD-R) (The reliability issue still remains suspicious)</li>
<li>Super Audio CD (playback only)</li>
</ul>
<p>
And the following old materials are in the archive mode and will not be accessible on demand (i.e., packed and will not be opened unless a critical demand from those who may concern (e.g., legal authorities), which may take days to access):
</p>
<ul>
<li>DXCC paper QSL cards <em>(caution: I may discard all paper QSLs at any time, details undecided)</em></li>
<li>Old Apple ][ documents</li>
<li>Old TL/1 language and GAME language compiler documents</li>
<li>Old SWL paper logs</li>
<li>Old private music demo tapes</li>
</ul>
<p><em>Note well: I will issue no paper QSLs anymore, even if I ever make more ham radio contacts. I will not make a paper QSL request. All new paper QSL requests will be immediately and unconditionally discarded. This has been effective since 1-NOV-2014. LoTW and ClubLog uploads will still be conducted for new contacts.</em></p>
<p>The following media formats have been for business acceptance only (i.e., the playback hardware exists but no new recordings) since September 2015:</p>
<ul>
<li>3.5" floppy discs</li>
<li>Cassette tapes</li>
</ul>
<p>The following media formats have been for business transactions only (i.e., the recording hardware exists, but will not be activated unless requested by the customer) since September 2015:</p>
<ul>
<li>CD-R</li>
<li>DVD-R (single layer/dual layers)</li>
<li>(micro)SD(HC/XC)</li>
<li>Generic USB memory sticks</li>
</ul>
<p>I will still be buying necessary software pieces including music CDs, software on DVDs, and paper books, but will do my best on getting rid of them as many as possible.</p>
<p><em>Bottom line: I need to remember that the room spaces are always the most precious resources.</em><p>
<p>(This article first appeared on my Facebook Notes dated 27-SEP-2015)</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-66547164358962154922014-05-25T16:58:00.003+09:002014-08-06T00:22:16.521+09:00On skin allergy
<p>I've been chronically suffering from skin allergy, at least since when I was three, for more than 46 years. The fear of itchiness haunting me and distracting me from focusing onto what I'm doing is so deep that I still really don't want to freely talk about it.</p>
<p>I will write about it anyway, however, to speak up about my own weakness, and unfair discrimination against me due to the skin allergy.</p>
<h2>My history on allergic skin</h2>
<p>During my childhood and teenage years I got a lot of severe allergic reactions on many parts of my body. The toughest one was on <a href="http://concurrently-chaotic.blogspot.jp/2013/05/computing-with-only-one-eye.html">my right eye which caused cataract</a>.</p>
<p>The second toughest allergic reaction was during May to June 2002, when <em>the percentage of the eosinophils among the white blood cells exceeded 33%</em> of the whole white blood cells, whose regular value for healthy people was between one to five percents. I was suffering from chronic oozing of blood and lymph from damaged skin on my legs and elsewhere I had to scratch due to simply unbearable itchiness. I was on the verge of sepsis, which would be lethal. I got hospitalized and had IV treatment of pulse steroid therapy for a few weeks, and had daily skin-protection treatment for two years. </p>
<p>The third toughest allergy-related attacks on my skin are chronic shingles appearing on my left inner thigh in 1979, and on my face and neck, on 1983, 1987, 1988, 1992, 1995 (twice), and 2002. Before anti-VZV medicine became available in 1990s, I had to suffer the pain of damaged skin and nerves for more than a week after every shingles attack. While I am lucky enough that no visual sign of shingles is left on my face, the deep and untreatable pain still often emerges, especially when I'm under a severe mental and physical stress. Fortunately, since 2002, I've never experienced a severe attack at all.</p>
<p>I am still suffering from skin rash, nevertheless, especially on my neck and genital area due to the chronic persistent damage. This is one of the reasons I don't want to wear ties and white business shirts; I usually wear cotton-made polo shirts or T-shirts and a loose-fit pair of pants (cargo or chino), to get rid of the possible sources of skin allergy.</p>
<h2>Skin allergy is about the immune system</h2>
<p>There are lots of misunderstandings on allergic reactions, and the medicines and treatments used to deal with the symptoms. I was one of them who didn't really treat the disease or symptoms in the right way until the year 2002, when I was 37. <em>Note well: you need to discover your own way to find out how you treat yourself. My stories are not necessarily applicable to you.</em></p>
<p>Ointments, creams, or lotions with steroids are essential and necessary to alleviate or mitigate the irritation and inflammation. The problem is that you shouldn't use those <em>with antibiotics</em> unless absolutely necessary; they are often too strong. And when you use steroids, you need to <em>monitor your immunological condition regularly</em> (once a month or even more); otherwise your skin or immune system in general may over- or under-react and will cause a fatal consequence.</p>
<p>I should also say that <em>you can't stop scratching your skin when you feel itchy</em>. Can you stop the reaction of coughing or asthma? You can't (or otherwise you will suffocate). So don't advise the patients of skin allergy to endure the torture of itchiness; instead help them solve the <em>systematic immune problem</em> by consulting to a dermatology and/or immunology specialist. The treatment strategy will not be accurately defined unless checking out the portfolio of the white blood cells and other notable markers of the patients.</p>
<h2>Discrimination against skin allergy patients</h2>
<p>The social stigma of having skin allergy, eczema or dermatitis, is enormous in Japan. Having damaged skin especially on the parts of the body exposed to the public will significantly degrade the self confidence of the patients. The damaged parts of skin are not infectious to other people, but quite often the patients themselves are prone to get infected by the common germs and viruses such as staphylococcus aureus.</p>
<p>Japanese social norm of forcing <em>all business people (especially men) to wear ties and white-collar dress shirts (which are also stiff and cause more damage to the skin)</em> is inherently very discriminative to the patients of skin allergy. Quite often the patients are targets of bullying and social exclusion. The easiest way to solve this is to allow wearing the less intrusive shirts and pants, unless absolutely necessary due to the external or more formal dress code (which I try to avoid as much as possible).</p>
<p>Patients of skin allergy or any forms of allergic reactions should not be victimized just because they are suffering from the symptoms. They are suffering from diseases which are not responsible on their own. <em>People should recognize some people need regular intake of pills and ointments to survive, and don't laugh at them because of the needs.</em> I've once been orally harassed from colleagues when I took necessary pills after a lunch meeting.</p>
<h2>What I've lost and I've gained</h2>
<p>I've lost many chances due to the skin allergy. I have to stay in the area where I can get the sufficient medical treatment in affordable manners, and I should be very cautious on exposing myself in outdoor activities. I don't swim (though I can), because I don't want to get myself damaged by the chloride in the pool water or even the sea salt. I don't enjoy natural hot springs by the same reason.</p>
<p>On the other hand, suffering from skin allergy makes me pursue more modest way of life, and makes me very self conscious on the medical condition of myself. After all, you've got to live with what you've got and what you've got to suffer from.</p>
<p>I always thank my partner Kyoko for living together with me for 22 years, before, during, and after the whole allergic skin mess in my life. And I know it's not over so I've got to be very careful as always.</p>
Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-26208173301601125812014-04-24T16:23:00.001+09:002014-04-28T10:13:26.768+09:00My new startup: Kenji Rikitake Professional Engineer's Office<p>This is an announcement of my new startup business.</p>
<p>I've started my own business, as a Japanese government-licensed Professional
Engineer of Information Technology (in Japanese it's called <em>Gijyutsushi</em>),
since April 21, 2014. It's called <em>Kenji Rikitake Professional Engineer's
Office</em> (KRPEO). </p>
<p>KRPEO provides the consulting and engineering services on information
technology in general, including but not limited to: information and network
security, the design, deployment, implementation and performance tuning of
<a href="http://www.erlang.org/">Erlang/OTP</a>, <a href="http://www.freebsd.org/">FreeBSD</a>, and
<a href="http://basho.com/riak/">Riak</a>. KRPEO will provide all services in both
Japanese and English.</p>
<p>I had been looking for a full-time job since October 2013, and I made a
conclusion that the job market near Osaka was mostly for energy-consuming
legacy programming tasks due to the fact that most of the high-end software
engineering companies were <em>only</em> located in Tokyo. Most of the employers in
Japan do not accept remote teleworking due to the cultural and legal reasons
either. So I had to lean out from the traditional corporate culture of Japan,
for a more sustainable business model, making myself, my family, and my
customers happy at the same time. I understand this is a hard challenge, but
I will definitely take it.</p>
<p>My involvement in the open-source developer and network operator communities
in Japan and the world will remain the same and unchanged. </p>
<p>The English announcement site for KRPEO is at <a href="http://www.k2r.org/krpeo/">http://www.k2r.org/krpeo/</a>. The Japanese site URL is: <a href="http://www.k2r.org/gijyutsushi/">http://www.k2r.org/gijyutsushi/</a>.</p>
<p><em>Update 28-APR-2014</em>: add the URL of the English site, correct the URL of the Japanese site.</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-64509530024100104492014-04-03T21:07:00.002+09:002014-04-03T21:07:49.204+09:00Erlang Factory SF Bay 2014: list of some notable talks<p>(Photo: a shot during my talk by Yoshihiro Tanaka, used by permission)</p>
<a href="http://3.bp.blogspot.com/-m-zFL3shI0E/Uz1OxP_k4lI/AAAAAAAAAeI/kXF3f0qIwcE/s1600/efsfbay2014-yoshihiro-tanaka-kenji.JPG" imageanchor="1" ><img border="0" src="http://3.bp.blogspot.com/-m-zFL3shI0E/Uz1OxP_k4lI/AAAAAAAAAeI/kXF3f0qIwcE/s400/efsfbay2014-yoshihiro-tanaka-kenji.JPG" /></a>
<p>(Disclaimer: there were too many talks I wanted to listen to, but I couldn't.)</p>
<p>Here's the list of talks I thought intriguing for <a href="http://www.erlang-factory.com/conference/show/conference-6/home/#speakers">Erlang Factory SF Bay 2014</a> (links are to the slides or videos):</p>
<ul>
<li><a href="http://youtu.be/tmRdy9rRV3w">Mike Williams on What Programming is Really About</a></li>
<li><a href="http://youtu.be/qURhXHbxbDU">Brian Troutwine on Monitoring Real-Time Bidding at AdRoll</a></li>
<li><a href="http://youtu.be/57PhGxzgCoM">Kostis Sagonas on Erlang VM and Term Storage scalability</a></li>
<li><a href="http://youtu.be/IuK2NvxjvWY">Fred Hebert on Planning for Overload</a></li>
<li><a href="http://www.erlang-factory.com/static/upload/media/1394469405429206nataliachechina.pdf">Natalia Chechina on Scaling Distributed Erlang at a supercomputing environment</a></li>
<li><a href="http://www.gar1t.com/presentations/2014-03-06-factory/index.html">Garrett Smith on Erlang and CZMQ, and the choice of using Erlang Port for CZMQ</a></li>
<li><a href="http://youtu.be/Djv4C9H9yz4">Dave Thomas and Jose Valim dropped an atomic bomb to the audience on how to catalyze the change to get more newcomer and other community's attention towards Erlang/Elixir ecosystem</a></li>
<li><a href="http://www.erlang-factory.com/static/upload/media/1394350183453526efsf2014whatsappscaling.pdf">Rick Reed on Scaling at WhatsApp</a></li>
</ul>
<p>I also wanted to listen to the following talks, and found the slides intriguing:</p>
<ul>
<li><a href="http://www.erlang-factory.com/static/upload/media/1394716488140115jaynelson.pdf">Jay Nelson on eliminating single process bottlenecks with ETS concurrency patterns</a></li>
<li><a href="http://www.erlang-factory.com/static/upload/media/139454517145429lukaslarsson.pdf">Lukas Larsson on Memory Management battle stories</a></li>
<li><a href="http://www.erlang-factory.com/static/upload/media/1394467485125799louisphilippegauthier.pdf">Louis-Philippe Gauthier on Performance Optimization 101</a></li>
</ul>
<p>I will post my impressions for the above talks in later articles. I would like to note some personal impressions for the audiences this year:</p>
<ul>
<li>Erlang is no longer an exotic language or system. The audiences want the real solutions and hints.</li>
<li>Elixir is gaining popularity, and will surely contribute to reduce resentment against BEAM (Erlang VM) and the ecosystem.</li>
<li>The implementation talks were getting more detailed and hard core, and the questions were also more specific.</li>
</ul>
<h1>Video quality</h1>
<p>Thanks to the hard-working video and audio recording and editing team, this year's video quality is very high in overall. <a href="https://twitter.com/jmshoffstall/status/441635444699463681">While the live streaming was not possible due to the prohibitive cost</a>, some videos were made available within six hours from the end of the talk. I think this was impressive and a practical solution to make a trade-off between the turn-around time for the availability and the quality of video of the talks.</p>
<p>[To be continued in another article]</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-49397616368573449652014-03-31T19:59:00.002+09:002014-03-31T20:05:00.194+09:00Erlang Factory SF Bay 2014: erltrek and the beginning<p>(Badge photo by Kenji Rikitake)</p>
<a href="http://3.bp.blogspot.com/-bED7Q_0XgiY/Uzk8OFvmrlI/AAAAAAAAAd4/PB3ZqA0c_WY/s1600/efsfbay-badges.jpg" imageanchor="1" ><img border="0" src="http://3.bp.blogspot.com/-bED7Q_0XgiY/Uzk8OFvmrlI/AAAAAAAAAd4/PB3ZqA0c_WY/s400/efsfbay-badges.jpg" /></a>
<p>It's already been near a month since <a href="http://www.erlang-factory.com/conference/show/conference-6/home/">Erlang Factory SF Bay 2014</a> as I'm writing this blog article. It was my fifth Erlang Factory, consecutive once a year since 2010. The topic I've talked are so diverse:</p>
<ul>
<li>2010: SSH RPC</li> (sponsored by NSIRG, NICT, Japan)
<li>2011: SFMT on Erlang</li> (sponsored by ACCMS, Kyoto University)
<li>2012: IPv6 example of DNS simultaneous resolution with IPv4</li> (sponsored by IIMC/ACCMS, Kyoto University)
<li>2013: Riak on amateur radio data analysis</li> (sponsored by Basho Technologies)
<li>2014: Star Trek game revisited</li> (this year no sponsorship - I paid all by myself - thanks Erlang Solutions for accepting my talk proposal!)
</ul>
<p>The topic list shows how broad range of subjects and topics which Erlang and OTP can cover.</p>
<h1>Highlights of this year</h1>
<p>There are so many things I have to write about for Erlang Factory in this year 2014. Listing the topics (before I forget) here:</p>
<ul>
<li>My <a href="https://github.com/jj1bdx/erltrek/">erltrek</a> implementation of the Star Trek game (immediately modified into a completely new thing, with a great help and massive contribution from <a href="https://twitter.com/andreasstenius/">Andreas Stenius</a>)</li>
<li>Erlang Foundation and Intermediate Certificates</li> (Foundation: passed, Intermediate: failed.)
<li>Concuerror (invitation-only) workshop by Kostis Sagonas</li>
<li>Elixir tutorial by one of the Erlang Gang of Four, Robert Virding</li>
<li>Fréd Hébert's presentation and autograph on LYSE</li>
<li>... and many more</li>
</ul>
<p>So let's start from the erltrek.</p>
<h1>Why Star Trek?</h1>
<p>The ultimate reason is: no one seemed to did it. Period. It was a completely improvised idea, after I was browsing the FreeBSD old games library, reading the <a href="https://github.com/jj1bdx/bsdtrek/">BSD Trek</a> code, written by Eric Allman (one of the Sendmail people), in ANSI C89. The BSD trek's last update date was in 1993, so it was a 20-year old code. I decided to rebuild the game in the following procedure:</p>
<ul>
<li>Read the C code</li>
<li>Port it to <a href="http://www.lua.org/">Lua</a> so that I can at least read through all the C functions</li>
<li>Rebuild the Lua code (<a href="https://github.com/jj1bdx/luatrek/">luatrek</a>) into more Erlang-ish one</li>
</ul>
<p>Was the strategy successful? I think it was not bad, but the part of rebuilding into Erlang was revealed utterly insufficient, soon after I opened up the code. I will describe the reason later in another article, but the main reason of failure was that my thinking and design of the code were completely <em>procedural</em>, neither fully functional, nor Erlang process-based. I have to write that I've been doing the coding and reviewing of the erltrek software even after I come back to Japan from the Erlang Factory event; that is one of the reason why this article gets so late. It's still a work in progress, as of 31-MAR-2014.</p>
<h1>Venue</h1>
<p><a href="http://www.marineclub.com/">Marines' Memorial Club and Hotel</a> again hosted the Erlang Factory. In fact they also hosted a part of <a href="http://jsfest.com/">JavaScript event series called JSFest</a> at the theatre (a very nice and large one) on Sunday 9-MAR-2014. There was no fire alarm this year (as it happened in the 2011 and 2013 events.) I didn't socialize much, as I don't as usual (I'm not really an extrovert person), but this year I had a few dinner hangouts with the Erlang all stars and I really enjoyed them. The hotel service was very good and my favorite chicken-flavored S.O.S. Oatmeal was always there at the breakfast; and the catering was very good as well.</p>
<h1>People</h1>
<p>I met a lot of people. Monika, Andra, and Alison of Erlang Solutions, and all the staff members including the volunteers, kept running the conference and all the other events very smoothly. Meeting with old Erlang friends, especially the Francophones including Fréd Hébert, Loïc Hoguin, and Benoit Chesneau, was always intriguing (especially when the three were having a very heated discussion in French.) Greeting Basho people was also nice. I will not mention all the people in this article, but it was nice to meet a newcomer from Japan, <a href="https://twitter.com/keithseahus/">Keisuke Takahashi</a>; he showed a strong interest into the Elixir language and I'm sure he'll drive a community in Tokyo soon.</p>
<p></p>
<p>[To be continued in another article]</p>
Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-6967749890355734092013-09-30T00:00:00.000+09:002013-09-30T12:13:20.910+09:00Leaving Basho - many thanks!<div style="text-align: left;">
</div>
<br />
I will resign from Basho. 30-SEP-2013 will be the last day.<br />
<br />
I'd like to thank everyone in Basho, especially Basho Japan KK members. Having been a part of the teams will be an unforgettable experience.<br />
<br />
I will continue supporting Riak and Erlang/OTP after leaving Basho, as I've been doing so since long before I joined the company.<br />
<br />
My next step is yet unclear for the time being, but I'm sure I will still be a part of computer and internet professional dev and op communities. There will be a lot of challenges, but I will take them.<br />
<br />
Thanks again to the people who supported me during my Basho days.Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-90813418752493686192013-08-20T10:22:00.002+09:002013-08-20T10:31:28.225+09:00Learn You Some Erlang for Great Good! (a review)<p>
<a href="http://nostarch.com/erlang"><em>Learn You Some Erlang for Great Good!</em></a> (LYSE) is one of the best books to learn about the programming language and the system Erlang/OTP. This article includes a brief review about LYSE of No Starch Press version, my impression about the author Fred Hébert (Fred), and related miscellaneous things.
</p>
<p>
Fred is a young person. I assume he was born in the late 1980s. That itself makes LYSE extraordinary. The writing style of LYSE is purely casual and conversational; it's quite different from other Erlang classics, such as <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Joe Armstrong's <em>Programming Erlang</em> (I'm eagerly waiting for the Second Edition!)</a> and <a href="http://shop.oreilly.com/product/9780596518189.do"><em>Erlang Programming</em> of Francesco Cesarini and Simon Thompson</a> (I'm also eagerly waiting for <a href="http://shop.oreilly.com/product/9780596518189.do">a new book from the authors with Robert Virding this time</a>!), let alone the first book of Erlang called <a href="http://www.erlang.org/erlang_book_toc.html"><em>Concurrent Programming in Erlang</em></a> published in the 1990s. Those classic books are written by much older people, and they follow the traditional textbook format. LYSE does not.
You will also be surprised by the illustrations drawn by Fred. Those drawings are so creative that I've even got distracted with them while reading the otherwise very technical and detailed contents. Maybe I've got too old. Nevertheless, you need to know LYSE is <em>not</em> an ordinary textbook.
</p>
<p>
I've seen no book on Erlang about the complete coverage of the language and the OTP library other than <a href="http://erlang.org/doc/">the online manual at erlang.org</a> and <a href="https://github.com/erlang/otp/">the source code repository at GitHub</a>. LYSE is not a manual either; it is rather a collection of live stories and practical examples of Erlang based on the hard-earned experience of Fred himself. It's written for those who actually write the code, develop the packages, and release the products. For those who want to study from the very beginning, I recommend Simon St. Laurent's <a href="http://shop.oreilly.com/product/0636920025818.do"><em>Introducing Erlang</em></a>.
</p>
<p>
I will avoid digging into explaining the whole contents of LYSE, because the explanation will take the same amount of words the book has. LYSE is a <em>thick</em> book which has approximately 600 pages, so it's not something for an easy reading. I have to confess there are many things I didn't know and I haven't tested yet in the book. The book hyper-comprehensively covers the necessary topics for dealing with the day-to-day tasks on Erlang/OTP development, from the language basics to gen_server, (the rage against the) finite state machines, package release, Mnesia and the OTP internal database modules, and a proposal of how to read all the Erlang punctuations in English.
</p>
<p>
In LYSE, the semantic details of the language and system elements of Erlang/OTP are meticulously well-written. One of the most impressive contents is about the intentional avoidance of tail-call optimization in the try-catch exception handling; Fred simply writes:
</p>
<blockquote>
<p>
The protected part of an exception can't be tail recursive.<br>
(Chapter 7, “Protecting The Right Thing")
</p>
</blockquote>
<p>
I will not explain the reason here, but this sort of caremad attitude in the details makes LYSE a professional handbook,
if not a textbook (and it is <em>not</em>, I repeat.)
</p>
<p>
Fred is a very talkative and energetic person. I really admire the level of his English fluency especially when he makes a thunderstorm-like (real) lightning talk. He is also helpful and has assisted a lot of newcomers as his <a href="http://erlang.org/mailman/listinfo/erlang-questions">erlang-questions mailing list</a> articles show. The book represents his personality very well. If you are an experienced programmer, LYSE is also an interesting book as a general reading, because the book will remind you of how you have been self-teaching yourself.
</p>
<p>
I recommend LYSE to all those who want to learn Erlang and OTP, especially to those who want to experiment and self-learn the language and system.
If you want to know the contents first, <a href="http://learnyousomeerlang.com/">check out the free online version</a>.
</p>
<h2>Appendix: about the book title</h2>
<p>
When I saw the title of LYSE first time, and when I saw the title of the cousin book of LYSE about Haskell called <em>Learn You a Haskell for Great Good!</em> (LYAH), I thought there was something severely wrong with the grammar, even from a speaker of English as a second language. I've learned at school that the verb <em>learn</em> will <em>not</em> take a person as the object, and so does my New Oxford American Dictionary built into OS X say. I had a hard time to explain the meaning of this sentence to some Japanese experts who are not familiar with this type of non-standard English sentence. And I have to confess the phrase “Great Good” looked non-standard to me too.
</p>
<p>
On the other hand, the title of LYSE looks much more understandable to me if I see it as a literal translation of a non-English Indo-European language. Fred is a proud francophone Quebecker, and he is also an excellent English speaker and writer. I can imagine Fred reads and understands the title of LYSE in a complete different manner than I do. So I will complain no more about the title of LYSE or LYAH.
</p>
<h2>Disclaimers</h2>
<p>
I've been sent a review copy of LYSE from No Starch Press on January 2013. In this article I mostly refer to the No Starch Press version, though I also have read the online free version. Note well: I have ordered and purchased my own copy of LYSE from No Starch by myself before receiving the review copy!
</p>
<p>
I should also note that I've met Fred at least three times at Erlang Factory SF Bay Area 2011, 2012, and 2013, so this review may be heavily biased. (I hope this review is not too late, Fred!)
</p>
<h2>Acknowledgment</h2>
<p>
Thanks to Jessica Miller of No Starch Press for sending me a copy of LYSE and helping me about what to do with the 600 pages of paper :)
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-13850267640648968012013-08-07T22:22:00.001+09:002013-08-07T22:22:06.937+09:00AM Radio: No Longer Practical?<p><em>Noise from modern electronic devices are killing the media</em>
<hr>
<p>This is a popular article among <a href="https://medium.com/@jj1bdx/">my pieces of writing at Medium.com</a>.</p>
<hr>
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-bZHeyxMS2J4/UMUjnpO7XyI/AAAAAAAAAGM/KrP7rnhRDsE/s1600/annoying-noise-2898020303_635ed6118d_b.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-bZHeyxMS2J4/UMUjnpO7XyI/AAAAAAAAAGM/KrP7rnhRDsE/s320/annoying-noise-2898020303_635ed6118d_b.jpg" /></a></div>
<p>(Photo by Patrick Fitzgerald/Barelyfitz)</p>
<p name="1abe">History tells the pollution has been the repeating problem which the civilization must solve. The radio airwaves are getting polluted too. I fear that AM radio broadcast will no longer be practical if modern electronic devices with the switching power supplies and computers become ubiquitous and necessary to maintain our lifestyle. Conversion or migration from AM to the FM radio will be an easiest way to solve this problem, at least for the dense population areas.</p>
<p name="f317">I’ve been struggling to listen to the AM radio inside my house for many years. I think the listening condition in my house might be still better than that of the other people. If I tolerate the buzzing tones,I will still be able to enjoy the programs. I have to keep the small radio receiver away from the cell phone units or anything running computers or other wireless devices, though.</p>
<p name="5322">I can no longer listen to the radio near my LCD displays, the laptop computers, and the tablet devices, without proper shielding of the radio and the external antenna outside the house in the open space. I can’t listen to the radio when I’m in the restroom equipped with a <a target="_blank" href="http://en.wikipedia.org/wiki/Washlet">Washlet</a>; the water spraying unit is driven with a switching power supply, which generates the noise effectively blocking the radio station signals.</p>
<hr>
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/--zL5qUGfw-U/UgJFU5hKpbI/AAAAAAAAATg/vF75qhp8FfA/s1600/JoeHaupt-radio-8319177514_b7a53509a1_b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/--zL5qUGfw-U/UgJFU5hKpbI/AAAAAAAAATg/vF75qhp8FfA/s400/JoeHaupt-radio-8319177514_b7a53509a1_b.jpg" /></a><a target="_blank" href="http://www.flickr.com/photos/51764518@N02/8319177514/" rel="nofollow">http://www.flickr.com/photos/51764518@N02/8319177514/</a></div>
<p name="1008">AM radio, or the medium wave frequency broadcasting on 540-1710kHz in the Americas (531-1611kHz in the rest of the world including Japan), has been popular for more than a hundred years. The transmitter often requires nearly a few hundred kilowatts to cover the entire nation, but it works very well, especially during the nighttime when the ionospheric propagation enables the airwaves to reach much further than that in the daytime. For example, in Japan, NHK Radio Two Tokyo at 693kHz transmits 500kW from the antenna site in Kawaguchi City, Saitama, covers nearly twenty million households even during the daylight hours, and is heard very well regularly in Osaka and the other regions nationwide.</p><p name="15c2">The <em>AM</em> in the AM radio stands for <em>Amplitude Modulation</em>. AM radio listeners only needs a simple equipment to convert the radio signals into the sounds. <a target="_blank" href="http://en.wikipedia.org/wiki/Crystal_radio_receiver">Crystal radio receivers</a>, which have been widely used since the beginning of the 20th Century, are the simplest form of radio. They still work well when the transmission site is near enough. Most of the modern radio receivers convert the frequency of the received signals to the audio frequency range signals, however; <a target="_blank" href="https://en.wikipedia.org/wiki/Superheterodyne_receiver">superheterodyne receivers</a> is the de facto standard since the transistors got commoditized in 1960s. You can even listen to the AM radio through the digital signal processing technology, on the <a href="http:">software-defined radio</a> receivers. So the technology is still alive and thriving very well.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-y2skaNon1Oc/UgJHauCMHWI/AAAAAAAAATs/FBfpyZM161c/s1600/trekkyandy-pcps-1971500675_48ba5f6dd5_b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-y2skaNon1Oc/UgJHauCMHWI/AAAAAAAAATs/FBfpyZM161c/s400/trekkyandy-pcps-1971500675_48ba5f6dd5_b.jpg" /></a><a target="_blank" href="http://www.flickr.com/photos/trekkyandy/1971500675/" rel="nofollow">http://www.flickr.com/photos/trekkyandy/1971500675/</a></div>
<p name="7416"><em>The problem is, however, that more and more electronic devices emit various type of noises on the same frequency spectrum which is used for the AM radio, from the power suppies.</em> It’s not just Washlet; it’s everywhere from the laptop computers to the LED ceiling lamps.</p><p name="e953">Modern power supplies use the technology called <em>switching voltage regulation</em>;<em> </em>the power supply acts as a high-frequency automatic switch to control the energy flowing into itself,and sends the energy to the devices. The output voltage is controlled by the ratio of the periods of turning the switch on and off. The switch is rapidly controlled to maintain the stable output voltage in the frequency of many hundred thousands times per second. This rapid-switching technology is essential to maintain high power conversion efficiency and low power loss, which cannot be achieved by the legacy power regulation technology called <em>series voltage regulation</em>, which does not use the rapid and abrupt switching, but generates considerably more heat and is much less efficient energy-wise for continuous voltage regulation.</p><p name="3ee4">Unfortunately, power switching causes generation of strong electromagnetic noise of the very wide spectrum, and the switching frequency itself is close to the one for the AM radio. The first switching power supply I saw was that built into Apple II computer in 1979. It was large, but still much smaller than the equivalent legacy series-regulated one. I immediately noticed that the sound coming out from the radio near the Apple II suggested how the CPU was working; computers then were not shielded well. I could also hear the power switching sound, emitted from the small voltage transformer inside.</p><p name="feb7">The switching voltage regulation technology is so pervasive that now I see virtually all digital device around me are attached to the <em>switching power supplies;</em> the USB wall warts, laptop PC AC adapters, and the units built into various appliances from computers and even to the commercial and amateur <em>radio transceivers</em>, for more efficiency with less energy consumption. Reverting back to the age of series voltage regulation is simply impractical; no one will want to carry around a power supply which weighs many kilograms for a small laptop or a smartphone.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-o2CVkMdCGvQ/UgJIZlWufUI/AAAAAAAAAT8/-C9420bItT0/s1600/andrewfogg-fmhelo-369002475_44f0eb73b0_b.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://4.bp.blogspot.com/-o2CVkMdCGvQ/UgJIZlWufUI/AAAAAAAAAT8/-C9420bItT0/s200/andrewfogg-fmhelo-369002475_44f0eb73b0_b.jpg" /></a></div>
<hr>
<p>(Photo: <a target="_blank" href="http://www.flickr.com/photos/ndrwfgg/369002475/" rel="nofollow">http://www.flickr.com/photos/ndrwfgg/369002475/</a>)</p>
<p name="c3d2">Modern radio modulation schemes are robust against various sources of noise. AM radio uses the voltage level, or the amplitude, of the airwaves to carry the information, and there’s no effective way to prevent the noise coming into the received signal. On the other hand, FM radio, whose <em>FM</em> stands for the <em>Frequency Modulation</em>, uses the pitch or frequency of the airwaves to carry the information, and the level of the signal is irrelevant unless it is very weak. So FM radio is more robust against the airwave noise than the AM radio and far less affected by the digital devices such as computers.</p><p name="6d22">Then why don’t we convert or migrate from AM radio to FM radio? FM radio consumes much wider frequency spectrum to broadcast, and much higher frequency to broadcast about a hundred times of the AM radio (88~108MHz in most parts of the world; in Japan it’s 76~90MHz). Airwaves of that frequency range cannot use the ionospheric propagation, so FM radio stations do not reach as farther as AM radio stations do, and require considerably higher cost for the simultaneous nationwide coverage.</p>
<p name="8245">Let us get back to the original question: can we stick to the AM radio for direct broadcasting to indoor radio receivers, even under the condition that the number of devices emitting noise will be continuously increasing? My answer is no. AM radio will still be useful for serving outdoor and rural area listeners, and in case of disasters and emergencies, because the receiver cost is relatively low. For the urban areas, however, people will no longer be able to listen to the AM radio in adequate quality without erecting the external antennas; conversion or migration to the FM radio will be a practical and feasible plan.</p><p name="6b44">Note that the AM-to-FM conversion is nothing new, especially for people in North America; many stations there have AM and FM simulcasting stations. And in Japan, especially on a coverage of important events, simulcasting between AM, FM and TV stations is frequently conducted. I am talking about the conversion, however, simply from the listening quality perspective, under the noise-bombarded radio spectrum environment in modern houses and buildings.</p><p name="42de">I’d like to propose providing simulcast in at least one FM radio channel for each AM radio stations in the urban areas. I think this is one of the most practical way to raise the listening quality of radio programs.</p>
<hr name="555d">
<h2>Notes</h2>
<p name="f2b1">Note 1: some may claim internet radio stations will completely substitute the radio services over airwaves. I do not buy that idea because internet radio stations usually suffer a lot of delay of tens of seconds, which renders them useless for emergency or disaster warnings, unless another dedicated side channel is provided.</p><p name="a45a">Note 2: some other people will also claim FM radio is very hard to listen to without an external antenna, which is unfortunately true. I think listening to the FM radio of quality sound is still much easier than to the AM radio based on my experience; FM radio antenna is smaller and less prone to electromagnetic noise inside the house, and is easier to erect.</p>
<hr>
<p>Exported from <a href="https://medium.com">Medium</a> on August 7, 2013.</p><p><a href="https://medium.com/p/b82b608807d4">View the original</a></p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-71980754538762901672013-07-25T17:01:00.000+09:002013-07-25T20:38:48.390+09:00Professors in the wasteland<a href="http://4.bp.blogspot.com/-wEEksCTzNEc/UfDY6uNFvzI/AAAAAAAAASg/mhXnGAN9hpw/s1600/wasteland-denis-defreyne-2496959629_a5969e60de_b.jpg" imageanchor="1" ><img border="0" src="http://4.bp.blogspot.com/-wEEksCTzNEc/UfDY6uNFvzI/AAAAAAAAASg/mhXnGAN9hpw/s320/wasteland-denis-defreyne-2496959629_a5969e60de_b.jpg" /></a>
<p>(Photo: <a href="http://www.flickr.com/photos/denisdefreyne/2496959629/">Wasteland by Denis Defreyne</a>)
<p><em>Becoming a professor no longer guarantees academic freedom</em>
<hr>
<p name="78da">I had been a non-tenure professor of Kyoto University from April 2010 to January 2013. The life was unfortunately not so happy one, and <a target="_blank" href="http://concurrently-chaotic.blogspot.com/2013/01/lost-in-transportation.html">I’ve already written a part of my story as a blog article.</a> In this essay I’ll write about another part of the story.</p><hr name="46b5"><p name="2775">My father Tsuneji Rikitake was a prestigious professor. He devoted his life for the geophysics and seismic research. He also went abroad to study Earthquakes, in Turkey, Canada, and at <a target="_blank" href="http://cires.colorado.edu/">University of Colorado Boulder</a>. He officially retired in 1991 when he became 70 years old. I owe him a lot on getting myself familiarized with mathematics, physics, and computers, from an early stage of my life. I often thought I would like to become a “professor” if I could in my childhood.</p><p name="857d">My expectation on the academic lifestyle, however, was shattered during my life at University of Tokyo from 1984 to 1990. I was quite disappointed with the huge bureaucracy prevailing in the organization; one of the example of the inefficiency was the university had <em>two</em> trans-Pacific TCP/IP links already in 1988, though the one was only for some dedicated science research projects which ordinary students including me at that time was not permitted to use at all. And you had to show up to the lab even if you could telecommute with the terminals and modems. I was so disillusioned and decided to leave the university after barely getting a degree of Master of Engineering.</p><p name="555d">I’ve seen a lot of unhappy people in the academics too. Many of them suffered (and still suffer) a long period of years even after getting the PhD as <em>Joshu</em> (or now <em>Jokyo</em>), the words which<em> </em>stand for the educational staff who have no budget privilege by themselves and have to obey the commandments of <em>Koushi (or the lecturers), Jokyoju</em> (or now <em>Junkyoju</em>), and <em>Kyoju</em>. It’s more like the military; Koushi and Junkyoju professors are with some budget privileges, but still under the control of their bosses aka the <em>Kyoju</em> (full professor).</p><p name="0aad">Even in 1989 I thought those Joshu/Jokyo people were not really well respected because many of them often had to work overtime to help the private part of lives of the Koushi, Junkyoju or Kyoju, of higher-ranked members. I know at least a couple of people who got sick and tired of this near-slavery treatment against Josyu and got permanently left from the academic society and got successful life in the business world. So I didn’t want to take a job as a postdoc with Josyu (now Jokyo) position. I thought I would rather want to be a software engineer working for a corporation, under a proper governance abiding the labor laws and the corporate policies and procedures.</p><hr name="908c"><p name="5be1">When I decided to take a job offer as a non-tenured time-limited (max 4.5 years) professor or Kyoju of Kyoto University, my primary assignment was far different from the one which my father would have taken; I was expected to work at least 70% of the “working effort rate” (I still don’t understand what this actually means) as an administrative work of the university. I was not allowed to take my own student or perform educational activities except for doing my own research. And the job offer statement even included that the candidate accepted the job would be reassigned as a full-time administrative staff. This was a terrible condition comparing to the other Kyoju people who were only doing the research activities. I didn’t have much choice though, because my employment contract was due March 31, 2010, and there was no other offer available at that time.</p><p name="cf11"><em>I was lured by the illusion of becoming a full professor, even without tenure. I could be something like my dad. At least people would call me so.</em></p><p name="497a"><em>I made a terrible mistake.</em></p><hr name="8204"><p name="221e">Eventually I realized the hard cold fact of working as a pseudo-research professor. My position was in continuous professional and bureaucratic limbo; I was neither a full administrative staff nor an educational staff. I was physically alone even during the lunch hours; I intentionally or unintentionally had the lunches alone. Very few people talked to me for something other than work-related issues. I had some financial freedom of my own research budget (within the 30% working effort rate hours), and people were polite, but I realized I was working in somewhere which I least wanted to be.</p><p name="d488"><em>What I saw in the year 2010 was a wasteland with the corpses of poor soldiers virtually (or some even actually) deceased due to the worst workplace condition or systematic bullying towards newcomers. And that was the scene exactly I had seen during my early years of life in 1989.</em></p><hr name="b3f9"><p name="7c14">I see quite a few articles on Medium and elsewhere about <a target="_blank" href="http://blogs.swarthmore.edu/burke/permanent-features-advice-on-academia/features/">staying out of the graduate school by all means</a> and <a href="https://medium.com/altac-chronicles/3ec7b0fe1671">not taking the academic postdoc jobs even if you could endure all the burdens of becoming a PhD</a>. Reading the <a target="_blank" href="http://phdcomics.com/">phdcomics.com</a> itself will let you understand how the life of the graduate school is surreal and unbearable without a lot of humor (though <a target="_blank" href="http://www.phdcomics.com/comics/archive.php?comicid=1558">I’ve never been a professor like this person.</a>) And I have to warn you that things are always getting worse and worse every year. The workplace condition in the universities (at least in Japan but maybe also in many other places of the world) are no longer bareable if you want to be treated as a real person.</p><p name="1a44">At the University of Tokyo, my father became a Josyu in 1942, Jokyoju in 1949, and Kyoju or a full professor in 1962. Maybe the 50 years of time changed the whole academic landscape, from a fertile source of the joy of research and education, to the wasteland of cheap labor provided by second-class newcomers for feeding the old landlords.</p>
<hr>
<p>Exported from <a href="https://medium.com">Medium</a> on July 17, 2013 / updated on July 25, 2013.</p>
<p><a href="https://medium.com/p/e62f10faa5b4">View the original</a></p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-89024366689676506292013-07-01T12:17:00.001+09:002013-07-01T12:17:44.125+09:00My Interview on Erlang by Paolo d'Incau and my Medium posts<p>
A brief introduction on my interview about Erlang/OTP and other tech topics, by Paolo d'Incau. (Thanks Paolo!)<br>
<a href="http://pdincau.wordpress.com/2013/06/27/an-interview-with-kenji-rikitake-jj1bdx/">http://pdincau.wordpress.com/2013/06/27/an-interview-with-kenji-rikitake-jj1bdx/</a>
</p>
<p>
I've also posted some non-engineering essays to
<a href="https://medium.com/@jj1bdx">my Medium page</a>:
<ul>
<li><a href="https://medium.com/who-i-am/a406a5f8e743">Things I'm not interested in</a></li>
<li><a href="https://medium.com/i-m-h-o/ac98e94bf84b">Electric appliance woes</a></li>
</ul>
</p>
<p>
Enjoy reading.
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-53821257999264513422013-05-30T19:02:00.001+09:002013-06-01T12:11:17.657+09:00The Setup<a href="http://3.bp.blogspot.com/-0foqLHFaMjg/UachPZ30-rI/AAAAAAAAAPw/Gj_AQ7zS_d4/s1600/kenji-setup-20130530.jpg" imageanchor="1" ><img border="0" src="http://3.bp.blogspot.com/-0foqLHFaMjg/UachPZ30-rI/AAAAAAAAAPw/Gj_AQ7zS_d4/s320/kenji-setup-20130530.jpg" /></a>
<p>(Photo: Kenji Rikitake, taken by himself, at his home workstation, 30-MAY-2013, while watching Joe Armstrong's article of The Setup)
<p>Disclaimer: this post has been inspired by the following website: <a href="http://usesthis.com/">The Setup</a>.
<h1>Who are you, and what do you do?</h1>
<p>I'm <a href="http://www.k2r.org/kenji/">Kenji Rikitake</a>, network and software engineer. I'm a developer at Basho Japan KK, a group company of <a href="http://basho.com/">Basho Technologies</a>, since February 2013. People expect me to write Erlang code and I like doing it, but I also write programs in C, Python, and other languages, documents, corporate blog articles, and doing almost everything I can to help my coworkers, and of course for helping our customers and friends.
<p>I've been working on computer networking, internet, and the distributed systems since 1988, from VAX/VMS SMGRTL screen management library development, to the campus network security management as a full professor at Kyoto University. I decided to get back to where the action is on November 2012, when I experienced a mental breakdown, after spending 12 years at the research and academic ivory towers. I became a professor dropout spending unrewarded time of 2-year-and-10-month non-tenured full professor from April 2010 to January 2013.
<p>I am also an amateur radio enthusiast and electronic device builder since 1976. My Twitter handle <a href="https://twitter.com/jj1bdx/">@jj1bdx</a> is the Japanese primary callsign. I also have the US FCC amateur radio license with the callsign N6BDX. Morse code telegraphy and shortwave long-distance contacts (DXing) are my favorites, and I'm also interested in digital radio communications technologies, as I did in the late 1980s with UHF TCP/IP links.
<h1>What hardware do you use?</h1>
<p>Since February 2013, Apple MacBook Air 11" on the move and Mac Mini at home, both with SSD, are my workstations. Before then I hadn't owned any Apple Macintosh computer since 1980 for myself. My first computer was Apple ][ in 1979 which I abandoned in 1982; I now realize many things have changed. I have even bought an Apple TV for my living room display and it's quite entertaining.
<p>I've been solely using PFU's Happy Hacking Keyboard (HHKB) and the family products since 1997. Prof. Eiiti Wada, who was my advisor when I barely got out of University of Tokyo Graduate School of Computer Engineering, designed the keyboard. Currently I use both HHKB Pro and HHKB Pro 2. I'm a conservative guy and still stick to my Logitech/Logicool Anywhere MX wireless mice, both on the move and at home, while I'm quite satisfied with MacBook Air's trackpad with a click.
<p>Recent addition to my desk is <a href="http://www.ergotron.com/ProductsDetails/tabid/65/PRDID/379/language/en-US/Default.aspx">Ergotron's Workfit-S Sit-Stand Workstation</a>, combined with <a href="http://www.eizo.com/global/products/flexscan/ev2436w/">EIZO EV2436W 1920x1200 pixel monitor</a>. Being able to work both on standing and sitting positions, with adjustable keyboard and display heights, makes my legs and shoulders much confortable and reduces a lot of stress. While this desk attachment is not the perfect solution, this is definitely worth trying. I also add a small Home Erecta metal rack to change a sitting desk to a standing writing desk; this is also good when you want to write on a paper at the standing position.
<p>I still have Windows 7 and Ubuntu 13.04 dual-OS notebook client PC, which was the main workstation before I joined Basho. For the software experiments and development of both work and play, I rely on FreeBSD PCs since 1990s; now I run two 9-STABLE machines. I've got rid of tower PCs, and the recent <a href="http://www.intel.com/content/www/us/en/desktops/dc3217iye-product-brief.html">Intel DC3217IYE micro desktop</a> is working smoothly with the FreeBSD OS.
<p>I'm not an audiophile fanatic, but I like good sounds and music. <a href="http://styleaudio.typepad.com/styleaudio_hifi_usb_mini_/2008/07/new-carat-peridot-introduction.html">Styleaudio's CARAT-PERIDOT</a> is one of my favorite USB headphone amplifiers. <a href="http://www.akg.com/K240+Studio-1039.html?pid=1195">AKG K240 Studio</a> is so far the finest headphones I mostly use at home, with a custom cable from Oyaide in Akihabara. I also use <a href="http://sennheiserhd580.com/">Sennheiser HD580</a> and <a href="http://www.etymotic.com/ephp/er4.html">Etymotic Research ER-4P</a>. My spouse Kyoko wants to play her Super-Audio CD (SACD) disks, so I also set up a <a href="http://www.pioneerelectronics.com/PUSA/Home/AV-Receivers/PD-D6-J">Pioneer D6 SACD player</a> at our living room. <a href="http://www.mackie.com/products/1202vlz3/">Mackie 1202-VLZ3</a> is also one of my favorite audio mixers.
<p>While on the move, a <a href="http://www.apple.com/support/ipodnano/6th_generation/">6th gen iPod Nano</a>, and <a href="http://www.audio-technica.com.sg/con_product.php?prodid=97">Audio-Technica ATH-CKS90NC</a> noise-cancelling earphones (available only from Japan) are the must, both in the airplanes and train cars. Recently I start storing music <em>without</em> compression, that is, with plain WAV files. The sound has got far better than those encoded in 320kbps MP3. I was carrying around a CD Walkman in 1987, and technology has made a lot of progress.
<p>On amateur radio, <a href="http://www.icomamerica.com/en/products/amateur/hf/7200/default.aspx">ICOM IC-7200</a> has been my favorite shortwave transceiver, rock-solid to stably pump out 100W to the antenna. I also use <a href="http://www.idiompress.com/k5.php">Idiom Press K-5 keyer</a> for sending Morse Code with the paddles. I sometime hand-send the code with a <a href="http://www.czechmorsekeys.co.uk/">Czech Morse Straight Key</a> made in 1950s. I only use a temporary antenna system at the balcony of my house, with a 6.5m-length vertical telescopic fiber pole with the antenna wire attached, and ICOM AH-4 antenna tuner. I can still work the six continents and many remote places in the world. The ionosphere is always amazing.
<p>And I also have a Sony Ericsson Android smartphone (but not used as a voice telephone in Japan due to the subscription clumsiness and legal hyper-restriction towards SIM-card-only sales), and a Sony Ericsson feature phone for the carrier au (by KDDI). They have replaced most of the needs for a dedicated camera, but I still have a compact digital camera called <a href="http://www.nikonusa.com/en/Nikon-Products/Product/Compact-Digital-Cameras/26320/COOLPIX-P310.html">Nikon COOLPIX P310</a>.
<p>I like pens, pencils, and papers, too. Moleskine is good, though not so good for writing with fountain pens. LAMY ballpoint pens and fountain pens are very good. Pentel's PRESS MAN 0.9mm mechanical/sharp pencils are robust and my favorite since 1980s, with JIS 2B-grade lead refills.
<h1>And what software?</h1>
<p>I've been a BSD UNIX fan since 1986. Some of the real BSD-based UNIXes I've used are VAX 4.2/4.3BSD, DEC ULTRIX, SunOS 4, BSD/OS, and FreeBSD. BSD always rocks and rules, especially since AT&T finally loosened up the license for the general public (and accepted what they stole from the Berkeley CSRG team) in 1990s. I really admire FreeBSD core developers and the port maintainers. While I do not register myself as a committer, I still occasionally help maintaining Erlang/OTP port for FreeBSD.
<p>Linux is not bad, and Ubuntu is a nice distro, but I think the kernel is cluttered with too many drivers, though this is inevitable when thinking about how many devices it has to support. And the lack of usable man pages is the primary reason why I don't want to use Linux for programming unless absolutely needed.
<p>I had long been a <em>serious</em> hater of Macintosh computers before Apple decided to introduce Mach/UNIX kernel onto it. I believe Mac OS 9 and older kernels were practically useless for any real-world production systems. And I also had long been a hater of Windows, before the multi-tasking stability was realized in Windows 2000. Having said those rants, I have very little problems on using Windows XP and Windows 7, and Mac OS X Mountain Lion (10.8.3), so long as I don't write native programs on those machines. I intentionally stayed away from Windows Vista and I'm very happy I didn't have to touch it at all. And I will not touch Windows 8 either, because Mac and the OS X look much better as a desktop.
<p>I still have some nostalgia towards OpenVMS, which has a very consistent and rigid command line interface and internal system service architecture. I would get one if Hewlett-Packard would make it an Open Source operating system, which I also believe what would never happen.
<p>About editors, I use both vim and Emacs. I don't want to commit to the meaningless wars of editor preferences. Currently I don't use other dedicated programming editors, though for writing this article, I solely use a web application called Writebox, which is nicely designed to avoid distraction as possible. Windows' Notepad is not bad either,
provided choosing the appropriate font and screen size.
<p>For Japanese input system, I solely use SKK, since 1990s. OS X has AquaSKK, and Windows has SKKIME. Emacs has DDSKK, and vim has skk.vim. Until recently I was using EUC/Japanese for the internal encoding system; I decided to convert to UTF-8 finally after I decided to leave Kyoto University on November 2012.
<p>On web browsers and services: Chrome is almost always used at any time on OS X, Windows, and Ubuntu. Or even Chromium on FreeBSD if needed. Diigo has been my primary bookmarking service. GitHub is extensively used for both work and play. Also Google Drive, Calendar, and Mail, though I still maintain a primitive mail processing environment at home. Recently I'm using Feedly as an RSS reader. Music services: Soma FM and SoundCloud. (YouTube and the Amazon sites are intentionally excluded from this list :))
<p>Microsoft Office Suite (Word, Excel, and Powerpoint) are necessary evil. I install them on my Windows 7 machine and the Macs. I believe you cannot substitute by non-MS products, if you have to deal with the Japanese governmental agencies and large corporations, who are solely dependent on the MS products (and know virtually nothing about anything else.)
<p>I still feel LaTeX does much better than MS Word.
<p>Apple stuff: iTunes is not bad, especially for OS X. Keynote looks very good and easy to use.
<p>Adobe stuff: Acrobat is installed on my Windows 7 machine, to proofread/check the PDF document structure and embedded fonts. I once used to play around with the Photoshop Elements, but now I feel OS X's Preview software is enough for playing around with the photo files.
<p>Social services: Twitter: <a href="https://twitter.com/jj1bdx/">@jj1bdx</a> - no need to explain, isn't it? Tweetdeck is also nice. I quit Facebook and LinkedIn because those two services were too socially demanding (and attracting too many spammers.) HipChat and Yammer are two nice things at work, and I feel those services should be outsourced as much as possible, because the providers are almost always doing better than us. And about blogging: Blogger and Tumblr.
<p>Finally on programming languages and environment: Erlang/OTP for the obvious reason - Riak runs on it. kerl is a good stuff to switch between different Erlang/OTP execution environments. Python (with virtualenvwrapper), Perl, and awk are my favorites too. And of course, C, for fixing the FreeBSD kernel code. Programming tools: rebar, git, make, and other trivial ones (e.g., GNU Autotools). Shells: /bin/sh (NO <em>bash</em> assumption please though I use it too) and zsh.
<h1>What would be your dream setup?</h1>
<p>Systems that don't need regular human intervention for maintenance. Period.
<p>Frankly speaking, I don't want to provide unpaid support or even paid support regardless of the price, especially to my spouse Kyoko, and other relatives, for broken computer and electronic systems. It takes too much time, very interruptive and distracting, and it is indeed a very stressful work. Of course this doesn't mean I want to leave them alone in panic - I want to help them, but doing so simply makes me weary. I believe the supplier and vendor of those products should also take the responsibility to build the systems self-recover, self-restart and self-fix, at least for the software.
<p>While I'm OK with fixing systems and I think I like doing so by referring to my professional records of being a system administrator for more than 20 years, most of the so-called appliances are quite badly designed and have to have a lot of insider skills and expertise just to use them, let alone to fix them.
<p>I believe in the hacker movement and I think hackers should be well respected in the society and that the status quo is quite against the well-behaved hackers by assuming all hackers are malicious which is absolutely incorrect, but this does not mean everybody has to be assumed to have necessary skills to repair a broken machine or system. Risk dumping of technologies or incomplete systems towards users by the manufacturers is not an ethically right thing to do.
<p>I hope Erlang/OTP and the philosophy/perspectives on the general programming will make the world a better place, for building a robust system, not only for the servers but all software-based products.
<p>On amateur radio: I want to have an unlimited time and access to a legal-limit transmission system and a broadcasting-station-grade shortwave antenna, at a place with the least man-made noise. I want to listen to my voice bounced back from the moon too.
<p>About my disability: I've lost my right eye's lens for more than 30 years. I wish I can connect the mostly-working retina of my right eye to the computers so that I don't have to tolerate the optical blurriness. The Google Glass in May 2013 is not enough yet. And I hope things will get better soon.
<p><b>Update:</b> Fixing typo and adding product URLs (last update 1-JUN-2013) Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-17363053610041288992013-05-18T16:32:00.002+09:002013-05-18T16:53:31.027+09:00Marunage - a dark side of omakase<p>If <a href="http://david.heinemeierhansson.com/2012/rails-is-omakase.html">Rails is omakase</a>, Japanese construction and IT projects are <em>marunage</em>.
<p>When I first heard about <a href="http://www.youtube.com/watch?v=E99FnoYqoII">the popular readout</a> and <a href="http://david.heinemeierhansson.com/2012/rails-is-omakase.html">the written article</a> of Rails is Omakase, I immediately thought about another common Japanese word called <em>marunage</em> 丸投げ (pronounced <em>mah-rue-nah-gay</em>), which literally means passing everything onto someone else and completely getting rid of the things which you passed onto.
<p>The actual usage of the word marunage is more vicious and exploiting; large corporations and government organizations often do the marunage to their contractors. When you do the marunage of a project, it means you are getting rid of all the responsibilities and liabilities from the project and letting someone else take care of the mess and the aftermath. In this sense, marunage is a form of risk dumping, or simply a bad form of delegation. The analogy of marunage is also quite common for the national projects. For example, the ministries do the marunage to the research subsidiaries.
<p>I believe the word marunage originally comes from the construction industry, which is very popular in Japan for multi-level delegation from a large general contractor aka <em>zenekon</em> ゼネコン (pronounced <em>zeh-neh-con</em>) to the smaller and powerless contractors aka <em>shitauke</em> 下請け (pronounced <em>shi-tah-ooh-keh</em>). The business model here is that the shitauke companies do the most if not all the actual tasks, and the zenecon does little things other than taking brokerage fees. Multi-level sub-contracts are also popular; for example, <a href="http://www.cnic.jp/english/newsletter/nit149/nit149articles/05_Clean-up.html">in Fukushima Dai-ichi Nuclear Power Plant cleanup project after the meltdown incident on March 2011, ten levels of sub-contracts were revealed</a>.
<p>The mindset of zenekons enslaving the shitauke companies is also common in IT industry in Japan. The IT zenekons, also known as <em>shisutemu integureitaa</em> ("systems integrator" aka "SIer"), have been historically accused of making questionable practices on winning large-scale project contract bids, such as winning a contract by proposing unrealistically budget. For example, <a href="http://www.apnewsarchive.com/1989/Fujitsu-Tries-To-Withdraw-Another-One-Yen-Bid/id-3eefe17cb284a464eb2e2c1cabe9ef40">in 1989, there was a case of major SIer repetitively tried to win bids by proposing one (1) yen (JPY) as the budget for a whole project of municipal governmental systems</a>. Also, those large SIers or IT zenekons maintain strong relationships with the large-scale customers, and gain profits by doing the marunage of the projects to the shitauke companies. I won't dig deeper in this dark side of Japanese IT history here, but you may find many similar cases.
<p>Getting back to the definition of marunage, I believe that the mindset of marunage represents the feverish risk-aversion towards everything among Japanese people. Still many if not most workers in Japan think a single failure means the professional death which cannot be recovered later, and the legal and economic systems are very harsh against people who have the failure records, for example, a bankruptcy. This kind of culture forces the decision makers to do the marunage to avoid risks. And I see the culture of marunage shows how Japan is more and more closely like the former Soviet Union, one of the most bureaucratic and stagnated nations, disbanded by the economic failure.
<p>So when you hear about marunage, you've got to be very careful; don't become the victim, and try your best to avoid becoming an oppressor by doing the marunage to the powerless subordinates, colleagues, coworkers, or even your family members or bosses. Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-33824997075030741842013-05-04T15:21:00.001+09:002013-05-04T15:29:03.895+09:00Computing with only one eye<p>My right eye has not been really functioning since 1982, when I was 17.
<p>I wore cataract first in May 1982 while I frequently hit my right eye due to the strong itchiness caused by chronic skin allergy. Eventually I lost my sight from the right eye, and after a few eye check the retina detachment was discovered. I was immediately thrown into a hospital room, locked onto the bed with keeping my face up against the gravity (so that the gravitational force helped preventing further detachment) for three weeks, in June 1982. It was an awful experience for a young teenage boy.
<p>I had to have another surgery on September 1982 because of the unfixed detachment again. Later I had another surgery to fix the squint in 1983, caused by the previous surgeries. And finally in March 1986, the swollen and white-colored lens cell (yes, the lens is a single cell) which had lost the transparency in my right eye finally got taken away.
<p>Fortunately, the retina (not the Apple's high-resolution display) in my right eye is mostly functioning OK, though I really can't read anything with it, and I can no longer accurately identify the 3D depth any more. I usually ignore the sight coming from my right eye other than the level of the light.
<p>I've been with the usability problem caused by the broken right eye for many years, long before I started professional programming. Fortunately I've learned how things get large and small when their distance changes, so I can sway to avoid getting hit from most of the things. I still can enjoy 3D movies, though I won't accurately focus anymore.
<p>Things coming towards me from the right side, however, are hard to recognize. I've stopped operating any vehicles including bicycles; I don't have a driver's license either. You don't want to get into a trouble which you can easily expect, especially where the driver's seat is on the left side of the car, like in the USA or Canada. Japan is not, but that doesn't alleviate the problem.
<p>During the age of 80x25 character terminals when DEC VT100 or VT220 terminals were popular in 1980s, my right eye disability didn't cause much trouble, because the whole screen fit very well in the visual space I could recognize. Even in the age of where 14" or 17" CRT or LCD displays, where the default aspect radio was 4:3 or 5:4, I didn't have much problem. I've written a lot of document and many pieces of code; fortunately none of them mandated me to tackle the three-dimensional loss of perception.
<p>I have a few problems regarding my sight disability since the beginning of the 21st century, unfortunately. One of them is the color design; most web sites choose white as the background color, which interferes the black foreground characters I read. I try to choose darker background colors and brighter foreground colors as possible, but not all web applications allow to do so.
<p>Another one of the 21st century problems is the change of default aspect ratio of the screen to 16:9; this is too wide for my rather narrow sight space. If you are watching a movie this wouldn't be a problem. I welcome high-resolution displays with crispier pixels and accurate positions. But when you write a text, this will be a serious problem, because you can't see everything at once. I always choose narrower horizontal size to keep the screen in my left eye's sight range.
<p>So far I can manage the environmental change of computing in the past 31 years. I expect, however, the future computing models, including those require wearing glasses or assume three-dimensional recognition ability, may eventually reject me from the cutting edge of computing. Maybe I can ask Google to make a special Google Glass to compensate the loss of my right eye's lens and focus directly into my right eye's retina, with proper size adjustment so that I can see the things in two eyes again.
<p>And I can assure everyone that you can write the code with sight disabilities; I know a professional programmer who has completely lost the sight too.
<p>(Thanks <a href="https://www.tylerhannan.com/">Tyler Hannan</a>, who suggested me to write this. I had been hesitating to write about my weakness on the web, but I thought this would be helpful to others.)Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-36875575106204904672013-02-07T11:00:00.000+09:002013-02-07T11:03:26.467+09:00I've joined Basho Japan from February 2013<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-FO9xPM1aUBs/URIJRP60LLI/AAAAAAAAALk/a2_7PhV2bQY/s1600/basho-logo.png" imageanchor="1" style="clear:right; float:right; margin-left:1em; margin-bottom:1em"><img border="0" height="84" width="84" src="http://1.bp.blogspot.com/-FO9xPM1aUBs/URIJRP60LLI/AAAAAAAAALk/a2_7PhV2bQY/s200/basho-logo.png" /></a></div>
<p>
I've started my new career as a Senior Software Engineer at
<a href="http://www.basho.co.jp/">Basho Japan KK</a>, a 100% subsidiary of
<a href="http://www.basho.com/">Basho Technologies, Inc.</a>, effective 1-FEB-2013.
I'm very happy that my colleagues are all very much supportive for my startup
as a new developer. I will try my best to catch up the lean software development
process and to get the most out of both the elementary and advanced technologies for contributing to
the company.
</p>
<p>
Basho is a wolf pack of the bleeding-edge Erlang/OTP and distributed system engineers, who have made
<a href="http://basho.com/products/riak-overview/">Riak</a> as an open source
standard of highly-distributed and fault-tolerant databases. Catching up with
the skilled engineers is a really tough job, but it's also very exciting to
take the new challenges for making the actual software products to the customers. This is completely different from
what I've experienced in the past 12 years as an academic/government researcher.
</p>
<p>
Basho's customers have a lot of demands for Riak already, and the company including
myself has to meet the expectation while shipping the products on time and maintaining
the high product standard. I will contribute my 22-year skills of network engineer,
sysadmin, and an OS developer to the software development process, in the most effective way.
</p>
<p>
My participation to Erlang/OTP activities and ACM Erlang Workshop will remain the same.
</p>
<p>
So stay tuned for my pull requests and pieces of code!
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-3261943852428616182013-01-31T00:00:00.000+09:002013-07-07T18:04:46.589+09:00Lost in transportation<p>
I will resign from my full professor position at Kyoto University. The employment contract will terminate by 31-JAN-2013.
</p>
<p>
I've got killed by commuting, again. Yes, again. I should have learned from my past dreadful experience from 1990 to 1992. I know regular long-distance commuting is hazardous to my health. And being forced to synchronously work with other people from 9am to 5pm simply does not work for me. But I had to take the job for my paycheck, because no other practical job offer was available on Spring 2010. And I have to admit that I did not survive the tough working condition.
</p>
<p>
I was taking a sick leave from November 2012 to January 2013. I got mentally crashed due to chronic and accumulated fatigue, presumably caused by spending nearly four hours every day during commuting from home. Fortunately at the end of January 2013 my mental and physical health conditions have been back to the normal ones, but at the end of October 2012 I was very weak and mentally disorganized.
</p>
<p>
I once experienced a similar situation of chronic fatigue when I was working in Tokyo, commuting to a Yokohama office, with four train line transits every day, taking nearly two hours for each direction, from 1990 to 1992. I was young enough to tough it out for two years, but I collapsed on Autumn 1991. I had to quit the job on April 1992.
</p>
<p>
Commuting from Northern Osaka including Toyonaka to Kyoto is relatively less stressful than commuting from Setagaya in Tokyo to Hodogaya in Yokohama. It takes three train lines for each direction, much less crowded than that of Tokyo. I have to walk a lot though in Kyoto and Osaka, so the time I have to consume is approximately two hours for each direction, virtually the same as the one I experienced in Tokyo.
</p>
<p>
I tried to reduce commuting by doing my job from home, but the nature of my missions eventually changed to mandate daily commuting, and my physical and mental health conditions got deteriorated. What was worse was that I also had to work from home. I was simply spending too much time on my working hours, and in the end my productivity turned into nil.
</p>
<p>
I took my personal records of working hours spent on each task at the workplace simply for my own curiousity, measured by the unit of Pomodori, which is plural of Pomodoro. Each Pomodoro in my case means 30 minutes. I take this definition of Pomodoro/Pomodori from a popular book called <a href="http://pragprog.com/book/snfocus/pomodoro-technique-illustrated">Pomodoro Technique Illustrated, by Steffan Nöteberg</a>. Note that Steffan suggests that you have to take at least a five-minute break for each Pomodoro, which takes 25 minutes. This is unfortunately virtually impossible in the corporate life.
</p>
<p>
I think the worst time wasting events at the workplace were regular meetings. Many of the meetings take at least two Pomodori, and some of them even take six or more, which means three hours or more. Locked onto a chair for such a long time without a break makes you feel very sick, and will surely hurt your back. I also have to write that commuting only for attending face-to-face meetings is simply a waste of time and the physical energy. And I've found that for many days I had to work more than 20 Pomodori at the workplace, which suggested lower productivity.
</p>
<p>
I think allowing telecommuting, teleworking, working from home, or whatever frees the employees or managers from the physical office or being forcefully bound onto an unnecessary face-to-face meeting, is a must for a modern organization to boost the productivity of each organizational member. Some people may argue this is not for everyone, but I strongly believe this option should be available for all people, unless the person deliberately want to dedicate a fixed window of time to a fixed place with prior consent. I also think that the number of meetings should be minimized, and that the time spent on the dedicated meetings should be kept as small as possible.
</p>
<p>
I understand that occasional or sometime less frequent (for example per month or bi-weekly) business trips will be necessary, and I usually accept them. Face-to-face meetings are indeed necessary for some decision makers, which I also consider logical. But I think daily long-distance (more than 30 minutes or even one hour) commuting should not be used as a piece of litmus paper test of the royalty to an organization.
</p>
<p>
Unfortunately people at most of the organizations in Japan still think physical commuting and daily or weekly face-to-face meetings are critical and mandatory, and that there's no other way. I think this sort of thinking will no longer work well, regarding the increasing population density and train network failure rate, especially in Tokyo and the Kanto plain, and also in Osaka/Kansai, Nagoya, and less crowded regions. And people in Japan are now struggling to allocate their scarce resource of time to taking care of their family members, of their children, or of their elderly parents, which no one else will take it as the primary role. The time and physical energy management gets even more important for each individual than ever.
</p>
<p>
So I've decided to choose another way of living, before getting lost in transportation. Getting back to the days of working from home and telecommuting/teleworking is nothing new to me, because that's what I've done from 1992 to 2010. Leaving the career track of academic research is sad. But I need to live and survive. And I want to use my time and physical energy wisely. I'll take this new challenge again.
</p>
<p>
Update 7-JUL-2013: <em>A followup post is <a href="https://medium.com/this-happened-to-me/e62f10faa5b4">here in Medium</a>.</em>
</p>
Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-30173179355747424662013-01-01T09:00:00.000+09:002013-01-01T09:33:36.582+09:00Coming change in 2013<p>
(Photo by Kenji Rikitake, with a book cover of "Concurrent Programming in Erlang", which is an on-demand printed version via amazon.co.uk)
</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-NyUSgR6Gc0U/UOIth6UoLVI/AAAAAAAAAKA/hWsvsOQQl_4/s1600/snakes-erlang-20121217.jpg" imageanchor="1" style="clear:right; float:right; margin-left:1em; margin-bottom:1em"><img border="0" height="240" width="320" src="http://4.bp.blogspot.com/-NyUSgR6Gc0U/UOIth6UoLVI/AAAAAAAAAKA/hWsvsOQQl_4/s320/snakes-erlang-20121217.jpg" /></a></div>
<p>
I've been away from this blog for quite a long time. This will be a short entry, though I'm writing this to make a mark at the beginning of the year 2013.
</p>
<p>
I'll be on a big transition in this year 2013. I'll write about the details when available. I can promise that I'll keep focusing on Erlang/OTP and distributed systems, as I have been for the past 5 years. Stay tuned for the details.
</p>
<p>
Lots of things happened last year. A good news is that I joined <a href="http://www.cse.chalmers.se/~rjmh/EWCFP.html">the 11th ACM SIGPLAN Erlang Workshop held at Copenhagen on September 2012.</a> Meeting a lot of great people and nice friends there was a precious experience.
</p>
<p>
A bad news is that I have been taking a long sick leave since November 2012. I will write about the details later when I feel I should, but for the time being I can only conclude that a long-distance commuting literally killed me again, as it had done during 1990 to 1992. I definitely have to change my lifestyle.
</p>
<p>
On new year's resolution: I won't declare it this year, because I need to drastically restructure my professional life anyway. Of course I've got to get myself into a good shape. And I need to spend more time on code writing and development, which I could not for the past three years.
</p>
<p>
I hope things will work out in a good way this year; it's a year of Snake in Japanese/Chinese 12-year holoscope, and it's my year too.
</p>
Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-30677423360498115542012-04-02T12:00:00.000+09:002012-04-02T16:27:58.686+09:00Why Erlang people need the Erlang Factory events<p>
Disclaimer: I am writing this blog article on my way home from SFO.
The reduced air pressure in the passenger cabin might have affected the contents of this article.
</p>
<p>
I spent all three days of <a href="http://www.erlang-factory.com/conference/SFBay2012/">Erlang Factory SF Bay 2012</a>, with two more days to cope with the jet lag. This was my third consecutive time to participate in the event as an invited speaker.
</p>
<p>
One of the most impressive things about this conference is that Francesco Cesarini, the leader of this event and CTO of the hosting company <a href="http://www.erlang-solutions.com/">Erlang Solutions</a>, carefully treats <em>all</em> delegates (which stands for the participants) equally with kindness and hospitality. Francesco's principles are well understood by all the other Erlang Solutions staff members as well.
</p>
<p>
I think Erlang Factory provides integrated feelings of satisfaction to
all the delegated by letting them exchange the serious but friendly
discussions. This is <em>not</em> something you can find over teleconferences
or any forms of distant communication either synchronous or
asynchronous. Erlang Factory is <em>not</em> a decision-making event; it
is about sharing ideas and hanging out with each other, supporting both
mental and emotional needs of the delegates.
</p>
<p>
Erlang Factory conference accepts a large number of versatile topics including:
<ul>
<li>Distributed databases
<li>Case studies in production systems
<li>Detailed debugging into the library and the host operating systems
<li>Crash courses for programming and testing the language system, and<li><em>Official announcements</em> from Ericsson's OTP Team, who owns the final responsibility of managing and directing the language system's future.
</ul>
</p>
<p>
An opportunity to discuss various complex issues with the speakers <em>and</em> the audiences is itself rare and precious, especially when the issues share the same core interests: <a href="http://www.erlang.org/">Erlang/OTP</a>.
</p>
<p>
Erlang Factory also accepts non-mainstream topics as a talk proposal. In the past three years, I talked about RPC over SSH, Mersenne Twister implementation with the NIFs, and in this year 2012 it was about IPv6 readiness and programming tips of the language system. Those are not necessarily the mainstream topics in the Erlang/OTP community, though I find quite a few problem reports on the online discussion places, such as in the <tt>erlang-questions</tt> mailing list.
</p>
<p>
My style of talk at the Erlang Factory is nothing extraordinary:
<ul>
<li>First I analyze the problem and define the detailed problem domain to solve;
<li>then I write some example code to solve them and put them on the Web including GitHub and the other sharing places <em>before</em> finalizing the talk so that I could make it better with the wisdoms of others;
<li>I also experiment and evaluate the results while I'm finalizing the code and the presentation materials;
<li>Then at the Erlang Factory talks I discuss the conclusions found and propose the unresolved issues which may become another interesting talk topic.
</ul>
The important points are sticking to the facts, no exaggeration, distinguishing assumptions from the facts, and listening to what the audiences ask and comment. Actually this is the same procedure I will take for the ACM Erlang Workshops, but for the Erlang Factory I try to make the presentation including more practical aspects and open questions.
</p>
<p>
I usually assign three months as a part-time project for an Erlang Factory presentation. The toughest part is to decide what to talk about. It's actually Francesco who suggested me to give a talk about IPv6 for this year 2012. I had some experience dealt with the technical issues of IPv6, so I decided to take the suggestion. The important point is that what you are going to talk is negotiable with the Erlang Factory staff.
</p>
<p>
This year 2012's events of Erlang Factory SF Bay Area were very intense, both in formal and casual senses. I've got an impression that it has become a truly international-class conference, while retaining the casual and friendly style of the past conferences.
</p>
<p>
I believe people go for conferences and events to meet people and share the feelings. It's a sort of festival, or <em>Matsuri</em> in Japanese, though also with the practical exchange of ideas. I strongly suggest all the Erlang/OTP enthusiasts to participate in this superb Matsuri.
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-67058878019812273162012-03-05T12:00:00.000+09:002013-03-11T17:30:54.180+09:00Erlang VM memory size and ERL_MAX_PORTS<p>
Erlang VM has the <em>ports</em> to communicate with other programs and objects (files, drivers, etc.) The ports are seen as the Erlang processes.
The OS environment variable <tt>ERL_MAX_PORTS</tt> sets the default value of maximum number of ports.
(See the manual for the function <a href="http://www.erlang.org/doc/man/erlang.html#open_port-2"><tt>erlang:open_port/2</tt></a> for the further details.)
</p>
<p>
I discovered by accident that Erlang VM of R15B on FreeBSD/amd64 9.0 in my test environment sets <em>the value of maximum file descriptors assigned to the OS process</em> as the default value for
<tt>ERL_MAX_PORTS</tt>. This means <tt>ERL_MAX_PORTS</tt> is set to 800000, far larger than 1024, specified in the manual.
This excessive value of the <tt>ERL_MAX_PORTS</tt> leads into unnecessary memory consumption of the Erlang VM.
An easy way to test this is to execute the following code on the shell:
</p>
<pre>
env ERL_MAX_PORTS=[given value] erl -noinput -eval 'io:format("~p~n",[erlang:memory(system)]).' -s erlang halt
</pre>
<p>
How memory consumption changes just after the Erlang VM startup, as {<tt>ERL_MAX_PORTS</tt>, memory size in bytes}:
{1024, ~65M}, {102400, ~124M}, {800000, ~543M}.
</p>
<p>
So I decided to set the <tt>ERL_MAX_PORTS</tt> for my home <a href="http://yaws.hyber.org/">Yaws</a> server to 4096.
This significantly reduced the memory consumption.
</p>
<p>
I suggest you to tune the value of <tt>ERL_MAX_PORTS</tt> to optimize the number of concurrently opening ports of an Erlang VM,
especially when you run a server on a memory-restricted host.
</p>
<p>
<b>Update 11-MAR-2013:</b> on R16B, the amount of memory consumed by the ports will be significantly reduced at the Erlang VM startup.
</p>
<h2>References</h2>
<ul>
<li><a href="http://www.erlang.org/doc/man/erlang.html#memory-0">Manual of erlang:memory/0</a>
<li><a href="http://erlang.org/pipermail/erlang-questions/2011-May/058531.html">[erlang-questions] About Environment variable ERL_MAX_PORTS</a>
<li><a href="http://erlang.org/pipermail/erlang-questions/2009-August/046175.html">[erlang-questions] Max open files and erlang memory</a>
</ul>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-33845941869577643482012-03-02T12:00:00.000+09:002012-03-05T12:54:54.461+09:00Kernel module functions for IPv6 on Erlang/OTP R15B<p>
I've been reading the source code of
<a href="http://www.erlang.org/">Erlang/OTP</a> R15B
to find out how it handles the IPv6-related functions.
</p>
<p>
Erlang VM has the most functions embedded into the <tt>inet_drv</tt> linked-in driver,
so programmers don't really have to worry about many things except for the address tuple format
difference between IPv4 (<tt>{192, 168, 0, 1})</tt> and IPv6 (<tt>{8193,3512,4660,22136,51966,47806,57005,48879}<tt> for
<tt>2001:db8:1234:5678:cafe:babe:dead:beef</tt>).
You can find a lot of gems by reading the <tt>kernel</tt> module source code.
</p>
<p>
Here is a list of notable functions inside the <tt>kernel</tt> module for IPv6 handling on Erlang/OTP R15B.
I suggest you to read these functions before writing your own ones.
</p>
<p>
(Note: this is a work-in-progress article of
<a href="http://www.erlang-factory.com/conference/SFBay2012/speakers/kenjirikitake">my Erlang Factory SF Bay Area 2012 presentation.</a>)
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;color:black;background:white;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #808080">%%% A partial list of IPv6 keywords in Erlang/OTP R15B source code</span>
<span style="color: #808080">%%% atom "inet6" is an important keyword</span>
<span style="color: #0e84b5; font-weight: bold">inet_parse</span>:address<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet_parse</span>:ipv6_address<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet_parse</span>:ipv6strict_address<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span> <span style="color: #808080">% review RFC4291</span>
<span style="color: #0e84b5; font-weight: bold">inet_parse</span>:ntoa<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet_parse</span>:hosts<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">2</span> <span style="color: #808080">% internal, now ignoring "%if" suffix</span>
-<span style="color: #800000; font-weight: bold">type</span> <span style="color: #0e84b5; font-weight: bold">inet</span>:ip6_address()
<span style="color: #0e84b5; font-weight: bold">inet</span>:getifaddrs<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">0</span>
<span style="color: #0e84b5; font-weight: bold">inet</span>:getifaddrs<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet</span>:gethostbyaddr<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet</span>:getaddrs<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">2</span> <span style="color: #808080">% second arg: inet6</span>
<span style="color: #0e84b5; font-weight: bold">inet</span>:gethostbyname_string<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">2</span> <span style="color: #808080">% second arg: inet6</span>
<span style="color: #0e84b5; font-weight: bold">inet</span>:i<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">0</span>
<span style="color: #0e84b5; font-weight: bold">inet</span>:i<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #808080">%%% interesting module results</span>
<span style="color: #808080">%%% (no significant difference other than inet/inet6 flags):</span>
<span style="color: #808080">%%% diff --unified inet_tcp.erl inet6_tcp.erl</span>
<span style="color: #808080">%%% diff --unified inet_udp.erl inet6_udp.erl</span>
<span style="color: #808080">%%% diff --unified inet_sctp.erl inet6_sctp.erl</span>
<span style="color: #808080">%%% diff --unified inet_tcp_dist.erl inet6_tcp_dist.erl</span>
<span style="color: #0e84b5; font-weight: bold">inet_config</span>:set_hostname<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">0</span> <span style="color: #808080">% internal, dependent on inet_udp:open/2</span>
<span style="color: #808080">%%% inet_db.erl has tcp/udp/sctp module config params</span>
<span style="color: #808080">%%% for the gen_server callbacks</span>
<span style="color: #0e84b5; font-weight: bold">inet_db</span>:set_inet6<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet_db</span>:dn_ip6_int<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">8</span> <span style="color: #808080">% internal, for 8 elements of an IPv6 address tuple</span>
<span style="color: #0e84b5; font-weight: bold">inet_db</span>:make_hostent(<span style="color: #906030">Name</span>, <span style="color: #906030">Addrs</span>, <span style="color: #906030">Aliases</span>, <span style="color: #003060; font-weight: bold">?S_AAAA</span>)
<span style="color: #0e84b5; font-weight: bold">inet_db</span>:handle_call({add_host, <span style="color: #906030">IPv6address</span>, <span style="color: #906030">Names</span>})
<span style="color: #0e84b5; font-weight: bold">inet_db</span>:handle_call({del_host, <span style="color: #906030">IPv6address</span>})
inet_dns.<span style="color: #0e84b5; font-weight: bold">erl</span>: <span style="color: #003060; font-weight: bold">?S_AAAA</span> related lines
inet_dns.<span style="color: #0e84b5; font-weight: bold">hrl</span>: <span style="color: #303030">--</span>define(<span style="color: #906030">T_AAAA</span>), <span style="color: #303030">--</span>define(<span style="color: #906030">S_AAAA</span>)
inet_int.<span style="color: #0e84b5; font-weight: bold">hrl</span>: <span style="color: #303030">--</span>define(<span style="color: #906030">INET_AF_INET6</span>), <span style="color: #303030">--</span>define(<span style="color: #906030">SCTP_FLAG_PMTUD_</span><span style="color: #303030">*</span>),
<span style="color: #303030">--</span>define(ip6(<span style="color: #906030">A</span>,<span style="color: #906030">B</span>,<span style="color: #906030">C</span>,<span style="color: #906030">D</span>,<span style="color: #906030">E</span>,<span style="color: #906030">F</span>,<span style="color: #906030">G</span>,<span style="color: #906030">H</span>)
-<span style="color: #800000; font-weight: bold">type</span> <span style="color: #0e84b5; font-weight: bold">inet_res</span>:res_option({inet6, boolean()})
-<span style="color: #800000; font-weight: bold">type</span> <span style="color: #0e84b5; font-weight: bold">inet_res</span>:dns_data() <span style="color: #808080">% inet:ip6_address()</span>
<span style="color: #0e84b5; font-weight: bold">inet_res</span>:gethostbyaddr<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet_res</span>:gethostbyaddr_tm<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">2</span>
<span style="color: #0e84b5; font-weight: bold">inet_res</span>:gethostbyname<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">1</span>
<span style="color: #0e84b5; font-weight: bold">inet_res</span>:gethostbyname_tm<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">3</span>
<span style="color: #0e84b5; font-weight: bold">inet_res</span>:udp_open<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">2</span> <span style="color: #808080">% internal (record #sock)</span>
<span style="color: #0e84b5; font-weight: bold">inet_res</span>:udp_connect<span style="color: #303030">/</span><span style="color: #0000D0; font-weight: bold">2</span> <span style="color: #808080">% internal (record #sock)</span>
<span style="color: #808080">% There will be more...</span>
</pre></div>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-56891060715363980672012-02-25T12:00:00.000+09:002012-02-25T20:17:11.864+09:00Small pieces of happiness that I pursue<p>
The small pieces of happiness I've been pursuing since 1992 are as follows:
</p>
<ul>
<li>Making money by doing what I want and by minimizing doing what I don't want to do;
<li>Living in a house of my own control with my partner without interference;
<li>Working at a place where I want and at a place where I can minimize the mental stress; and
<li>Working at a period of time in the most productive way, including taking enough time to rest.
</ul>
<p>
I feel I've been devoting myself to pursue this small happiness at my best effort.
</p>
<p>
And I'm happy with it.
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-10860431837490999122012-01-08T00:00:00.000+09:002012-01-08T21:13:51.414+09:00Leap second, again<p>
News: <a href="ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.43">There will be another leap second on 23:59:60UTC 31-JUN-2012</a>.
</p>
<p>
Nevertheless, I quitted supporting leap second on the time zone file at home last year on December 2011,
which had been introduced for more than 12 years. Reason: I gain very little while I lose quite a lot by setting the system time based on TAI.
</p>
<p>
I think POSIX should have defined the timezone functions to handle leap seconds properly, by setting the TAI-based monotonically-increasing value to the local clock, and by correcting the difference between UTC and TAI with the timezone file. But POSIX doesn't. So TAI-based local time is <em>not interchangeable</em>. Most applications assume the value of <code>time_t</code> represents UTC without the leap seconds, which is not the case when the local clock is set based on TAI.
</p>
<p>
I suspect that many sysadmins are not really aware of the leap seconds, unfortunately, including <em>those provide NTP services</em>. I've experienced one of the upper-stratum NTP servers of my ISP did not synchronize on 1-JAN-2009, when the last leap second was added.
</p>
<p>
Very few language systems can explicitly handle leap seconds either. For example,
<a href="http://erlang.2086793.n4.nabble.com/leap-second-enabled-FreeBSD-doesn-t-work-right-with-R12B4-erts-emulator-beam-erl-time-sup-c-correctid-td2119945.html">I had to post a patch for Erlang for handling TAI.</a> (Fixed on Erlang/OTP R13A and later.)
</p><p>
So you should be very careful on the de-synchronization of your machine's local clocks on June 30th or July 1st this year on 2012.
</p>
<p>
Useful links:
<ul>
<li><a href="http://www.ucolick.org/~sla/leapsecs/onlinebib.html">The Future of Leap Seconds</a>
<li><a href="http://www.cl.cam.ac.uk/~mgk25/time/leap/">Leap Seconds by Markus Kuhn</a>
<li><a href="http://dl.acm.org/citation.cfm?id=1941487.1941505&coll=portal&dl=ACM">Communications ACM May 2011: The One-Second War</a>
<li><a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>
<li><a href="http://cr.yp.to/proto/utctai.html">D. J. Bernstein: UTC, TAI, and UNIX time</a>
</ul>
</p>
<p>
(Correction 8-JAN-2012: <code>gmtime()</code> was ambiguous. Corrected to <code>time_t</code>.)
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-25420284408413248172012-01-04T00:00:00.000+09:002012-03-05T12:18:11.961+09:00Preparing FreeBSD Port of Erlang/OTP<p>Updating an Erlang/OTP Port (files under the Ports tree)
for FreeBSD is not a complicated task,
with the latest pieces of the Port files.
You can find out the latest pieces at
<a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/erlang/">the FreeBSD CVSweb page for Erlang Port</a>.</p>
<p>You need to do the following things:</p>
<ul>
<li><a href="#filenames">Updating the source file names</a></li>
<li><a href="#lib">Preparing the library list</a></li>
<li><a href="#man">Preparing the man file list</a></li>
<li><a href="#patches">Removing/editing/adding patches</a></li>
<li><a href="#makesum">Updating the checksum file</a></li>
<li><a href="#plist">Preparing the package list</a></li>
<li><a href="#build">Test building</a></li>
<li><a href="#ref">References</a></li>
</ul>
<h2><a name="filenames"></a>Updating the source file names</h2>
<p>The following parts of the main <code>Makefile</code> must be modified
to specify the related source file names
(in a unified diff-like format):</p>
<pre><code> -PORTVERSION= r14b04
+PORTVERSION= r15b
-DISTNAME= otp_src_R14B04
+DISTNAME= otp_src_R15B
-ERLANG_MAN= otp_doc_man_R14B04.tar.gz
+ERLANG_MAN= otp_doc_man_R15B.tar.gz
-ERLANG_DOCS= otp_doc_html_R14B04.tar.gz
+ERLANG_DOCS= otp_doc_html_R15B.tar.gz
</code></pre>
<h2><a name="lib"></a>Preparing the library list</h2>
<p><code>Makefile.lib</code> must be supplied to provide
all the version numbers of the OTP library modules.</p>
<p>To extract the version number, use the following shell command:</p>
<pre><code> (cd work/otp_src_VERSION; \
find . -name vsn.mk -print | xargs grep VSN) \
> OTP-vsnlist.txt
</code></pre>
<p>The content of <code>OTP-vsnlist.txt</code> will be something like this:</p>
<pre><code> ./erts/vsn.mk:VSN = 5.9
./erts/vsn.mk:SYSTEM_VSN = R15B
./lib/appmon/vsn.mk:APPMON_VSN = 2.1.14
./lib/asn1/vsn.mk:ASN1_VSN = 1.6.19
./lib/common_test/vsn.mk:COMMON_TEST_VSN = 1.6
./lib/compiler/vsn.mk:COMPILER_VSN = 4.8
./lib/cosEvent/vsn.mk:COSEVENT_VSN = 2.1.12
./lib/cosEventDomain/vsn.mk:COSEVENTDOMAIN_VSN = 1.1.12
./lib/cosFileTransfer/vsn.mk:COSFILETRANSFER_VSN = 1.1.13
./lib/cosNotification/vsn.mk:COSNOTIFICATION_VSN = 1.1.18
[...]
./lib/wx/vsn.mk:WX_VSN = 0.99.1
./lib/xmerl/vsn.mk:XMERL_VSN = 1.3
</code></pre>
<p>You have to manually edit the <code>Makefile.lib</code>
with the content of <code>OTP-vsnlist.txt</code>.
The format of <code>Makefile.lib</code> is
(beware that the last line has no backslash):</p>
<pre><code> ERTS_VSN= 5.9
TOOLS_VSN= 2.6.6.6
OTP_LIBS= appmon-2.1.14 \
asn1-1.6.19 \
common_test-1.6 \
compiler-4.8 \
cosEvent-2.1.12 \
cosEventDomain-1.1.12 \
cosFileTransfer-1.1.13 \
cosNotification-1.1.18 \
[...]
wx-0.99.1 \
xmerl-1.3
</code></pre>
<p>The contents of <code>Makefile.lib</code> is a set of <code>Makefile</code> variables,
so all the module names must be listed with the backslash character.
(Note: <code>ERTS_VSN</code> is no longer needed, but I will include it
here just FYI.)</p>
<h2><a name="man"></a>Preparing the man file list</h2>
<p><code>Makefile.man</code> must be supplied to provide
all the version numbers of the OTP library modules.</p>
<p>To extract the man filenames, use the following shell command:</p>
<pre><code> tar ztf /usr/ports/distfiles/erlang/otp_doc_man_VERSION.tar.gz | \
sort | awk '{FS="/"; print $3;}' > OTP-manlist.txt
</code></pre>
<p>You have to manually edit the <code>Makefile.man</code>
with the content of <code>OTP-manlist.txt</code>.
For OTP R15B, <code>Makefile.man</code> only needs man sections 1, 3, 4, and 6,
so man section 7 must not be included.</p>
<p>The content of <code>OTP-manlist.txt</code> will be something like this:</p>
<pre><code>COPYRIGHT
PR.template
README
man1/
man1/ct_run.1
man1/diameter_compile.1
man1/epmd.1
man1/erl.1
man1/erl_call.1
man1/erlc.1
[...]
man7/SNMP-VIEW-BASED-ACM-MIB.7
man7/SNMPv2-MIB.7
man7/SNMPv2-TM.7
man7/STANDARD-MIB.7
man7/TRANSPORT-ADDRESS-MIB.7
</code></pre>
<p>You have to manually edit the <code>Makefile.man</code>
with the content of <code>OTP-manlist.txt</code>.
The format of <code>Makefile.man</code> is
(beware that the last line of each section has no backslash):</p>
<pre><code> MAN1= ct_run.1 \
diameter_compile.1 \
epmd.1 \
erl.1 \
erl_call.1 \
erlc.1 \
erlsrv.1 \
escript.1 \
run_erl.1 \
snmpc.1 \
[...]
start_webtool.1 \
werl.1
MAN3= CosEventChannelAdmin.3 \
CosEventChannelAdmin_ConsumerAdmin.3 \
[...]
zlib.3 \
zlib_stub.3
MAN4= app.4 \
appup.4 \
[...]
relup.4 \
script.4
MAN6= common_test.6 \
crypto.6 \
[...]
stdlib.6 \
test_server.6
</code></pre>
<p>The contents of <code>Makefile.man</code> is a set of <code>Makefile</code> variables,
so all the man file names must be listed with the backslash character.</p>
<h2><a name="patches"></a>Removing/editing/adding patches</h2>
<p>FreeBSD-specific patch files are provided under the Port directory
<code>files</code>. You need to remove the obsolete patches first, by <code>make patch</code>.
You should edit the existing ones and add the new ones as well.</p>
<p>The naming convention of the patch file is:</p>
<pre><code> patch-lib_et_src_et__gs__contents__viewer.erl
</code></pre>
<p>for</p>
<pre><code> lib/et/src/et_gs_contents_viewer.erl
</code></pre>
<p>(Conversion of <code>/ -> _</code> and <code>_ -> __</code> is needed.)</p>
<h2><a name="makesum"></a>Updating the checksum file</h2>
<p><code>make makesum</code> is the convenient way to update the <code>distinfo</code> checksum data.</p>
<h2><a name="plist"></a>Preparing the package list</h2>
<p>New binary files are occasionally added in the OTP distributions.
The <code>pkg-plist</code> file must be updated as well.</p>
<h2><a name="build"></a>Test building</h2>
<p>The building process will be like this
(note the <code>umask 022</code>):</p>
<pre><code> # I use zsh, but use whatever you want
# as root
sudo zsh
umask 022
make fetch
exit
# as your own account
umask 022
make
# as root
sudo zsh
umask 022
make deinstall && make reinstall
exit
</code></pre>
<p>
(Note added 5-MAR-2012: I've posted a <a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=163711">send-pr (ports/163711)</a> to
FreeBSD issue tracker system on 30-DEC-2011. I've made an <a href="https://evernote.com/pub/jj1bdx/erlang-shared#b=b10325fc-cb12-4532-bc13-c9f383f4ed49&n=22a7c8f0-420e-4102-a136-c2093296ea78">Evernote page for the port tar.gz archive</a>.)
</p>
<h2><a name="ref"></a>References</h2>
<ul>
<li><a href="https://github.com/erlang/otp/">Erlang/OTP repository at GitHub</a></li>
<li><a href="http://www.freebsd.org/doc/en/books/porters-handbook/">FreeBSD Porter's Handbook</a></li>
</ul>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.comtag:blogger.com,1999:blog-2590682796027714479.post-55288524429212043512011-08-19T23:24:00.000+09:002011-08-19T23:24:55.220+09:00It's all about experience<p>
It's not just the programming.<br>
It's not just the music.<br>
It's not just the message.<br>
</p>
<p>
It's all about experience. And the desire for it.
</p>
<p>
People are looking for a new experience through technologies.
</p>
<p>
Concurrency will surely help giving a smooth experience;
and even more good things.
</p>
<p>
(I will not quote Jimi Hendrix here)
</p>Kenji Rikitakehttp://www.blogger.com/profile/00837128766291897538noreply@blogger.com