Elixir - DailyTrip [001.1] INTRODUCTION TO ELIXIR

What is Elixir and why are you interested in learning it?

In general, I find Elixir interesting for three reasons:

  • I find the Actor Model of computation very compelling, and Erlang's where it has had the most time to develop.
  • Since it's built upon the Erlang VM, you can use it to write extremely reliable, distributed, concurrent systems.
  • I find the syntax pleasant, and the tooling outstanding.

Erlang

Install Erlang

I personally like to be able to easily run different versions of my programming languages, and for this I use the asdf version manager.

You can install asdf by cloning it into ~/.asdf:

# Feel free to check for a new version, but v0.2.1 is the latest as of this
# writing.
git clone https://github.com/asdf-vm/asdf.git ~/.asdf

Then, you can read README.md of the .asdf , and continue to instal Erlang and Elixir.

Verifying your Erlang installation

> $ erl
Erlang/OTP 21 [erts-10.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Eshell V10.0.4  (abort with ^G)
1> 

Elixir

Install Elixir

Also , we install Elixir with .asdf.

Firing up iex

> $ iex
Erlang/OTP 21 [erts-10.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Interactive Elixir (1.7.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 

Just press Ctrl+C twice to close the shell out. You can also exit the shell by pressing Ctrl+\ if you want a single keystroke :)

Summary

Today, we walked through installing Erlang and Elixir. I've added some links in the resources section to encourage you to get involved in the community. See you soon!

Resources

  • The Erlang website
  • The Erlang Solutions download page
  • The Elixir website
  • The Elixir downloads page
  • The asdf version manager
  • asdf-erlang
  • asdf-elixir
  • IEx documentation
  • Quitting IEx

Where can you get more help with Elixir?

  • The #elixir-lang IRC channel on FreeNode
  • The elixir-lang Slack is extremely active.
  • The Elixir Forum
  • The Elixir Website is very well done and has lots of nice information.
  • The DailyDrip Elixir Topic
  • I'm always in the DailyDrip Slack, as are other DailyDrip subscribers that are glad to be helpful.
  • Elixir School

你可能感兴趣的:(Elixir - DailyTrip [001.1] INTRODUCTION TO ELIXIR)