What does HackerNews think of mix_install_examples?

A collection of simple Elixir scripts that are using Mix.install/2.

Language: Elixir

Here's a great repo showcasing how to use it more like a quick scripting language. https://github.com/wojtekmach/mix_install_examples
I've been a big fan of "Mix.install" since it was released!

I believe this made me use Elixir instead of Ruby (my natural scripting language) more and more.

I use it on a regular basis for my work on https://transport.data.gouv.fr/?locale=en (which is Elixir-based and open-source), as one can see at https://github.com/etalab/transport-site/tree/master/scripts.

What I like the most is that it helps me start ideas, experiments & data analysis with their own set of dependencies (without much care of "will this impact the main application?"), store those experiments in the same repo at the main application, and maybe later promote some of those experiments to the main application source code.

Concrete examples include:

- data wrangling https://github.com/etalab/transport-site/blob/master/scripts..., https://github.com/etalab/transport-site/blob/master/scripts...

- exploring a new tool https://github.com/etalab/transport-site/blob/master/scripts...

- gradually iterating to create scripts to generate XML queries https://github.com/etalab/transport-site/tree/master/scripts... (later incorporated in the application)

- comparing GTFS (transportation data) files via scripting https://github.com/etalab/transport-site/blob/master/scripts...

- learning how to compute the checksum of the internal content of a zip file https://github.com/etalab/transport-site/blob/master/scripts...

As mentioned in the article, I can definitely recommend to check out https://github.com/wojtekmach/mix_install_examples which has a long list of examples.

One last tip is that you can also use "mix run script.exs" on a file not using "Mix.install", in order to rely on the same dependencies & configuration as the main application (e.g. to run a Ecto query https://github.com/etalab/transport-site/blob/master/scripts...).

A nice collection of Elixir scripts in the repository linked at the end of the article: https://github.com/wojtekmach/mix_install_examples
And with Mix.install/2 [0] you have access to the entire ecosystem.

Here are a few examples: https://github.com/wojtekmach/mix_install_examples

[0]: https://hexdocs.pm/mix/1.12.3/Mix.html#install/2