
Changelog for Elixir v1.11 - lobo_tuerto
https://github.com/elixir-lang/elixir/blob/master/CHANGELOG.md
======
jswny
For most people, the standout change here will be the addition of
`config/runtime.exs`, which is SUPER exciting!

Before, runtime configuration was only available in “releases”, which is
Elixir’s packaged tarball for deployments. All other configuration was compile
time only. However, running your app locally in a development environment
through `mix` would technically compile the app, so even though you didn’t
have runtime config, it “felt” like runtime.

Because of this special feature of releases which had their own (and the only)
runtime config, you often had to duplicate your config in the runtime config
file and the regular compile time config file (for outside releases).

Now, with this new addition, there’s one unified place where ALL runtime
config is defined, and which supports runtime config in ALL the different ways
you run your app.

To me, this is a huge UX improvement for Elixir devs!

~~~
thomasfortes
> To me, this is a huge UX improvement for Elixir devs!

That's awesome, I have a module that is a helper to inject data in a socket to
use with liveview but the data that I need isn't present in the dev
environment and mocking it is annoying because if I use Mix.env the code in
the release breaks, being able to pass an ENV var and just check it to decide
to mock it or not will simplify a good amount of code.

------
jpittis
Is Elixir really the general purpose productivity tool that comments here (and
on other HN posts) make it out to be?

I've loved playing with Erlang and Elixir. The concurrency model and approach
to failure are fascinating and clearly powerful for certain problems. Elixir's
Pheonix feels as productive as Rails. I've read most of Joe Armstrong's books
and watched most of his talks.

However, I feel like I can throw my daily driver programming languages
including Go, Ruby, Rust... even Haskell at any problem and give or take
performance, come out the other end with high quality software at scale.

When I last wrote Elixir, it felt great when I was doing basic Rails shaped
work or lower level concurrency heavy networking (I was playing with TUN/TAP
interfaces), but I really can't imagine it as a general purpose programming
language.

For example I can't imagine scripting in Elixir, but I can and do in the other
languages mentioned above. Also I remember trying to write a parser library
and it felt way more verbose and unmaintainable than the equivalent Haskell or
Rust.

This is hand wavy, but does anyone feel what I'm getting at? Any thoughts?

~~~
bcrosby95
I don't think Elixir aims to be a general purpose scripting language. I only
use it for hobby stuff, but lately I've been writing my scripts in a few
languages to compare their characteristics: performance, lines of code, and
delta code change when making a single threaded script into multi threaded.

I find that Elixir code for these tasks tends to be a bit longer than standard
scripting languages, a bit shorter than Go/Java, with performance around Go
and slightly better than Java. One of the interesting things I find though is
that with the Flow library, bringing it from single to multiple threads tends
to require fewer changes - generally I just have to change some uses of Stream
to Flow and I'm up and running with a solution that's using all my cores.

~~~
freedomben
For others not familiar with "Flow" I'm guessing it is this (which looks
awesome):
[https://hexdocs.pm/flow/Flow.html](https://hexdocs.pm/flow/Flow.html)

~~~
jeremy_k
Also of note is Broadway
([https://github.com/dashbitco/broadway](https://github.com/dashbitco/broadway))

"Comparison to Flow You may also be interested in Flow by Dashbit. Both
Broadway and Flow are built on top of GenStage. Flow is a more general
abstraction than Broadway that focuses on data as a whole, providing features
like aggregation, joins, windows, etc. Broadway focuses on events and on
operational features, such as metrics, automatic acknowledgements, failure
handling, and so on." \- ([https://github.com/dashbitco/broadway#comparison-
to-flow](https://github.com/dashbitco/broadway#comparison-to-flow))

------
bradgessler
When I compared Elixir/Phoenix vs Ruby/Rails to build a web application a few
years back, I ultimately stopped using Elixir because the third party
libraries superficially seemed to be more immature and not as well maintained.

Most semi-popular RubyGems are in v1.0+, have contributions and bug fixes
within the past few months, and have a feeling of community around them.
There’s even huge companies like GitHub, Shopify, and Basecamp behind some
libs.

Elixir mix packages felt abandoned. Most were in the low digits 0.0.x, no
commits for over 6 months, and the docs seemed to have a lot of notes in them
that it’s early, not maintained, don’t use in production, etc.

Has this changed recently? Can anybody speak to why the Elixir ecosystem feels
more empty?

~~~
jerryluk
Elixir/Phoenix feels like Rails back in 2008 when we built one of the largest
Rails app. It will take time for the community to develop.

That being said, my company has been using Elixir/Phoenix for three years and
while many times there isn't a library for Elixir, often times there is
already a stable Erlang library we can use.

[https://github.com/h4cc/awesome-elixir](https://github.com/h4cc/awesome-
elixir) is a great source.

We have also changed our habit from looking for third-party libraries to
either building our own module which we discovered they are fairly easier to
build than we thought, or coming up with alternate solutions that built on top
of the powerful Elixir/Erlang technology (e.g. OTP).

------
princevegeta89
Incredible. Been using this stack for an year and I'm super excited for the
future. Lately I also do see multiple new companies picking it up for
different workflows and applications.

Though it may not reach Ruby levels of popularity, it's still just fine.
Learning curve is favorable, performance is stellar, and the toolkit that
comes with the language is quite featureful. I see other languages borrowing
elements from Elixir - especially LiveView and Pattern Matching.

The only hiccups I faced where when I had to roll out my own solutions for a
few things (a background job processor, error manager, a mocking module for
unit tests, etc.) Even with all this, I'd still say Elixir is worth it, given
the performance gain and the patterns it enforces. It all just makes the code
easy and understandable.

~~~
pselbert
Rolling your own tools is an irreplaceable way to learn things thoroughly.

That said, HN readers from outside the Elixir should know there are great
libraries for all of those use cases. Point in case is background job
processors—we have plenty of options, though I’m especially fond of Oban[0]
(full disclosure, I’m the author).

[0] [https://github.com/sorentwo/oban](https://github.com/sorentwo/oban)

~~~
princevegeta89
I got into it before Oban was ever released. However, it seems like a solid
solution. I've looked at Faktory as another great option as well:

[https://github.com/contribsys/faktory/](https://github.com/contribsys/faktory/)

~~~
dnautics
haha, yeah the annoying thing about elixir is that sometimes, you give up,
roll your own solution (because it's not terribly hard to do), and then right
after you're done, some team has built a slightly better solution (because
it's not terribly hard to do).

------
Kaze404
I've been writing Elixir professionally for a couple months now and I find it
fascinating how many tools Elixir gives you to play with.

However, I started a toy project in it and immediately ran into trouble due to
its dynamic nature. Printing function arguments to see what they are, runtime
errors... Is there a way to get around this besides adding spec tags on
everything?

~~~
jswny
It depends on what you are struggling with. If you want formal type
documentation and some decent type checking, Dialyzer is pretty good. That’s
really the only solution for Elixir.

If you want full static type checking, there is
[https://gleam.run/](https://gleam.run/) which is a new language, and there’s
also something that seems like a full static type checker for Erlang which is
going to be released by Facebook soon (they use it internally). See this:
[https://elixirforum.com/t/facebook-is-writing-a-new-
statical...](https://elixirforum.com/t/facebook-is-writing-a-new-statically-
typed-language-to-run-on-the-beam/29829).

I, for one, am hoping that the Facebook solution allows us to implement
something in Elixir to interface with it so that we can take advantage of it
in Elixir, but that is yet to be seen.

~~~
Kaze404
I've been using Dialyzer and it works well enough most of the time. Maybe the
Elm compiler spoiled me, but when Dialyzer tells me "this pattern will never
match" and not offer me tools to fix it, it's very frustrating. I'm not sure
if it's possible, but it would be nice to have an action to autocomplete
missing patterns like in Elm / Rust.

That said, I'll take a look at Gleam. Thank you

~~~
elcritch
Dialyzer messages can be pretty obtuse. Usually I take it as a cue to just re-
read the function and it's often somewhat clear where the problem lies due to
immutability (not always though).

Another trick I'll do, is to use (abuse) pattern matching:

    
    
        def foo(%SomeStruct{} = arg, value) when is_integer(value) ...
    

That also helps Dialyzer narrow down possibilities too and will blow up on
runtime.

If you use VSCode, the ElixirLS module will auto-suggest @spec's for your
functions.

------
beck5
Thanks for the great work, I am a big Elixir and Phoenix fan. Although I don't
think it will ever hit the heights of ruby or node in terms of popularity, I
believe elixir and phoneix are very good long term bets.

The improved Compiler checks are a great step in the right direction. I know
elixir language isn't going to change much (if at all?) now, so putting more
time into things like safety and developer productivity will be warmly
welcomed.

~~~
phasnox
I have used Rails and Django extensively in the past, and I tell you there is
no way I'm coming back after using Phoenix and Elixir.

For me, is not just the concurrency primitives that I now take for granted,
but also the fact that you can write beautiful maintainable code.

~~~
noneeeed
What do you think it is about Elixir that leads to beautiful/maintainable
code? I keep thinking about giving it a try.

~~~
slindz
My mind instantly darts to the combination of piping + pattern matching.

Edge cases can live as two line adjustments in ways I don't know how to do in
any other language.

~~~
enraged_camel
Worth noting that the concepts of piping and pattern matching don't just exist
in the language itself, but also in an architectural level. Plugs, for
example, allow you to "pipe" entire web requests in a very elegant and logical
fashion.

------
thejosh
With this and change for JIT, Elixir/Erlang is looking super exciting lately.

~~~
cultofmetatron
jump in! I've been working with it for my startup for the last year and its
been a breath of fresh air.

1: phoenix is fast and almost as expressive as ruby (15 ms response times)

2: weird timing bugs don't show up in my code.

3: the tooling is fantastic, a close second second only to rails

4: Ecto beats active record and is easily the best data mapping layer I've
worked with. All the nodejs orms I've used in the past felt like clunky toys
by comparison.

5: websockets via channels is second to none. seriously, django channels and
rails action cable directly copied it but they are not as performant. you can
scale a single machine to handle a few thousand connections out of the box and
it supports multicluster and long polling to boot.

6: absinthe is great for graphql.

7: live view, think turbolinks on steroids. you can send down updates to the
client dom over websockets.

~~~
aloukissas
Agreed! On frontend, Phoenix is missing support for component-driven
development. LiveView is going that direction, borrowing some react concepts,
so I wouldn't be surprised if we saw something like this soon.

~~~
davydog187
You might be interested in Surface then [https://elixirforum.com/t/surface-a-
component-based-library-...](https://elixirforum.com/t/surface-a-component-
based-library-for-phoenix-liveview/27671)

------
AlchemistCamp
The JIT looks exciting, though to be honest I've never encountered any
significant performance issues with Elixir in four years of use.

Probably the even bigger quality of life improvement for me will be the
improvements in recompliation. Greatly reducing the files to be recompiled
when a file is touched should be a nice dev experience improvement when
working on projects with large numbers of files.

------
ch4s3
The calendar improvement is small, but nice. Calendar.strftime/3 will make
Timex less necessary in some apps.

~~~
PaulStatezny
There are a lot of cool improvements in 1.11, but I admit this is probably my
favorite!

Timex is great but I'm looking forward to having one less dependency on
basically every project. ^_^

------
unvs
It's not out yet, for anyone who got excited (like me)

~~~
mercer
If you (like me) can't wait for the official release, use asdf to install the
master branch. I've been using Elixir 1.11 for a while now and haven't run
into any issues!

------
deltron3030
Is anybody working on (VR/AR) telepresence/fpv stuff with Elixir? (Think of
the new Nintendo toys where you control an RC car through an UI on another
device). Elixir and a combination of Nerves and Phoenix seems like a good fit
for applications like this..

~~~
ch4s3
I don't personally, but Teladoc[1] uses Elixir for telepresence in healthcare.

[1] [https://www.teladoc.com/](https://www.teladoc.com/)

~~~
deltron3030
Thanks!

------
izietto
I'd be curious to know if WhatsApp engineers evaluated using Elixir, if they
are using Elixir only partially or not at all, and which are the reasoning
behind that

~~~
dmitriid
WhatsApp predates Elixir by several years. And they are using Erlang (Elixir
runs on top of Erlang VM).

------
losvedir
Oh, a lot of good stuff in this release! I'm especially excited to be able to
pass a map to Logger and have it print `key1=value1 key2=value2`.

I thought Jose had said earlier that Elixir was basically "done" a version or
two ago, which I was impressed by; how often is software ever finished? But it
looks like we're still getting some juicy functionality nuggets.

------
dfischer
This is awesome. I’ve been using Elixir for a long time and the abstractions
with BEAM/OTP make it quite a powerful platform. Great additions to the
ecosystem.

As an aside, I’ve been playing with Factor recently and it’s been quite the
learning experience with concatenative paradigms. I mention it because I was
surprised it had erlang-like concurrency models in it (actor, and more).

Fun!

------
abiro
How does a typical Elixir deployment on AWS look like? Anyone got a
CloudFormation or Terraform config to share?

~~~
dugmartin
If you want to host a Phoenix app on AWS I would use a Docker release and then
point the DB at RDS. You can run Docker under ECS/Fargate or Elastic
Beanstalk.

Here is a nice intro to Phoenix Docker releases:

[https://hexdocs.pm/phoenix/releases.html#containers](https://hexdocs.pm/phoenix/releases.html#containers)

~~~
Touche
There's also Gigalixir which runs on top of AWS and gives you a Heroku like
experience.

~~~
freedomben
Gigalixir is a great experience. Like Heroku you'll pay for it as you scale
however. But if you don't want to hire a devops person, it's still probably
cheaper than the alternatives.

------
jatins
Elixir looks pretty interesting however lack of static types has held me off
from picking it up. Curious what the experience of people with typespecs and
Dialyzer has been: 1\. How close do you think it comes to static types? 2\.
Does it have good IDE plugins providing type errors as you code?

~~~
dugmartin
If you squint sideways pattern matching on structs plus guards is sort of like
type checking (but not really). The map checking mentioned in the changelog
will be a nice addition.

I've been doing both a lot of TypeScript (for work) and Elixir (for personal
projects) for the last few years and I do get a stronger sense of safety from
TypeScript (especially during refactoring) but Elixir feels much more concise
and fun to work in and the Phoenix event ticketing app I've been running for
the last 3 years has been rock solid.

btw I've been programming for 30+ years with all sorts of untyped, dynamically
typed and statically typed languages. I still haven't found "the one true
language". Something like strongly typed CoffeeScript that runs on BEAM would
be close (I've been watching Gleam for a while and I plan to play with it
after it matures a bit more).

~~~
vendiddy
We've used Elixir at our company for several years. Overall I've loved it, but
I hope some experiments are done with a type system.

(I don't find dialyser that strong in terms of performance and code editor
help.)

I think Typescript would serve as good inspiration because (1) it's a type
system for a dynamic language underneath (javascript) and (2) it uses
structural typing which fits well with pattern matching.

------
dmitriid
I keep being drawn back to Elixir because of the error messages alone. Just
look at that beauty.

