Skip to main content

How to Install Erlang on Mac

I just went through the steps of installing Erlang and Emacs (which is the official development environment for Erlang) on my Macbook Pro, and since it was a little convoluted, I thought I'd share it.
-----
This document explains the steps needed to install Erlang with Emacs support on Mac OSX 10.5. I've chosen to install Erlang from source, because the Mac binaries tend to be out of date. For emacs, I've chosen Aquamacs, which is a nice native Mac emacs distribution.

  1. First, I needed to download and install iPhone SDK, in order to get a C compiler (gcc). Could have gotten it from Developer Tools on the Mac OSX install disks, but I wanted the iPhone SDK anyway.
  2. Next, download erlang from source: http://erlang.org/download.html
  3. tar -xvzf otp_src_R13B.tar.gz, cd otp_src_R13B, ./configure, make, sudo make install
  4. Run erl in a terminal to make sure the erlang interpreter starts properly.
  5. Next, download Aquamacs, which is a native Mac emacs distribution. http://aquamacs.org/
  6. Next, setup Aquamacs for erlang: erlang comes with emacs mode in its distribution, it's just a matter of finding it. The standard install has it at /usr/local/lib/erlang/lib/tools-x.y.z/emacs (mine was at tools-2.6.4).
  7. Copy erlang.el and erlang-start.el from the Tools directory to ~/Library/Application Support/Aquamacs Emacs/erlang (need to make the "erlang" subdirectory)
  8. Create site-start.el in the same Aquamacs directory, which just has one line: (require 'erlang-start)
  9. Good to go! Open a .erl file in Aquamacs - it should go into Erlang mode.

For release 13B, eunit is broken, so download the fix (http://erlang.org/download/patches/eunit-2.1.1.tar.gz), untar it, and sudo mv the resultant directory to /usr/local/lib/erlang/lib/.

Comments

Popular posts from this blog

Why Korean Is Hard For Native English Speakers

A couple of days ago, as an experiment, I wrote my first blog post ever in a non-English language. It was an attempt to explain some of the reasons that Korean is hard to learn for native English speakers, so I figured I might as well try to write it in Korean. Those of you who actually read Korean can see how awkward the attempt was =).

In any case, the post came from an email conversation I had with The Korean from Ask a Korean, a fantastically well-written blog about all things Korea from the perspective of a Korean who moved to the United States during high school. Since I tend to geek out on language things, I figured I might as well post part of that conversation. An edited version follows.

---------

Out of the languages that I've attempted to learn so far, Korean has been the hardest. I've done a lot of meta thinking about learning Korean, and I think there are a number of reasons it's difficult for non-Koreans (and especially Westerners) to learn:

1) Obviously, the…

Don't Take Korean Language Advice From Kyopos

I'm not sure why it took me so long to figure this out, but the last people you should take Korean language advice from are kyopos (foreign-born or raised Koreans). That being said, if you do follow their advice, you will get many laughs from Koreans. Some of my personal favorites, all of which actually happened to me:

- When I first got to Korea, I was at some open-air event, and during a break I started talking to one of the hosts. He said he was only a part-time host, so I asked him what his full-time job was, and he said "백수" (which is slang for "unemployed guy"). I asked him what that was, and he replied, "Comedian". So then the next few people I met, I proudly told I was a baeksu. (Edit: Actually, this guy was Korean Korean, not kyopo.)

- Next, a kyopo who lived in the apartment I moved into back in 2010 asked me what I was doing in Korea, and I told him I was starting a company, and asked how to say that in Korean in case people ask. He told me…

Is It Worth It To Learn Korean?

Learning Korean as a non-Asian foreigner is an exercise in masochism. Note that I specify "non-Asian". Why does that make a difference? Simply because Koreans possess a deeply-ingrained belief that non-Asians are incapable of speaking Korean. The self-fulfilling prophecy of it is that since Koreans expect you to be incapable of speaking Korean, due to this mental block, they are likely to not understand you regardless of your proficiency level. Additionally, they won't respond to you with normal Korean like they would respond to an Asian person, because they assume you couldn't possibly understand. You will rarely ever have an opportunity to hear natural Korean, because Koreans simply won't speak it with you unless 1) they are open-minded and awesome (meaning they have probably lived abroad - thank you to all of you), or 2) they have known you long enough that they've gotten past the odd sight of a foreigner speaking Korean.

In short, nearly every time you op…