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

영어가 모국어인 사람들은 왜 한국어를 배우기가 어려운 이유

이 포스트는 내 처음 한국어로 블로그 포스트인데, 한국어에 대하니까 잘 어울린다. =) 자, 시작합시다! 왜 외국사람에게 한국어를 배우기가 어렵다? 난 한국어를 배우고 있는 사람이라서 이 문제에 대해 많이 생각하고 있었다. 여러가지 이유가 있는데 오늘 몇 이유만 논할 것이다. 1. 분명히 한국어 문법은 영어에 비해 너무 많이 다른다. 영어는 “오른쪽으로 분지(分枝)의 언어"라고 하는데 한국어는 “왼쪽으로 분지의 언어"이다. 뜻이 무엇이나요? 예를 보면 이해할 수 있을 것이다. 간단한 문장만 말하면 (외국어를 말하는 남들은 간단한 문장의 수준을 지낼 수가 약간 드물다), 간단한 걸 기억해야 돼: 영어는 “SVO”인데 한국어는 “SOV”이다. “I’m going to school”라고 한국어로는 “저는 학교에 가요"라고 말한다. 영어로 똑바로 번역하면 “I’m school to go”이다. 두 언어 다르는 게 목적어와 동사의 곳을 교환해야 한다. 별로 어렵지 않다. 하지만, 조금 더 어렵게 만들자. “I went to the restaurant that we ate at last week.” 한국어로는 “전 우리 지난 주에 갔던 식당에 또 갔어요"라고 말한다. 영어로 똑바로 번역하면 “I we last week went to restaurant to again went”말이다. 한국어가 왼쪽으로 분지 언어라서 문장 중에 왼쪽으로 확대한다! 이렇게 좀 더 쉽게 볼 수 있다: “전 (우리 지난 주에 갔던 식당)에 또 갔어요”. 주제가 “전"이고 동사가 “갔다"이고 목적어가 “우리 지난 주에 갔던 식당"이다. 영어 문장은 오른쪽으로 확대한다: I (S) went (V) to (the restaurant (that we went to (last week))) (O). 그래서 두 숙어 문장 만들고 싶으면 생각속에서도 순서를 변해야 된다. 2. 첫 째 점이니까 다른 사람을 자기 말을 아라들게 하고 싶으면, 충분히...

10 other things South Korea does better than anywhere else

Recently this article about 10 things that South Korea does better than anywhere else  has been making the rounds on social media, but when I first read it, I couldn't tell if it was sincere or satire. A few of the items on the list are not very positive, such as "overworking" and "using credit cards". So, I thought I would try to put together a better list. Here are 10 other things South Korea does better than anywhere else: 1) Small side dishes, a.k.a. " banchan " (반찬) Banchan are by far my favorite aspect of Korean cuisine. Rather than the "appetizer and main dish" approach of the West, a Korean meal is essentially built around small dishes. Even a 5,000 won (about $5 USD) meal at a mall food court will come with two to four banchan in addition to the "main", and often people will actually choose restaurants based  on the banchan (e.g., seolleongtang , or beef bone broth soup, places tend to have the tastiest kimchi). Ther...

"Gangnam Style" English Translation

I finally got around to looking up the lyrics to Psy's "Gangnam Style" last night. I couldn't find any English translations that I liked, so I decided to make my own. Disclaimer: I don't speak Korean. It's not my first language. It's not even my second or third language. But I did used to live in Gangnam, and the Internets abound with dictionaries, so I decided to give it a go. Incidentally, this is also my first foray into Korean-English translation. The translators out there will know - translation is as much art as science. If you translate directly, you end up with overly awkward constructions. But if you vary too much from the direct translation, you risk losing the original intent. So, in some places below, I've taken some poetic license to make the translation sound better. For example, "놀 땐 노는 여자" literally means "a girl who plays when it's time to play", but I changed it to "a girl who knows how to get down"...