
Elixir 1.5 released - eugene_pirogov
https://github.com/elixir-lang/elixir/releases/tag/v1.5.0
======
josevalim
Official announcement: [https://elixir-
lang.org/blog/2017/07/25/elixir-v1-5-0-releas...](https://elixir-
lang.org/blog/2017/07/25/elixir-v1-5-0-released/)

We have published a draft version of the announcement since the release notes
are not super helpful for those unfamiliar with Elixir. Is it possible to
update the link to the official announcement? Thank you!

EDIT: We are done with the changes on the draft. We've added asciicinema
snippets to show some features, improved the section on Calendar changes and
also mentioned the compilation time improvements (expect at least 10% faster
compilation).

~~~
qaq
Thanks you and all team members for amazing work! Elixir is truly a breath of
fresh air it's really painful to go back to node at work :)

------
FlyingSnake
Elixir is truly an under-appreciated language. I've only toyed with it, and
I'm really impressed with the whole ecosystem. Elixir, Phoenix, Ecto, Hex, etc
all make a great ecosystem, and the awesomeness that is BEAM/OTP is just
amazing. I loved the hot code deploys, and updating a system while it's
running is something I've never seen before in action. Also Rustler is a great
way to write CPU intensive NIF code too.

~~~
raphy
I wonder how the popularity trend of Elixir has been lately. I know you can
try to see it through GitHub or Google Trends, but as many members of the
Elixir community use Slack I don't know if it's the best way to do it. One
thing I'd like to see would be the evolution of downloads of the language and
on Hex.

~~~
sotojuan
It's got HN hype and a lot of the negatives that come with that (awful
learning materials by people who haven't used it in production) and a decent
amount of real world use though nothing major for now.

~~~
lukeasrodgers
I believe Discord uses Elixir, and I think that counts as "major."

~~~
oomem
Yes, and they wrote some interesting blog posts about it:

[https://blog.discordapp.com/scaling-
elixir-f9b8e1e7c29b](https://blog.discordapp.com/scaling-elixir-f9b8e1e7c29b)

[https://blog.discordapp.com/how-discord-handles-push-
request...](https://blog.discordapp.com/how-discord-handles-push-request-
bursts-of-over-a-million-per-minute-with-elixirs-genstage-8f899f0221b4)

------
deedubaya
I highly recommend playing with Elixir or another purely functional language.
I've only gone through the Programming Elixir book[1], but it has
fundamentally challenged how I think about solving problems in other
languages.

[1]([https://pragprog.com/book/elixir13/programming-
elixir-1-3](https://pragprog.com/book/elixir13/programming-elixir-1-3))

~~~
pmarreck
Beware, because it can make you hate your current day-job language

~~~
banachtarski
Not for me. I've gone back and forth between projects that required functional
languages, and projects that didn't across different companies. Bad code is
bad code no matter what language it's written in. What makes me love my day
job is whether I have the ability to make it better, and if those that work
with me are aligned in wanting to do so.

I think practitioners of functional languages get a little preachy when
really, exposure to functional languages should just be assumed to be part of
the basic training of any engineer. It's a tool and as good as it is for some
things, it's absolutely awful for others.

~~~
pmarreck
What are functional languages, as a group, "absolutely awful" at?

~~~
banachtarski
Low level code. Drivers, interfacing on COM/serial/USB ports, graphics
programming or anything that requires more finely tuned data structures you
have to manage yourself, low latency work where you can't afford to have a
random GC happen at a bad point in the run loop...

Lots of things.

------
Existenceblinks
It's a fast-paced development! That's pretty great. I hope core team would
consider slowing down a bit and catch up with Deployment, Monitoring(which
Phoenix team working on it) and Platform(e.g. http/2) departments.

v1.5 seems to have a bunch of bug fixes and deprecation (Hah! I'm not sure if
it's like move fast and break thing). It is potentially the case.

In every important part, there seems to have a solo smart person working on
it. E.g. Cowboy(I know it's erlang but Phoenix depends on it significantly),
Distillery. That could be a good thing. Less people may catch up with each
other faster. It also mean a load of works! And also mean some convention are
out of sync (e.g. configuration which I think Conform is the proper way
lately)

~~~
pmontra
Yep, I just finished to setup a build and deploy system for Phoenix using
edeliver and it's definitely not nice. A bunch of files in different
languages, it feels unnecessarily hard. I hope that'll put some effort in
that.

~~~
pmarreck
I host the production site I'm working on at Gigalixir[1] (with the postgres
DB in Google Cloud) and it's been pretty sweet. Deploys have been trivial (the
way they should be, if you aren't interested in also becoming a devops
expert). Jesse Shieh is extremely responsive and a committed founder. Unlike
Heroku, Gigalixir does not restart its servers nightly, which is very relevant
if you store any state app-side (such as a cache).

[1] [https://gigalixir.com/](https://gigalixir.com/)

~~~
udfalkso
I wasn't aware of Gigalixir, thanks for mentioning that. Looks very promising.

I've been hosting my site at [https://clever-cloud.com](https://clever-
cloud.com) with good results. I've been using Docker there but they just added
beta Phoenix support which makes it really easy. They're French, and I'm in
the US. So there have been time zone issues and support has been a bit
lackluster at times, but generally they've fixed all the issues I've brought
up and have been responsive. Price is right.

------
pjungwir
Can anyone doing Phoenix in production share their typical HTTP response
times?

I built a small Phoenix project about a year ago, and compared to Rails it
wasn't quite as fluent but still pretty nice. But ever since then, I've been
trying to decide if the extra development time is worth it for the performance
gains. I get that Elixir is more scalable, and I love how the RAM requirements
compared to Rails are tiny, but what I still haven't been able to really
answer is the latency improvement. According to these benchmarks it is about
as fast as Django:

[https://www.techempower.com/benchmarks/#section=data-r14&hw=...](https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=query&b=2&s=1&l=sg&d=1n)

Is that really the best I can hope for?

~~~
chrismccord
Phoenix creator here. The techmeme results are not representative of the
framework. Several months ago they added Phoenix in a preview, but it was a
very poor implementation. They were testing JSON benchmarks through the
:browser pipeline, complete with crsf token generation. They had a dev DB pool
size of 10, where other frameworks were given of pool size of 100. And they
also had heavy IO logging, where other frameworks did no logging. We sent a PR
to address these issues, and I was hoping to see true results in the
subsequent runs, but no preview was provided this time and we weren't able to
work with them on the error rate issues they ran into. After these experiences
we've decided the core-team's time is better spent on the framework than
chasing techmeme issues. If you go by real-world success stories from
companies switching from Django, Rails, etc, you can certainly expect much
better.

~~~
awj
> The techmeme results are not representative of the framework.

I've seen several instances of this, now. Some Rails benchmarks jumped up
pretty high as well when they managed to get someone to competently configure
Puma. Practically the same story, just changing out names.

Take techempower benchmarks with a boatload of salt. Not only are they not
particularly representative of your real world use cases, they apparently are
often not representative of competent use of the tools they're benchmarking.

Hopefully this is an issue the techempower people figure out some way to
address. It would be nice if this was a more trustworthy resource.

------
artellectual
I think this is the best news all week! Congrats to the Elixir team. I love
working with Elixir. Hopefully I will be able to contribute to the ecosystem
soon. Excited about the future.

------
nichochar
There's quite a few nifty little things in this one.

I'm not sure I like the child_spec change, personally I like the supervision
mode to be explicit when calling children.

I do like the developer tools, the breakpoint support, the UTF8 for atoms
(which I'm realizing we may want in our DSL since we're converting user input
strings to atoms), and the @impl that allows to explicitly declare which
functions are there for an interface.

Overall, it's amazing to be part of the elixir community, rarely have I seen
such emulation, positivity, speed of growth, and effectiveness achieved so
fast for a language. Congrats @josevalim for bring the power of BEAM through a
wonderful syntax!

~~~
_untra_
> which I'm realizing we may want in our DSL since we're converting user input
> strings to atoms

careful there. Theres a hard limit on the number of atoms that can be created
in an environment, and serializing user input to atoms can get dangerous

~~~
velzevur
also not being garbage collected...

~~~
latch
String.to_existing_atom/1 is helpful.

[https://hexdocs.pm/elixir/String.html#to_existing_atom/1](https://hexdocs.pm/elixir/String.html#to_existing_atom/1)

------
stefanchrobot
Congrats on the new release! While this is all great news, it's still quite
hard to get a full-time Elixir job outside of US. Kind of like staring at the
candy shop display while it's closed. I'm wondering how to make this happen.
I'm in a place where Elixir is just not going to happen and seems unreasonable
to expect that I'll be able to convince people to switch to it right after
joining a new place. Seems like the only option is to find spare time for
playing with Elixir, but that proved to be difficult when I need to invested
time in a different stack that actually helps me pay the bills.

~~~
rehemiau
You should keep checking out the forum[1] for remote work opportunities. And I
don't think it's that hard, I just got a job in Europe in elixir ;)

[1]([https://elixirforum.com/c/elixir-jobs](https://elixirforum.com/c/elixir-
jobs))

~~~
stefanchrobot
The job offers are not that often, so I guess you've beat everybody, myself
included, with production experience.

------
sergiotapia
I haven't had this tingly feeling since when I first used Ruby/Rails 2. Elixir
is growing and setting the bar of what "developer ux" means.

mix test mix docs Genserver Pattern matching

The list goes on, you find yourself in The Zone more often.

~~~
sb8244
I totally agree with this. I feel like it makes me think differently about my
programs in a way that I haven't before. It's really enjoyable.

------
alberth
I would love to see these 2 year old performance benchmarks updated where
Elixir scaled to 2m connection on a single node.

[http://www.phoenixframework.org/blog/the-road-
to-2-million-w...](http://www.phoenixframework.org/blog/the-road-to-2-million-
websocket-connections)

------
s0l1dsnak3123
Congrats to the Elixir core dev team for another fine release. The
improvements to iEX's debugging capabilities are going to make a big
difference to day-to-day developer UX. Thanks!

------
mrmicahcooper
What an amazing release! I've never been as excited about a language and its
ongoings as I am with Elixir. Thank you Elixir team for creating such a great
language and making all of your work so accessable, transparent, and friendly.

Well done!

------
fnordsensei
What frontend stack fits Elixir most symmetrically? Is there a "ClojureScript"
to Elixir's "Clojure"?

~~~
Dangeranger
Elm works very well with Elixir[0]

[0] [https://www.dailydrip.com/topics/elixirsips/drips/phoenix-
an...](https://www.dailydrip.com/topics/elixirsips/drips/phoenix-and-elm)

~~~
EduardoBautista
In what way does Elm work better with Phoenix than, say, with Rails or Django?

~~~
Dangeranger
For me it was that the mindsets of Elm and Elixir were very similar. Create
small functions that accept data, and emit data, sometimes create a message
with some data attached to it. Using pattern matching is very similar between
both languages for matching on message types and shape. Also both languages
share a nearly identical pipe operator, which influences the building of very
strait forward function pipelines for transforming input or data into
responses and output.

------
raphy
Great news, all those debugging improvements look great. I was actually
considering how break points would help me on my current debugging.

I've been using Elixir for almost two years now and it's no silver bullet, but
overall it has been a really great experience.

------
cooervo
Good news from elixir and erlang

------
olavolav
That, great news, I'm especially curious about this line here:

[ExUnit] Show code snippet from test source file in case of test errors

ExUnit backtraces have historically been a bit hard to read sometimes IMHO.

~~~
josevalim
This line is about showing a snippet of the test when a test fails. We did
this before but only for assertions.

I am afraid this change will not improve the qualify of the stacktrace itself.

If you run into a situation where the test report is less than ideal, please
open up an issue so we can discuss if there is something that can be done
about it.

------
saurik
"Using () to mean nil is deprecated" <\- interesting.

~~~
whitepoplar
I'm just starting to use elixir and I'm curious, when would one use `()` in
place of `nil`?

~~~
keymone
it's one of the controversial points in lisp dialects. treating empty list as
nil means it's falsey when used as predicate which has it's pros and cons.

for instance if empty list is truthy, this pseudocode won't terminate if tail
is defined to always be a (possibly empty) list:

    
    
        while seq:
            head, seq = seq.head_tail()
            f(head)

~~~
kazinator
If empty list isn't "falsey", it's not Lisp. It's a "Lisp-like" at best.

Sussman and Steele had the good sense not to call Scheme "<something> Lisp",
because they knew that it would "ring falsey".

~~~
keymone
could you produce an exhaustive list of properties of a proper Lisp so that i
don't mistakenly call something that isn't a Lisp, a Lisp?

~~~
kazinator
Yes, I could. Though I would avoid using _proper_ ; the aim isn't to deem
something "good" or "bad", just whether a name applies to it. An "improper"
Lisp is very good and proper something else, and perhaps very Lisp-like
language with a lot of conceptual compatibility with Lisp.

In a Lisp:

* expressions evaluate their sub-expressions strictly, usually in a left-to-right order unless otherwise noted (in the case of control constructs which repeat or omit the evaluation of some parts, and such).

* evaluation of all expressions either always produces a value, or in he case of multiple value support, always produces a tuple of zero or more values. In any case, when an expression appears in a spot where its value is required, its first value is taken, and if it returns no values, its result is taken to be _nil_.

* Tokens consisting of nothing but the 26 upper and lower case letters denote interned symbols. Two symbols _nil_ and _t_ are special in that when the are used as expressions, they evaluate to themselves and may not be used as variable names. Symbol names may be case-insensitive/folding so that _NIL_ and _nil_ denote the same object.

* A type exists called a _cons cell_ (or just _" cons"_) representing a pair of values bound together. It is produced by a two-place function called _cons_ which creates a cons and initializes its two fields from those two arguments. The left argument initializes a field called _car_ , and the right argument initializes a field called _cdr_.

* A pair of unary functions _car_ and _cdr_ take a cons cell argument, and retrieve the _car_ and _cdr_ field, respectively. _car_ and _cdr_ may also be applied to _nil_ , and return _nil_.

* Cons cells are mutable, except possibly cons cells derived from literals expressed in program source code (for the sake of being able to put compiled program images in read-only memory, and condense their representation by collapsing identical conses). The functions _rplaca_ and _rplacd_ mutate the _car_ and _cdr_ of a cons.

* The printed notation for a cons cell is _(a . d)_ where _a_ recursively denotes the printed notation for whatever object constitutes the _car_ , and likewise _d_ is the printed notation of the cell's _cdr_. In the special case when _d_ is the object _nil_ , the _(a . nil)_ notation condenses to just _(a)_ which is understood to be equivalent.

* Lists are represented by _cdr_ -recursive chains of cons cells: a list is zero or more conses, referentially linked via _cdr_ fields, with the _car_ fields used for the containment of the list elements. The symbol _nil_ appearing in the _cdr_ of a cell indicates the end of the list. A cons cell appearing in the _cdr_ of a cons cell indicates that the list continues. A value other than _nil_ or a cons cell also terminates the list, but "improperly": the list as a whole is called an "improper list".

* The symbol _nil_ by itself represents the empty list. There is no "improper empty list": a non-empty list begins with a cons cell. (In some situations, there is an "emergent phenomenon" in which a non-nil atom behaves as an empty improper list; e.g. (append '(1) 3) -> (1 . 3).

* The symbol _nil_ also denotes the (one and only) Boolean false value. A form which returns a Boolean indication returns _nil_ to indicate "false", and any other value to indicate "true". The symbol _t_ is a canonicalized representation of truth.

* Every object which is not a _cons cell_ is an "atom". The _consp_ function returns _t_ (true) when its argument is a cons cell, otherwise _nil_. Its logical opposite is the _atom_ function which returns _t_ for an atom, and _nil_ for a cons cell.

* A Lisp supports the functions and operators: _null_ , _and_ , _or_ , _cond_ , _eq_ , _equal_ , _apply_ , _eval_ , _quote_ , _cons_ , _car_ , _cdr_ , _rplaca_ , _rplacd_ , _list_ , _append_ , _lambda_ and _let_.

~~~
keymone
strikes me as a detailed description of a very particular implementation that
you specifically like. considering lisp is a family of languages - which of
these rules do you accept deviations from and by how much?

~~~
kazinator
> _detailed description_

Hardly at all; even the 1960 Lisp 1 manual ran for some 160 pages; this is
just a few bullet points. It leaves a lot of room for family inclusion.

But not every Tom, Dick or Harry that walks in off the street is your family
member, or even a friend.

> _very particular implementation_

Nope; just the original thing and many of its derivatives that can
legitimately be called some kind of Lisp.

"Lisp" is in fact the name for a particular set of _implementation features_.

You may have a very nice implementation of some sort of list processing with
all the equivalent expressivity and power, or whatever measure of pedigree we
choose; it's just not Lisp: pick another word.

> _which of these rules do you accept deviations from and by how much?_

None. These are the things someone shouldn't mess with, if they want people to
refer to their programming language as a Lisp dialect.

And, in fact, at least if we look at major works in the mainstream, most of
those who do change those things understand this and don't use that term in
naming their language. So, a fairly good approximation to the predicate _" is
not Lisp"_ is _" does not have 'Lisp' in its name"_.

------
Touche
What do people use as a PaaS provider for Erlang/Elixir?

~~~
sntran
Heroku is fine for development. However, it does not work with hot code
swapping. There are ways around it, and some people don't believe it's a gain.

There is also
[https://github.com/hashrocket/gatling](https://github.com/hashrocket/gatling)
that promises the Git push workflow but with hot upgrading capability.

~~~
josevalim
Heroku is OK as a deployment platform. Hex powers Erlang/Elixir communities on
a small Heroku dyno ($7). And 99% of Elixir developers should not worry about
hot code swapping anyway. Let your load balancer or your PaaS take care of it.

~~~
andruby
Hex runs on 1 small Heroku Dyno? That's amazing.

~~~
quaunaut
I believe that's alongside using Fastly for CDN work, which might pick up a
majority of the work, I'm not sure.

------
logingone
Is Elixir being used exclusively for web development? If not, what else are
people using it for?

~~~
bluesnowmonkey
Backend services that need high reliability, low latency, lots of concurrency.
Lower p99 latency and better concurrency model than Java, more
reliable/productive than C++.

------
BigIQ
Could somebody explain the @impl feature in a little more detail. I'm
confusing the terminology of callback functions I think.

~~~
gamache
Before this change, if you wrote a module (let's call it MyFoo) that
implemented a behaviour, your only clue would be the `@behaviour Foo` near the
top. All the functions in MyFoo would look the same; you'd need to look in the
Foo module to look at Foo's list of callbacks if you wanted to know which of
MyFoo's functions implemented Foo's callbacks.

Now with this change, you are free to mark those functions in MyFoo with
`@impl true`. It's entirely opt-in, but once you use it, it enforces the
presence of `@impl true` on all MyFoo's callback implementations. This allows
the programmer to make these functions' purpose clear, and uses the compiler
to make sure the annotations aren't stale or incorrect.

