Saturday, November 5, 2016

Erlang and my inferiority complex against functional programming

A few weeks ago in the middle of October 2016, I had some interesting exchange of tweets inspired by an Alvaro Videla's tweet. Alvaro wrote he always told people Functional Programming (FP) in Erlang was a necessity, not part of the original design (emphasis mine).

I later found Robert Virding, one of the founders of Erlang language and concurrent system, explicitly stated in this talk (video at Functional Conf 2016) (at 4m23s) as follows:

We were not out to implement a functional language
We were not out to implement the actor model
We were trying to solve the problem

Robert's statements in the quote above are the exact reason why I started and still like Erlang.

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.

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.

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 functional languages are slow, which is incorrect as of 2016; a counter evidence is shown as a production level documentation tool written in Haskell called Pandoc, and by compiler-based FP systems such as Common Lisp. Nevertheless, in 1980s, FP systems were mostly slow. Until the late 2000s, I hadn't been really interested in FP again.

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.

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

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 that much complex.)

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!

So some trivial lessons I've learned:

  • You are never too late to learn new paradigms.
  • You are never too late to re-learn things once you failed to learn.
  • There's something fits for you even for a category you don't feel like to study.

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.

Monday, September 19, 2016

Phasing out old media

Getting rid of the old stuff and formats is one of the hardest things to do in a materialistic society.

I've managed to dump and have gotten rid of the following formats of media so far as of September 2016:

  • MiniDisc (MD)
  • Digital Audio Tape (DAT) and the data format DDS (including DDS2/DDS3)
  • Various optical disks other than CD/DVD (including Panasonic's PD)
  • Flash memory formats other than SD including Smartmedia / Compact Flash
  • 5.25" and 8" floppy discs
  • Vinyl LPs
  • VHS video tapes

The following media formats are not acceptable as of September 2016:

  • Blu-ray (including BD-R) (The reliability issue still remains suspicious)
  • Super Audio CD (playback only)

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

  • DXCC paper QSL cards (caution: I may discard all paper QSLs at any time, details undecided)
  • Old Apple ][ documents
  • Old TL/1 language and GAME language compiler documents
  • Old SWL paper logs
  • Old private music demo tapes

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.

The following media formats have been for business acceptance only (i.e., the playback hardware exists but no new recordings) since September 2015:

  • 3.5" floppy discs
  • Cassette tapes

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:

  • CD-R
  • DVD-R (single layer/dual layers)
  • (micro)SD(HC/XC)
  • Generic USB memory sticks

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.

Bottom line: I need to remember that the room spaces are always the most precious resources.

(This article first appeared on my Facebook Notes dated 27-SEP-2015)