šŸ§Ŗ Elixir v1.9

Wooow, Elixir-lang implemented ā€œbuild releaseā€ in their latest version!!

The official blog post: Elixir v1-9-0 released.

TL;DR; from the article:

Releases allow developers to precompile and package all of their code and the runtime into a single unit.

A release is a self-contained directory that consists of your application code, all of its dependencies, plus the whole Erlang Virtual Machine (VM) and runtime.

Code preloading, configuration and customisation, Self-contained, multiple releases, management scriptsā€¦

I made a small test with a basic ā€œHello worldā€ app in Elixir 1.9. After that, I executed:

$ MIX_ENV=prod mix release

In the folder ā€œ_build/prod/rel/ā€, the production app is only 8MB !! šŸ˜±

I uninstalled Elixir and Erlang after compiling the app and I executed:

$ _build/prod/rel/kv/bin/kv version and some commands to run the ā€œhelloā€ function and it worked perfectly. Thatā€™s why Iā€™m so excited about it!

Because one of the most important reasons I stopped using Elixir a few years ago, was that I couldnā€™t find any way to export my apps in a portable way, like they just implemented now. And the smallest Docker container with Elixir was a few hundred MB. Well, the second reason was the ecosystem was too small, so I had to write a lot of code just to make simple automation stuff, so I switched to Python.

Many things have happened since thenā€¦ But I donā€™t regret my decision, now that Iā€™m using Go-lang for Spinal šŸŒ€.
Even if Go syntax is horrible and Elixir syntax is for sure, the most beautiful thing you could possible write, as a programmer. In my opinion.

@notes #software #programming #elixir