Latest #syntax Threads 
Just wondering since the knowledge cutoff for LLMs is about a year or so behind the current date.
It would be nice if the models were ab...
New
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
From here: Work with pipe query syntax | BigQuery | Google Cloud Documentation
HN: https://news.ycombinator.com/...
New
So this is just a dumb little post regarding syntax.
I’ve been pairing with a colleague who is new to Elixir lately and today we were br...
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
If a function takes a keyword as one of its parameters, we normally put it last:
def my_func(a, b, attrs \\ []) do
...
end
So at call s...
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
This Week's Trending
This Month's Trending
This Year's Trending
Just wondering since the knowledge cutoff for LLMs is about a year or so behind the current date.
It would be nice if the models were ab...
New
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
So this is just a dumb little post regarding syntax.
I’ve been pairing with a colleague who is new to Elixir lately and today we were br...
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
If a function takes a keyword as one of its parameters, we normally put it last:
def my_func(a, b, attrs \\ []) do
...
end
So at call s...
New
From here: Work with pipe query syntax | BigQuery | Google Cloud Documentation
HN: https://news.ycombinator.com/...
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 been hearing much about the new formatter and it’s something I have been keen to try.
I find examples buy far the most illuminating...
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
Anything, from syntax to the core library.
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
For example the following,
iex(16)> cond do
...(16)> 2 + 2 == 5 ->
...(16)> "Not true"
...(16)> 2 * 2 == 3 ->
...(...
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
In Elixir, operators are also simply functions. A unary operator takes a single argument, a binary infix operator takes two.
It is there...
New
I was wondering what Elixir developers think about this: how to treat piping into an ok_tuple? I have no idea if there was a similar ques...
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
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
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #elixirconf
- #discussion
- #javascript
- #podcasts
- #code-sync
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #advent-of-code
- #distillery
- #api
- #processes
- #forms
- #metaprogramming
- #security
- #performance
- #hex
- #json







