Professional Documents
Culture Documents
Introduction - Elixir
HOME
INSTALL
GETTING STARTED
LEARNING
DOCS
BLOG
PACKAGES
Introduction
1 Installation
2 Interactive mode
3 Running scripts
4 Asking questions
G ETTI N G ST A RTED
1. Introduction
2. Basic types
Welcome!
3. Basic operators
4. Pattern matching
In this tutorial we are going to teach you the Elixir foundation, the language
syntax, how to define modules, how to manipulate the characteristics of
common data structures and more. This chapter will focus on ensuring Elixir is
installed and that you can successfully run Elixirs Interactive Shell, called IEx.
8. Modules
9. Recursion
Ifyoufindanyerrorsinthetutorialoronthewebsite,please
reportabugorsendapullrequesttoourissuetracker.
Installation
If you still havent installed Elixir, run to our installation page. Once you are
done, you can run elixir -v to get the current Elixir version.
17. Comprehensions
18. Sigils
19. try, catch and rescue
20. Typespecs and behaviours
21. Erlang libraries
Interactive mode
When you install Elixir, you will have three new executables: iex, elixir and
M IX A N D OTP
elixirc. If you compiled Elixir from source or are using a packaged version,
1. Introduction to Mix
2. Agent
http://elixir-lang.org/getting-started/introduction.html
1/3
3/8/2016
Introduction - Elixir
For now, lets start by running iex (or iex.bat if you are on Windows) which
stands for Interactive Elixir. In interactive mode, we can type any Elixir
expression and get its result. Lets warm up with some basic expressions.
Open up iex and type the following expressions:
3. GenServer
4. Supervisor and Application
5. ETS
6. Dependencies and umbrella
apps
It seems we are ready to go! We will use the interactive shell quite a lot in the
next chapters to get a bit more familiar with the language constructs and basic
types, starting in the next chapter.
S PON SORS
Running scripts
After getting familiar with the basics of the language you may want to try
EL IX I R RA D AR
below.
Elixir
Radar
weekly
$ elixir simple.exs
Subscribe
now
newsletter
Later on we will learn how to compile Elixir code (in Chapter 8) and how to use
the Mix build tool (in the Mix & OTP guide). For now, lets move on to Chapter
2.
Asking questions
http://elixir-lang.org/getting-started/introduction.html
2/3
3/8/2016
Introduction - Elixir
When going through this getting started guide, it is common to have questions,
after all, that is part of the learning process! There are many places you could
ask them to learn more about Elixir. The official places are:
#elixir-lang on freenode IRC
elixir-talk mailing list
However there are many places operated by the community, such as:
Elixir on Slack
elixir tag on StackOverflow
Elixir Forum
When asking questions, remember these two tips:
Instead of asking how to do X in Elixir, ask how to solve Y in Elixir. In
other words, dont ask how to implement a particular solution, instead
describe the problem at hand. Stating the problem gives more context
and less bias for a correct answer.
Next
http://elixir-lang.org/getting-started/introduction.html
3/3