Elixir Moments

community
#1

Share things relating to Elixir that put a smile on your face :003:

15 Likes

Your Programming Heroes - please post pics and stories!
#2

Am I missing something? Something important? Like context?

0 Likes

#3

It’s just a common thing people say about other languages (that they don’t scale very well) and obviously Elixir can :003:

0 Likes

#4

Argh, damn… The words “No-one, Ever” below were misinterpreted as a subtitle by me. Only now I realise, that it is meant to be the person who said this and the date of the quote. So it is meant like this: “Elixir doesn’t scale.” said No-one, ever.

5 Likes

#5
  def get_available_internal_users do
    user_coll = from(u in User, 
                     select: {u.name, u.role, u.id},
                     where:  u.role != "Client") |> Repo.all

    for {name, role, id} <- user_coll, into: %{}, do: {{name, role}, id}
  end  

Just wrote this function to get all users from my project’s DB which do not have the role of ‘Client’ and put their name, role and id into a map.

Such nice, concise and readable code.

First I was doing a lot of List.first/1 and List.last/1 and Tuple.to_list/1 to get the values into the map. Then it came to me “why not just pattern match the tuple and use the matches to get them into the Map?” and boom… that code came to fruition :slight_smile:

Honestly can’t think of any other language that would allow me to query a SQL DB, parse the data and make it all so readable and short. There isn’t a need to write comments really, it reads by itself.

11 Likes

#6
1 Like

#7

:023:

0 Likes

#8

Tomorrow is orthodox Easter, so I painted eggs, and this one reminded me of Elixir logo :slight_smile:

9 Likes

#9

16 Likes

#10

8 Likes

#11

Awesome , I have become an elixir talk junkie since I started with elixir & erlang
cant wait for more talks on the tube

2 Likes

#12
3 Likes

#13

Via @rvirding :lol:

11 Likes

#14

Hah. Favorite line:

I believe in Erlang, where I get to use concurrency

1 Like

#15

I love this video!

2 Likes

#17

:003:

2 Likes

#18

:purple_heart:

4 Likes

#19

By @devonestes

Well done all of you who make this the friendly, welcoming and helpful place that it is :purple_heart:

4 Likes

#20

By @cmeiklejohn

3 Likes

split this topic #21

6 posts were split to a new topic: Your Programming Heroes - please post pics and stories!

0 Likes