Thursday, April 3, 2014

Erlang Factory SF Bay 2014: list of some notable talks

(Photo: a shot during my talk by Yoshihiro Tanaka, used by permission)

(Disclaimer: there were too many talks I wanted to listen to, but I couldn't.)

Here's the list of talks I thought intriguing for Erlang Factory SF Bay 2014 (links are to the slides or videos):

I also wanted to listen to the following talks, and found the slides intriguing:

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:

  • Erlang is no longer an exotic language or system. The audiences want the real solutions and hints.
  • Elixir is gaining popularity, and will surely contribute to reduce resentment against BEAM (Erlang VM) and the ecosystem.
  • The implementation talks were getting more detailed and hard core, and the questions were also more specific.

Video quality

Thanks to the hard-working video and audio recording and editing team, this year's video quality is very high in overall. While the live streaming was not possible due to the prohibitive cost, 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.

[To be continued in another article]

Monday, March 31, 2014

Erlang Factory SF Bay 2014: erltrek and the beginning

(Badge photo by Kenji Rikitake)

It's already been near a month since Erlang Factory SF Bay 2014 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:

  • 2010: SSH RPC
  • (sponsored by NSIRG, NICT, Japan)
  • 2011: SFMT on Erlang
  • (sponsored by ACCMS, Kyoto University)
  • 2012: IPv6 example of DNS simultaneous resolution with IPv4
  • (sponsored by IIMC/ACCMS, Kyoto University)
  • 2013: Riak on amateur radio data analysis
  • (sponsored by Basho Technologies)
  • 2014: Star Trek game revisited
  • (this year no sponsorship - I paid all by myself - thanks Erlang Solutions for accepting my talk proposal!)

The topic list shows how broad range of subjects and topics which Erlang and OTP can cover.

Highlights of this year

There are so many things I have to write about for Erlang Factory in this year 2014. Listing the topics (before I forget) here:

  • My erltrek implementation of the Star Trek game (immediately modified into a completely new thing, with a great help and massive contribution from Andreas Stenius)
  • Erlang Foundation and Intermediate Certificates
  • (Foundation: passed, Intermediate: failed.)
  • Concuerror (invitation-only) workshop by Kostis Sagonas
  • Elixir tutorial by one of the Erlang Gang of Four, Robert Virding
  • Fréd Hébert's presentation and autograph on LYSE
  • ... and many more

So let's start from the erltrek.

Why Star Trek?

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 BSD Trek 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:

  • Read the C code
  • Port it to Lua so that I can at least read through all the C functions
  • Rebuild the Lua code (luatrek) into more Erlang-ish one

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 procedural, 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.


Marines' Memorial Club and Hotel again hosted the Erlang Factory. In fact they also hosted a part of JavaScript event series called JSFest 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.


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, Keisuke Takahashi; he showed a strong interest into the Elixir language and I'm sure he'll drive a community in Tokyo soon.

[To be continued in another article]

Monday, September 30, 2013

Leaving Basho - many thanks!

I will resign from Basho. 30-SEP-2013 will be the last day.

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.

I will continue supporting Riak and Erlang/OTP after leaving Basho, as I've been doing so since long before I joined the company.

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.

Thanks again to the people who supported me during my Basho days.

Tuesday, August 20, 2013

Learn You Some Erlang for Great Good! (a review)

Learn You Some Erlang for Great Good! (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.

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 Joe Armstrong's Programming Erlang (I'm eagerly waiting for the Second Edition!) and Erlang Programming of Francesco Cesarini and Simon Thompson (I'm also eagerly waiting for a new book from the authors with Robert Virding this time!), let alone the first book of Erlang called Concurrent Programming in Erlang 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 not an ordinary textbook.

I've seen no book on Erlang about the complete coverage of the language and the OTP library other than the online manual at and the source code repository at GitHub. 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 Introducing Erlang.

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 thick 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.

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:

The protected part of an exception can't be tail recursive.
(Chapter 7, “Protecting The Right Thing")

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 not, I repeat.)

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 erlang-questions mailing list 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.

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, check out the free online version.

Appendix: about the book title

When I saw the title of LYSE first time, and when I saw the title of the cousin book of LYSE about Haskell called Learn You a Haskell for Great Good! (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 learn will not 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.

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.


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!

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!)


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 :)

Wednesday, August 7, 2013

AM Radio: No Longer Practical?

Noise from modern electronic devices are killing the media

This is a popular article among my pieces of writing at

(Photo by Patrick Fitzgerald/Barelyfitz)

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.

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.

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 Washlet; the water spraying unit is driven with a switching power supply, which generates the noise effectively blocking the radio station signals.

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.

The AM in the AM radio stands for Amplitude Modulation. AM radio listeners only needs a simple equipment to convert the radio signals into the sounds. Crystal radio receivers, 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; superheterodyne receivers 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 software-defined radio receivers. So the technology is still alive and thriving very well.

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. It’s not just Washlet; it’s everywhere from the laptop computers to the LED ceiling lamps.

Modern power supplies use the technology called switching voltage regulation; 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 series voltage regulation, 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.

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.

The switching voltage regulation technology is so pervasive that now I see virtually all digital device around me are attached to the switching power supplies; the USB wall warts, laptop PC AC adapters, and the units built into various appliances from computers and even to the commercial and amateur radio transceivers, 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.


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 FM stands for the Frequency Modulation, 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.

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.

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.

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.

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.


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.

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.

Exported from Medium on August 7, 2013.

View the original

Thursday, July 25, 2013

Professors in the wasteland

(Photo: Wasteland by Denis Defreyne)

Becoming a professor no longer guarantees academic freedom

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 I’ve already written a part of my story as a blog article. In this essay I’ll write about another part of the story.

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 University of Colorado Boulder. 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.

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 two 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.

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 Joshu (or now Jokyo), the words which stand for the educational staff who have no budget privilege by themselves and have to obey the commandments of Koushi (or the lecturers), Jokyoju (or now Junkyoju), and Kyoju. 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 Kyoju (full professor).

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.

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.

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.

I made a terrible mistake.

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.

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.

I see quite a few articles on Medium and elsewhere about staying out of the graduate school by all means and not taking the academic postdoc jobs even if you could endure all the burdens of becoming a PhD. Reading the itself will let you understand how the life of the graduate school is surreal and unbearable without a lot of humor (though I’ve never been a professor like this person.) 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.

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.

Exported from Medium on July 17, 2013 / updated on July 25, 2013.

View the original