4 ms·
The introduction of Mix.install in Elixir 1.12 was huge. Prior to that single file Elixir scripts could only use the standard library, which is decently sized,
by losvedir 4y ago
The introduction of Mix.install in Elixir 1.12 was huge. Prior to that single file Elixir scripts could only use the standard library, which is decently sized, counting Erlang but notably misses a good HTTP client and JSON encoding/decoding. Despite using Elixir at my day-job and loving the language in a production environment, I had written off Elixir for scripting and throwaway work until then.
But now, I love it! Mix.install([:req]) at the top and you've got an easy to use, great basis for scripts.
Toss in Livebook and you're well on your way to a wonderful exploratory environment. I've moved off having an open iex window to having a scratch Livebook open, and it's great for little explorations. I've been using it whenever I need to work with my company's API, and over time the little helper modules and functions have been evolving. I almost feel like pretty soon it might as well package it up and release them as a full-fledged Elixir library for use with the API.
- elixxir123 4y agoUsing iex: Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit] Interactive Elixir (1.12.2) - press Ctrl+C to exit (type h() ENTER for help) Mix.install([:req]) gives could not compile dependency :mint, "mix compile" failed.
- h0l0cube 4y agoThat's odd. I downgraded with asdf to 1.12.2 tried the same thing and it worked on my M1. You could try upgrading either Erlang/Elixir. Failing that, there's a lot of helpful people on elixirforum.com (which now features live chat), so it might be best to ask there.
- Jtsummers 4y agoI had the same issue on Ubuntu (had my "random project" server up to date already, but no Erlang or Elixir). Installing Erlang in addition to Elixir resolved the problem. I don't know exactly what interactions resolved it though.