Top "Elixir" questions

Elixir is an open-source, dynamic, compiled, general purpose functional programming language.

Pattern match function against empty map

I'm playing around with pattern match and I found out, that it's not quite easy to pattern match parameters of …

pattern-matching elixir
How to use IO.inspect on a long list without trimming it?

When I do: IO.inspect [:right, :top, :left, ...very_long_list] I only get the first items (it's a list …

elixir
Get Random Element(s) from a List

I'm basically looking for an Elixir equivalent of Ruby's Array#sample. Something that would let me do this: list = [1,2,3,4,5,6,7] sample(…

elixir
Can Elixir or Erlang programs be compiled to a standalone binary?

It says that Elixir has a tool called elixirc and Erlang has a tool called erlc to compile modules for …

compilation erlang elixir
In Elixir, how can a range be converted to a list?

I can declare a range as follows: range = 1..10 Is there a way to convert the range to a list?

elixir
Why does Phoenix (ecto/Postgresx) fail to Connect in dev

I am beginning my Elixir/Phoenix journey and having some trouble with my postgres connection. When I start up my …

elixir phoenix-framework ecto boxen
Multiline comment in Elixir

Most languages allow block comments, and multiline commands. For example, a multiline comment in HTML looks like the following: <!…

comments multiline elixir
Phoenix error: module not loaded/not available

I'm following the Programming Phoenix book, working on the section to implement logging in/out an authenticated user, and am …

elixir phoenix-framework
Format date with Elixir

I'm trying to format the Timex module to look a certain way. I'm trying to get today's date. but I …

datetime elixir timex
How can I see the raw SQL generated for an Ecto.Query?

I have an Ecto.Query and a Repo, such that I can call Repo.all(query) and get results. However, …

elixir ecto