This Week's Trending
This Month's Trending
This Year's Trending
Last Three Year's Trending
I am trying to understand why transitive compile-time dependency is there, and what’s a good strategy to remove it. The mix app for examp...
New
I’m working on a macro to support automatic timing for functions.
If I have this - say:
def double(x) do
x + x
end
I would like to b...
New
I’m not very used to macros/compile time manipulation, but I will explain what I want to achieve and would like to know if it’s possible ...
New
In order to only have one branch of code in a macro that defines functions with support for guards, I would like to always have a guard. ...
New
I have a problem, where i have a macro the calls another function. I want to be able to add optional guards to my macro, and call the nes...
New
I’m trying to unquote multiple blocks of code dynamically depending on the include option passed when use is called. When I try to map ov...
New
I’m writing module that will accept a function name and arguments looking like foo(bar, baz) - as Kernel.def/2 does but without a body, a...
New
Trending Over Three Years
I’m trying to use one macro inside another macro and running into issues:
defmodule Test do
defmacro somemacro(arg1, do: block) do
...
New
Background
So, I am playing around with a concept named “NewType” and I am taking inspiration from languages like F# and Scala.
My objec...
New
Hello all,
I’m recently doing something similar to ExUnit, keeping a bunch of variables on “setup” block and then pass it to the next bl...
New
Hey,
I’m currently trying to DRY up some tests which have a lot of boilerplate code in the form of:
test "user is updated", %{user_id: ...
New
Is it possible to generate the module name as an atom within a macro?
defmodule MyProject.Schema do
defmacro __using__(opts) do
qu...
New
I’m trying to understand how macros and module definitions interact with each others and I’m having few cases which I don’t understand. T...
New
Hi, for practicing I wanted to create a custom CRUD function which is using Repo. But on the way I have some problems with basic.
Proble...
New
Consider the following simple example:
defmodule Test.Foo do
defmacro foo(regex) do
IO.inspect(regex)
end
end
defmodule Test do...
New
Hello, I try to create a custom macro to implement some functions and structure I need in my project and my goal is to make a custom tool...
New
Hi all,
I’m trying to solve a practical problem - make an ExUnit “data case” with async true as default, instead of false.
So if a user...
New
Hello, Based on typed_struct/lib/typed_struct.ex at main · ejpcmac/typed_struct · GitHub , I am practicing to learn more about macro in e...
New
Is there a way to create a macro called required that could be used like this:
with required(var) <- Map.get(map, key) do
var
else
...
New
Hello!
I’m working with macros and I am trying to inject some code into a use macro to be used “as-is” but I’m having some trouble makin...
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:
Sub Categories:
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
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance
- #hex







