
Elixir 1.2.0 Released - sadiqmmm
https://github.com/elixir-lang/elixir/blob/v1.2.0/CHANGELOG.md
======
dv_says
Using Elixir here for a couple of months, for an app backend, and even for
shell script type of projects. Great language, no surprises, and very
responsive community -- really, my biggest wish is for more people to try it,
as I think it's still relatively niche. Had no previous Erlang experience.
While you don't have to write Erlang code itself, you'll over time become
familiar with Erlang/OTP architecture concepts, such as GenServer, ETS,
distributed nodes, and so on.

Was very happy to see this recent post from Pinterest [1] as a sign that some
of the more "mainstream" teams are starting to look at it.

Also, a repost [2] of some helpful tips if you're just getting started.

[1] [https://engineering.pinterest.com/blog/introducing-new-
open-...](https://engineering.pinterest.com/blog/introducing-new-open-source-
tools-elixir-community)

[2]
[https://news.ycombinator.com/item?id=10278870](https://news.ycombinator.com/item?id=10278870)

------
quaunaut
How ironic, I was wondering just last night when 1.2 would be released.

I'm a newcomer to Elixir, and have really been enjoying it. As a
Python->Rubyist, it's been really interesting to finally hit a functional
language, and some of Elixir's most basic features just seem crazy in
comparison to what I've come from. Some neat examples:

* Pattern Matching. In other words- you don't assign things to variables, you match things. Elixir/Erlang is just doing algebra behind the scenes. I'm sure this is a gross simplification, but it's enabled me to write some really condensed code that still makes a bunch of sense.

* Streams. I know Node developers would laugh at this being a new concept, but I hit Streams when I was doing Node, and I didn't get it. Streams in Elixir feel much more self-evident, and feel much easier to read.

* The Pipe Operator( |> ). This effectively lets you simplify code by just passing results from one thing to the next. For example(taken from the excellent "Programming Elixir" by Dave Thomas):

$ (1..10) |> Enum.map(&(&1*&1)) |> Enum.filter(&(&1 < 40))

=> [1, 4, 9, 16, 25, 36]

So there, it takes the 1..10 range, maps the squares of each element to an
array, then filters the array to just the elements that are less than 40.

It's a surprisingly enjoyable language to program in, and best of all coming
from a Rubyist- the performance gains are automatic, especially once you grok
some of Elixir's crazier(but easy to understand) powers.

\-----

The other thing I really like about it, is how friendly the community seems. I
feel personally predisposed toward extremely friendly communities- Ember.js
was the first community that made me feel like I had a home- and the care with
which Jose Valim and the core team treat people, and the general "Give back
everything you can" attitude of the community is really just inspiring.

My newest side project was something I dropped because I thought that the
hardware necessary would make it not worth the effort of building it, but now
I have complete confidence in it.

I encourage you to take a shot at it if you're looking for a fast, functional
language with a clear syntax and easymode concurrency.

~~~
Spiritus
Not knowing Elixir at all, what's with all the & operators in your pipe
example? Looks very unappealing to me.

~~~
jeremyjh
This is a shorthand for writing anonymous functions. The &() activates the
feature for the expression inside, which can then use &1, &2 etc to apply
parameters.

For example `&(&1 + 1)` is equivalent to `fn x -> x + 1 end` .

------
lectrick
Just want to chime in reiterating everyone's thoughts already here that this
language is fun, interesting, and worth your time investment to investigate.

The biggest hurdles I had coming from OO Ruby were 1) how to handle state,
since you no longer can just hang information off any arbitrary object
attributes, 2) pattern matching (but now that I grok it, I love it, it's so
useful and leads to more concise code), 3) lack of inheritance (although
oddly, I don't seem to miss it, it just leads to a somewhat different code
design), 4) OTP semantics (which after you mount the learning curve, make a
lot of sense from a resiliency standpoint).

There are a number of neat little details not yet mentioned or emphasized here
such as full Unicode support, full-fledged macros that give you full AST
access (in a non-homoiconic language, that is a rarity!), custom sigils
([http://elixir-lang.org/getting-started/sigils.html](http://elixir-
lang.org/getting-started/sigils.html)), the ability to easily call into any
Erlang library, the fantastic :observer.start() utility for visually observing
tons of details about a running pid hierarchy, etc.

One possible hurdle unique to languages that feature message passing between
independent processes (pids or process id's) as a core feature is that once
you have a pid hierarchy, it seems to me that inevitably, one of them will get
a backlog of messages requiring you to either apply back-pressure techniques
(slowing down upstream synchronous messaging by slowing down replies,
basically) or pursue some other strategy (code refactoring etc.) when messages
start to get discarded under load due to overflowing the pid inbox.

~~~
simoncion
> the fantastic :observer.start() utility for visually observing tons of
> details about a running pid hierarchy, etc.

observer is a _rather_ nice tool. It is, -however- not an Elixir feature, but
is something that ships with Erlang. [0] As you mentioned, you can call any
Erlang code in Elixir (and vice-versa!). IIRC, you do the former by prefacing
the Erlang code with a ":". So, ":observer.start()" would be written in Erlang
as "observer:start()" and do exactly the same thing. :)

[0] Not that you _claimed_ that observer was an Elixir invention, mind. The
whole point of this comment is to point out how easy Erlang <\--> Elixir
interop is. :)

~~~
lectrick
Yes to all of the above :)

------
szx
I'd be curious to hear some criticism, negative experiences, downsides from
people with deeper experience. This thread is 100% positivity and praise,
which is highly unusual for HN (New Year's afterglow??)

To be clear, my occasional dabbling in Elixir has yet to reveal any major
shortcomings so this isn't an elephant in the room kind of situation, just a
genuine request from people whose thoughtful opinions I generally appreciate.

~~~
gleb
We are rewriting an internal Rails application in Elixir as a test project. I
like what I see so far. Elixir/Phoenix promise it to be like Rails but 10x
faster with 1000x less memory use and better concurrency. Our preliminary data
is that it does deliver that.

But there are definitely problems.

The only one that really concerns me is Ecto and its integration in Phoenix.
It makes simple things hard and hard things impossible.

More generally, I don't get the feeling that Phoenix was "extracted from a
production web app" like Rails was. With Rails you knew there was at least one
app, Basecamp, that worked on top of it. With Phoenix I am not so sure. This
is a very preliminary opinion, but first impressions matter.

This specifically applies to Ecto and it's Phoenix integration. The rest of
Phoenix seems perfectly nice, and fixes a lot of Rails' warts.

The rest of downsides are not a big deal, and time will fix them:

There is no installed base to speak of. You'll be the first one to run into
many problems. 3rd part libraries are not there/not mature. It's missing a lot
of basic scripting language functionality (e.g. wrappers over libc functions).
Some code comes out verbose and hides the intent (though most of it is
surprisingly nice, often as good or better than Ruby).

~~~
josevalim
I would love to hear more about the Ecto/Phoenix integration and what feels
hard and what feels impossible. Feel free to shot me an e-mail or ping me on
IRC.

~~~
gleb
Email WIP.

~~~
gleb
Email sent.

------
troyk
Wow, already home brewed too! (OSX users can upgrade with `brew update && brew
upgrade elixir` and it just magically works -- because awesome people have
made it so)

What a great way to ring the new year! Happy New Year everyone!

~~~
innocentoldguy
You might want to try kiex? It is similar to Ruby's rvm or Node's nvm for
Elixir.

[https://github.com/taylor/kiex](https://github.com/taylor/kiex)

------
desireco42
This is the best New Years gift I could hope for! :) I've been using and
slowly switching towards Elixir for last few months. It is fun, refreshing,
enjoyable to work with and community is very welcoming and pleasure to be part
of.

~~~
desireco42
Having said all this, still enjoy Ruby as much as always.

------
bratsche
There are two _really_ great additions to Elixir 1.2: multi-alias, and
matching variables in map keys.

Previously I found myself wanting to alias a lot of things, like:

    
    
        alias Foo.User
        alias Foo.Email
        alias Foo.Location
    

Now with multi-aliasing I can do it all in one line:

    
    
        alias Foo.{User, Email, Location}
    

That's just a cool syntactic sugar kind of thing that maybe saves a few lines
at the top of the file. But the map key matching is great, and something that
I've frequently missed up until now.

------
imranismail
> Support for variables in map keys

Been waiting for this. To those that have not tried Elixir. I urge you to try
it, it's a fun experience

------
chippy
In today's Who's Hiring thread, there is only one mention of "elixir". I quite
like that as Elixir still has the aura of something new for its own sake with
the type of people that this attracts.

~~~
adambrod
My company will be hiring soon and is using Elixir for backend services.
Knowing Elixir is just a plus and any competent engineer can pick it up in a
week.

However, finding Elixir jobs is harder if you're the seeker... I agree.

------
frik
Can someone recommend me a community/forum that centers around Elixir? (for
Elixir/Erlang beginner)

~~~
nicksergeant
The Slack community is very active: [https://elixir-
slackin.herokuapp.com/](https://elixir-slackin.herokuapp.com/)

~~~
frik
I would favor a forum/board with topics over an chat (IRC/slack - very time
consuming). As a last resort I could also use their mailing list.

~~~
djKianoosh
besides irc/slack it seems what you're lookinn for is a combo of stackoverflow
and the google group.

I think agree with you though, there's something missing without an organized
forum/board, not elixir specific, just overall in our lives ;)

------
jbeja
Since elixir is base on Erlang, it would have the same Repl workflow that you
would find in Clojure?

~~~
siscia
Almost, you definitely have a nice REPL however I find the workflow of Clojure
way better.

The problem I think lays on the fact that Clojure group function inside very
flexible namespace, while Elixir use more rigid modules.

However in my limited experience the way you code Elixir feels very different
from the way you code Clojure.

It's difficult to explain, but I would say that I follow more my gut while I
code Clojure and more reflexive while I code Elixir, the code in Clojure
__support __concurrency and parallelism, while in elixir concurrency is the
norm... Not sure if I was able to explain it...

Both wonderful languages anyway.

~~~
iso8859-1
> the code in Clojure support concurrency and parallelism, while in elixir
> concurrency is the norm

This makes little sense to me. You feel it is the norm in both?

If you are unsure if a post is readable, why not just rewrite it?

~~~
simoncion
> If you are unsure if a post is readable, why not just rewrite it?

One can grapple with several ways to express something, and be unsure which
one is the best. Sometimes just publishing is better than being forever stuck
in an indecision loop. :)

The questions that arise from the confusion can tell you how to better
structure your words.

~~~
siscia
Wise words, thanks :)

