

Elixir 0.7.1 — A meta-programmable language built on the Erlang VM [video] - devinus
http://elixir-lang.org/blog/2012/11/18/elixir-v0-7-1-released-and-the-end-of-a-journey/

======
acron0
I've always thought the potential for Erlang technology in game servers is
huge (as demonstrated in PikkoTekk - <http://muchdifferent.com/?page=game-
pikkotekk>). Hopefully, _hopefully_, Elixir will go a long way to reducing the
perceived barrier.

------
codewright
People seem to mention Elixir a fair amount, but I haven't heard of anybody
building anything with it.

One concern: Is it even slower than Erlang itself usually is?

~~~
devinus
Negative. Elixir should be no slower than Erlang as it uses the same data
types as Erlang. Elixir tuples are Erlang tuples, Elixir function calls are
Erlang function calls, etc.

In practice, you may find that your Elixir code is even faster than the
equivalent code you might write in Erlang. Elixir encourages some things like
compiling some logic _into_ your modules. For example, Dynamo compiles routes
so they're super fast. String.Unicode is compiled from the UnicodeData.txt
database itself[1].

[1]: [https://github.com/elixir-
lang/elixir/blob/master/lib/elixir...](https://github.com/elixir-
lang/elixir/blob/master/lib/elixir/priv/unicode.ex)

~~~
codewright
Okay, if I wanted to get started writing a webapp in Dynamo using Elixir, how
do I start?

I looked at the GitHub repo and there didn't seem to be much.

All I could find was:

[https://github.com/josevalim/dynamo/blob/master/examples/sim...](https://github.com/josevalim/dynamo/blob/master/examples/simple.exs)

Can I mix a websockets server into a Dynamo app? Websockets are a key use-case
for Erlang for me.

I've been looking into how to do a WS server on Erlang and this was the most
modern example I could find:
[https://github.com/ostinelli/misultin/blob/master/src/misult...](https://github.com/ostinelli/misultin/blob/master/src/misultin_websocket.erl)

To be frank: pretty fucking gnarly.

~~~
nirvana
Dynamo seems to be still pretty early in development. You might want to watch
the video linked to the page from the 0redev conference. He doesn't talk about
dynamo much, but he does give "2013" as the date for Dynamo.

On the WebSockets issue, I'd check out Cowboy. Cowboy seems to be the new
hotness in erlang web apps. It has at least some support for web sockets.

<https://github.com/extend/cowboy>

If you're looking for a full featured web framework with built-in web socket
support then maybe what you really want is Nitrogen:
<http://nitrogenproject.com>

Finally, and just for completeness, since I'm mentioning web frameworks,
you'll probably want to see what ChicagoBoss's WS story is:
<http://www.chicagoboss.org> or if someone's done something with WebMachine
and websockets: <http://basho.com>

I think Nitrogen sounds like the best bet.

Since Elixir seems to mix effortlessly with Erlang, you should be able to
write your code in Elixir using any of these frameworks.

~~~
codewright
I usually really don't like huge web frameworks like Nitrogen. I'll take a
look though.

Edit:

Took a look at the documentation. You couldn't pay me to touch Nitrogen.
Hopefully Cowboy turns out to be more promising. I'm already familiar with CB.

------
nivertech
It would be much safer for me to adopt Elixir if there was elixir2erlang
source to source compiler, which produces readable Erlang code.

This is what makes adoption of CoffeeScript and TypeScript no brainer - you
can always get back to plain readable JavaScript.

~~~
yrashk
This is a _somewhat_ close possibility barring comments, as elixir produces
erlang AST.

However, the AST it produces won't be perceived fully idiomatic style-wise
(because of how some macros expand) so there might be not much value in this.

Also, without Elixir stdlib, such compilation would be useless as idiomatic
Elixir normally includes use of Elixir stdlib.

For me, what makes it safe to adopt Elixir is the fact that worse comes to
worse, I still have my .ex sources, they compile to valid beams, why should I
care?..

~~~
nivertech
I care about unlikely, but still possible case, when Elixir tools like
compiler and libraries, stopped to be supported, while standard Erlang VM and
tools continue to evolve.

Hope to give it a try for smaller project.

~~~
josevalim
Today you can compile Elixir source code using --debug-info as an option. Then
you would be able to retrieve the abstract format from beam files and write
your own code that converts abstract format to erlang source. It is definitely
doable and I wouldn't be surprised if someone already did it.

------
nnq
..cool new language

...if only it allowed _monkey patching_ and, bien sur, _refinements_ to make
them "manageable" :(

</sarcasm>

------
z3phyr
The look and feel is similar to ruby!

------
D9u
Does anyone remember the old Xerox "Elixir" typesetting app?

------
nirvana
I've just recently started working with Elixir for a major project. I actually
like the Erlang syntax so don't need Elixir for the syntax, but for some other
features that are useful for me.

The community around Elixir is small, but VERY good. Jose Valim is the kind of
person who is an ideal community leader, and thus it's great to have him
leading this effort.

This is the language that _should_ be getting rockstar status (not
Coffeescript, etc.)

Real erlang concurrency + the features Elixir offers makes it unbeatable.

Of course, I admit, I'm still in the "honeymoon" period with the language, so
this could be hormones talking.

~~~
nirvana
Also, if you watch the video, at about the 30 minute mark he does a demo
writing code on the spot... it's pretty cool.

Also, props to yrashk (HN handle) - part of why the elixir community rocks.

