Latest #code-style Threads Top

aptinio
I just published def_layout, a formatter plugin that lays out a module’s functions: callbacks first in source order, public functions alp...
New
arcanemachine
I saw this topic getting some traction over on the Erlang Forums, so I want to resurrect this topic here (previous discussion here): Sh...
New
wintermeyer
I am used to this syntax for a case structure (my question is about the _ -> part): case {1, 2, 3} do {4, 5, 6} -> "This cl...
New
camstuart
Hello, I am somewhat new to Elixir, and finding that I am having difficulty grasping how I should handle logic for a series of sequences...
New
acrolink
I have some checks to do before returning a response to the user in controller: checking file existence in S3, checking some DB fields, c...
New
travisf
I picked this pattern up from another dev and have made fairly extensive use of it with Multis: @multi Multi.new() ... @multi ...
New
kccarter
Looking for some advice on how a seasoned Elixir developer might go about implementing the creation of a map/struct that is dependent on ...
New
dogweather
EDIT: Parse, don't validate (2019) | Hacker News I finished this working code which takes in an HTML page and outputs legal citations it...
New
IwoHerka
When creating multiple clauses for a function, should I provide typespec for each one? Example: @spec foo([]) :: {:error, any} def foo([...
New
Cifer-Y
I apologize for not being able to describe my question clearly in the title. I’m not sure how to name this coding pattern. Recently I f...
New

This Week's Trending Top

This Month's Trending Top

aptinio
I just published def_layout, a formatter plugin that lays out a module’s functions: callbacks first in source order, public functions alp...
New

This Year's Trending Top

christopheradams
I was recently asked to step up and become the maintainer for the Elixir Style Guide. It was, I believe, the first, and is now the most p...
New

Last Three Year's Trending Top

gerbal
Is there a recommended ordering of require, use, import, and alias? Does the style guide have anything to say about the preferred orderin...
New
stratacast
Hey everyone! This is my first time posting on here, and I’m getting started with writing some real Elixir code! I’m not new to programm...
New
travisf
I’m curious what the consensus (if there is one) on case vs if statements for conditionals is. Specifically, in cases where you are only...
New
kccarter
Looking for some advice on how a seasoned Elixir developer might go about implementing the creation of a map/struct that is dependent on ...
New
arcanemachine
I saw this topic getting some traction over on the Erlang Forums, so I want to resurrect this topic here (previous discussion here): Sh...
New
dogweather
EDIT: Parse, don't validate (2019) | Hacker News I finished this working code which takes in an HTML page and outputs legal citations it...
New
wintermeyer
I am used to this syntax for a case structure (my question is about the _ -> part): case {1, 2, 3} do {4, 5, 6} -> "This cl...
New
camstuart
Hello, I am somewhat new to Elixir, and finding that I am having difficulty grasping how I should handle logic for a series of sequences...
New
travisf
I picked this pattern up from another dev and have made fairly extensive use of it with Multis: @multi Multi.new() ... @multi ...
New
IwoHerka
When creating multiple clauses for a function, should I provide typespec for each one? Example: @spec foo([]) :: {:error, any} def foo([...
New
acrolink
I have some checks to do before returning a response to the user in controller: checking file existence in S3, checking some DB fields, c...
New

Trending Over Three Years Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
GenericJam
I’m trying to find a cleaner coding style for what I’ve got happening repeatedly in my code right now. This is looking very pyramid of do...
New
Travis
Completely new to Elixir, but have an issue I am trying to figure out: When interviewing candidates for Javascript roles I usually have ...
New
nhpip
So what’s the idiomatically correct way to do nested modules? I know when applications you tend to do it the first way and follow the dir...
New
david234
I have this form <%= form_for @conn, Routes.admin_products_path(@conn, :create_product), [as: :create_product, id...
New
yordisprieto
I was watching some functional programming video where the person codes the exact application in multiple ways. One of the preferred way...
New
PJUllrich
I’m extracting many fields from a map using pattern-matching against the function parameter. Sometimes only a single field is missing fro...
New
fceruti
Hello, I’m trying to level up my Elixir game and wanted to ask you for your favorite public phoenix projects in terms of code organizati...
New
minhajuddin
I am using the code below to generate room ids: reservations = [%{rooms: 1}, %{rooms: 2}, %{rooms: 3}]...
New
Papillon6814
Hello. I’m thinking the way to handle nil in case. |> case do x when not is_nil(x) -> ... {:ok, "xxxxxx"} nil...
New
AstonJ
EG: defp deps do [ {:phoenix, "~> 1.4.1"}, {:phoenix_pubsub, "~> 1.1"}, {:phoenix_ecto, "~> 4.0"}, ...
New
Rich_Morin
I recently wrote some Elixir to format a list of strings (eg, author names) for output. I think it’s reasonably idiomatic, but I probably...
New
niels_bom
While learning Elixir I’ve been writing and rewriting some practice functions. Some of the rewriting was to ensure recursive functions ar...
New
verilog
Hello, I’m new to Elixir. I was reading about the macros of Elixir but didn’t quite get it. I know C and familiar with its marcos. Alth...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement