Erlang is a soft realtime, declarative, functional programming language for concurrent, distributed systems. It aims to allow for building scalable systems with requirements on high availability. It was designed at the Ericsson Computer Science Laboratory and is open source.
Installing Erlang on Ubuntu 12.04 can be done with apt-get. Simply ssh to your Pod, and run this command:
root@mypod:~# sudo apt-get install erlang erlang-doc
That’s it! Now let’s test that a “Hello, World” application will compile and run.
Using your favorite text editor, save the following to a file named hello.erl:
-module(hello). -export([hello_world/0]). hello_world() -> io:fwrite("hello, world\n").
To compile and run this, we’ll use the erlang shell. Run “erl”:
Inside the shell, you can compile and run by typing “c(hello).” and then “hello:hello_world().”, like this. Remember to include the “.” at the end of each of the two commands:
1> c(hello). 2> hello:hello_world().