

Elixir Design Goals - duggieawesome
http://elixir-lang.org/blog/2013/08/08/elixir-design-goals/

======
ekidd
I just started playing with Elixir this weekend, and it was a ton of fun. Ruby
syntax + macros + Erlang semantics + UTF-8 strings is a great combination. And
the _Programming Elixir_ book from Pragmatic Press was a good introduction,
too.

But I especially enjoyed Erlang's concurrency model and OTP. In a few hours, I
was able to go from basic message passing, to a simple OTP server, to
distributed processes communicating between multiple VMs, and finally to a
supervised OTP server with automatic restart on crash. Erlang provides an
awful lot out of the box, and Elixir makes it quite friendly-looking.

However, it's not a mature environment yet. The tools are pretty good for a
young language, but the ecosystem is still small. Nonetheless, there's some
cool stuff out there already:

Experimental web framework: [https://github.com/elixir-
lang/dynamo](https://github.com/elixir-lang/dynamo) Mnesia distributed DB
wrapper: [https://github.com/meh/amnesia](https://github.com/meh/amnesia)
Heroku buildpack: [https://github.com/goshakkk/heroku-buildpack-
elixir](https://github.com/goshakkk/heroku-buildpack-elixir)

I'll need to build a larger system in Elixir, but the my initial impressions
are good.

~~~
tomp
Can I ask you, where did you learn OTP? Did you know it from before, did you
follow a specific book/tutorial? I've been interested about OTP, and would
appreciate a good starting point.

~~~
ryeguy
The Learn You Some Erlang tutorial[1] gives a good introduction. There's also
Erlang and OTP in Action[2].

[1]:
[http://learnyousomeerlang.com/content](http://learnyousomeerlang.com/content)

[2]: [http://www.amzn.com/1933988789](http://www.amzn.com/1933988789)

~~~
jasonwocky
Erlang and OTP in Action goes pretty deep into it.

------
rdtsc
Oh man, I love BEAM VM's design. Just looking at memory allocators, handling
iolists, binary blob referencing, schedulers spread over all the CPUs, async
IO threads. Just discovering that I found myself nodding my heading often say
"aha, that's a really good way to do it".

It is good to see Elixir work on it alongside Erlang. I don't think everyone
will jump ship to Elixir. For example I like Erlang's syntax (I might be in
the minority) but meta-programming and ease of access to BEAM for newcomers is
great.

------
gordonguthrie
Having been a bit of an 'Erlang is quite good enough' purist, I am becoming
increasingly tempted to give Elixir a whirl.

I am a long term hater of Javascript (global state, aargh!) and I have been
giving coffeescript a whirl (no global state, yay!).

One of the (unexpected) side effects is that I appreciate the readability of
coffeescript vs javascript much more than I expected.

Jose Valim is also giving a talk at a conference I am organising next month
([http://mostlyfunctional.com](http://mostlyfunctional.com)), so I am tilting
heavily at the moment...

~~~
zimbatm
I think you meant ClosureScript. CoffeScript is mostly a syntaxic decoration
over JavaScript and doesn't remove mutability.

~~~
awj
Pretty sure he meant CoffeeScript. It doesn't remove _mutability_ , but it
does do away with default-global variables.

~~~
masklinn
So does javascript unless you forget `var` _and_ you refuse to `"use strict"`
and lint.

~~~
steveklabnik
That's not really 'by default' then, eh?

~~~
masklinn
True, it's not the language's default, just the default your environment
should have (and the default of any sane IDE).

Which is less work than adding coffeescript to your toolchain.

------
bryanwb
I couldn't be more excited about elixir, personally. All the power of erlang
plus metaprogramming. To me elixir is the spiritual heir to Ruby

~~~
alixr
As someone who's just started with Ruby/Rails what are the benefits of
switching to Elixir?

~~~
e_proxus
If you're going to write websites, stay with Rails. I'm a long time Erlang
developer and even today there is no good web framework (sure, a few exists,
but none of them make it as pleasant to develop websites as Rails).

If you're going to write a server application, even REST and HTTP, Erlang and
Elixir is a superb choice (I would argue better than Ruby with Sinatra, for
example) because of the concurrency model and the ability to handle protocols
and binary data.

There are also a few nice template libraries for Erlang (for example
[https://github.com/mojombo/mustache.erl](https://github.com/mojombo/mustache.erl))
so if you just need some templating and don't mind writing some glue yourself
it could still be a good option.

~~~
davidw
In terms of frameworks, no, nothing competes with Rails because Rails is
simply too big an ecosystem to compete with on even terms for a relatively
niche language. Chicago Boss is pretty nice, with a very friendly community,
though. It's worth a look.

------
616c
To be honest, I got very interested in Elixir myself. However, as I am trying
to learn any Lisp, I am surprised LFE (Lisp for Erlang) or Joxa has not taken
off, as the one thing missing from a lot of Lisp and Scheme languages seems to
be a thread-based concurrency, specifically for multi-core processors having
become ubiquitous.

~~~
adambard
There's always Clojure for that.

~~~
616c
"Why do Erlang and Elixir have the same 'semantics'? The reason has to do with
the underlying machine. The garbage collection behavior, the non-shared
concurrency model, the underlying error handling and code loading mechanism
are identical. They must be identical: they run on the same VM. This is also
why things like Scala and Akka will never be like Erlang. Scala and Akka run
on the JVM so under the covers, things like garbage collection and code
loading are fundamentally different." [0]

It goes without being said, but the choices the VM make will ultimately impact
what is or is not possible for the languages on top of it. I have never taken
the time to investigate JRuby or IronPython, but I have imagined this is a
reason why few people love the original and VM-ported editions: one must
assume Ruby code becomes less Ruby, Python less Pythonic, once moved to
different VM architecture.

[0] [http://joearms.github.io/2013/05/31/a-week-with-
elixir.html](http://joearms.github.io/2013/05/31/a-week-with-elixir.html)

------
rjsamson
I've spent the past few weeks writing quite a bit of Elixir, and I have to say
that I haven't had this much fun with a programming language in a long time.

------
rramsden
Finished writing my first elixir library a few days ago
[https://github.com/rramsden/scribe](https://github.com/rramsden/scribe)

The language source code is incredibly clean and well documented. It's been a
joy to work with so far.

~~~
616c
Seems like some cool, clean code, and I understand without having examined
Elixir too much, less than two or three hours of doc scanning. But I guess
familiarity with Ruby does make a difference.

Out of curiosity: if you are doing DB migrations, what are you running on
Elixir that requires it? You building web apps or just utilities running on
top of a DB?

------
rybosome
I'd love to know what James Hague
([http://prog21.dadgum.com/](http://prog21.dadgum.com/)) thinks of Elixir.
Erlang is one of his stronger languages, and he's written a lot of articles in
the past that I really enjoy.

