Introduction to Erlang : Installing Erlang
- Introduction to Erlang post series
- Introduction to Erlang : Installing Erlang
- Introduction to Erlang : Typing
- Introduction to Erlang : Basic Types (1/2)
- Introduction to Erlang : Basic Types (2/2)
- Introduction to Erlang : Modules & Compilation
- Introduction to Erlang : Declaring Functions
- Introduction to Erlang : Control Flow
- Introduction to Erlang : Recursion (1/2)
- Introduciton to Erlang : Recursion (2/2)
- Introduction to Erlang : BIFs & Predefined Modules
- Introduction to Erlang : List & lists Module
- Introduction to Erlang : List Comprehension
- Introduction to Erlang : Concurrency (Processes)
- Introduction to Erlang : Message Passing
- Introduction to Erlang : Shared Memory Example
About Erlang
Erlang is a functional programming language which has many features more commonly associated with an operating system than with a programming language: concurrent processes, scheduling, memory management, distribution, networking, etc.
The initial open-source Erlang release contains the implementation of Erlang, as well as a large part of Ericsson’s middleware for building distributed high-availability systems.
Installing Erlang
Ubuntu & derivatives
If I am not mistaken, in Ubuntu 10.04+, Erlang system is preinstalled, because it is used by some other subsystems, such as CouchDB database.
In Ubuntu, you can install Erlang from the repositories:
$ sudo apt-get install erlang |
The version installed will not be the latest, but this should not bother you for now..
Building from source
You can download Erlang source from here. Untar the downloaded file, nagivate into the folder and run the configure script:
#you can use the --prefix=/path/to/the/installation/folder #the default is /usr/local/lib/erlang $ ./configure |
If no problems appear, run:
$ make |
and then
#as the root user, or "sudo make install" $ make install |
Windows
Download and run the installer.
Accessing the Erlang Emulator
Erlang Emulator is an interactive shell which you can use to test and run your code.
In order to get access to the emulator do:
Linux, Mac OS X, and Unix
Open a terminal and type:
$ erl |
Windows
You can either click the Erlang icon created by the installer or run the werl
command.
Quit
In order to exit the emulator type
1> q(). |
Programming Editor/IDE
Emacs
I personally use Emacs for programming Erlang. There is an Erlange editing mode in Emacs. In Ubuntu you can install it by:
sudo apt-get install erlang-mode |
Details here.
Erlide for Eclipse
There is an Eclipse plugin supporting Erlang called Erlide. For download and installation details go here.
Others
There are some other alternatives, including a Netbeans IDE plugin. For more details go here.
Documentation
You can access Erlang Documentation online.
What I use the most is the Manual Pages. It is a very useful resource since there are tons of built-in function that will help you avoid reinventing the wheel..
Next
The next post will be about the basic types in Erlang..