Latest #syntax Threads 
In a large repo, working with module need to add alias too much is quite annoyed and not good for organizing code.
I think better add su...
New
This could resolve to {[a: 1, b: 2]}. Was it ever considered to allow such syntax? Notice this: {:abc, a: 1, b: 2} and this: my_fun(:abc,...
New
In the latest versions. For the definitions of the functions as well as for calls.
What’s recommended?
New
Hello,
I am wondering why it is not needed to unquote with defmodule when using variables that are defined outside of the call to defmod...
New
Hi :person_raising_hand: so, the Regex module supports named captures. Here’s an example from the docs for named_captures/3, which extrac...
New
This is highly subjective but in my mind Haskell and Ruby/Rust has one of the most beautiful lambda syntax
\a b → a + b
and
|a, b| a +...
New
If I have nested structures, and I want to fetch a field from the a nested structure, but handle a nil case, is there a succinct way to d...
New
Hi!
I’ve came across problem with Neovim setup. I’m working with Umbrella Apps.
Syntax error is not working while opening project in ma...
New
The question in the subject line is pretty self-explanatory, and I’m trying to understand perhaps a hidden misunderstanding. My understan...
New
I want define a macro like this.
defmodule Demo do
defmacro maybe(do: block) do
quote do
try do
unquote(block)
...
New
This Week's Trending
This Month's Trending
This Year's Trending
In a large repo, working with module need to add alias too much is quite annoyed and not good for organizing code.
I think better add su...
New
Last Three Year's Trending
How can I pattern match against an arbitrary sized tuple? This works:
{status, _, _} = {:ok, 1, 2}
But what if I don’t know the structu...
New
The question in the subject line is pretty self-explanatory, and I’m trying to understand perhaps a hidden misunderstanding. My understan...
New
If I have nested structures, and I want to fetch a field from the a nested structure, but handle a nil case, is there a succinct way to d...
New
Hi! I’m working in a liveview and want to fill attributes such as id, for label and title with a value from a for-loop.
<ul>
...
New
This is highly subjective but in my mind Haskell and Ruby/Rust has one of the most beautiful lambda syntax
\a b → a + b
and
|a, b| a +...
New
Hi :person_raising_hand: so, the Regex module supports named captures. Here’s an example from the docs for named_captures/3, which extrac...
New
In the latest versions. For the definitions of the functions as well as for calls.
What’s recommended?
New
This could resolve to {[a: 1, b: 2]}. Was it ever considered to allow such syntax? Notice this: {:abc, a: 1, b: 2} and this: my_fun(:abc,...
New
Hello,
I am wondering why it is not needed to unquote with defmodule when using variables that are defined outside of the call to defmod...
New
Trending Over Three Years
def fun(options) do
[parameter1: parameter1, parameter2: parameter2] = Enum.into(options, parameter1: 1, parameter2: 2)
Is there an ...
New
I’ve seen -> and <- used in Elixir books and articles, but I have not found a clear explanation to what they are called, and when t...
New
I have seen the pattern %_{} being used to match against structs (notice the _ after the %).
Is this documented somewhere? It seems to m...
New
Hello! Elixir's syntax is pretty and expressive, but at the same time this comes on the cost of knowing just what the best way to write s...
New
Experimenting with this code.
OK.try do
user <- fetch_user(1)
cart <- fetch_cart(1)
order = checkout(cart, user)
save_or...
New
For example the following,
iex(16)> cond do
...(16)> 2 + 2 == 5 ->
...(16)> "Not true"
...(16)> 2 * 2 == 3 ->
...(...
New
Hello, friends!
Context:
As you might know from this thread, I’m working on a presentation.
Following a tour of Erlang history, I have...
New
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention.
Assuming you have...
New
I think that this is called a function reference but I’m not sure.
Anyway, this works:
def start_link(_arg) do
Task.start_link(&c...
New
In the source code I find this pattern repeated over and over.
As an example, in the elixir-1.5.3/lib/elixir/lib/enum.ex I find:
@sp...
New
I’m wondering exactly what a do block is.
Is it a closure? Is it a procedure? Is it an anonymous function? Is it a lambda? Is it som...
New
Hi all. I was searching for ways to determine whether or not an Ecto query results in (a) result(s) without requiring the database to sel...
New
In Elixir Succinctly I read:
Since everything in Elixir is an expression, and if is no exception, the if…else construct returns a value...
New
Here’s a screenshot of part of the Range API:
What does the Types section communicate?
To whom is it useful?
What is this syntax … ...
New
I don't understand how the capture syntax in the following expression is aware of how to use arguments without specifying &1 and &...
New
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #ash-questions
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #discussion
- #javascript
- #elixirconf
- #library
- #oban-questions
- #dialyzer
- #docker
- #onsite
- #authentication
- #podcasts
- #full-time-contract
- #umbrella
- #code-sync
- #ecto-query
- #phoenix_html
- #iex
- #graphql
- #genstage
- #elixir-ls
- #nerves-questions
- #podcasts-by-brainlid
- #supervisor
- #websockets
- #distillery
- #advent-of-code
- #blog-post
- #livebook-questions
- #processes
- #forms
- #api
- #metaprogramming







