paulanthonywilson
Blog Post: A fun, but trivial, limitation in Elixir ExUnit (/Macros)
It seems unlikely that anyone will find these facts interesting or useful, but here they are anyway.
Most Liked
LostKobrakai
This is not a limitation of ExUnit. This applies to everywhere in elixir. Module attributes essentially work by injecting the AST of the value into wherever the module attribute is used to provide a value. Values like a port don’t really have AST, which would give you the value back at runtime, which you had at compile time, so this doesn’t work. The same applies to any other value not easily transfered as AST from compile time to runtime, like e.g. anonymous functions.
3
paulanthonywilson
Maybe the title’s not great, but that’s why I stuck the (/Macros) at the end. Your explanation does shed some light on this though - thanks.
1
Popular in Blog Posts
Hi, I recently thought about a name for this Stack: Rust + Elixir + Phoenix. I came up with Runix (RuNix) and blogged about it on Medium....
New
What I genuinely value at my workplace is that I can easily explore new languages through internal mobility. Throughout my career within ...
New
Wrote some rant on Business Process Driven Development with Finite Automata (and Finitomata library in particular.)
New
https://medium.com/blackode
This article comprises of two biggest changes of ExUnit.
Arguments in the failure report
Running mix tes...
New
Testing is an important part of any modern piece of software. But writing tests can quickly become an exercise in frustration, with tons ...
New
TL;DR:
Good: AI is great at Elixir. It gets better as your codebase grows.
Bad: It defaults to defensive, imperative code. You need...
New
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
Update:
How to use the blogs section
You can post in one of the Official Blog Posts threads (like this one), or, via Devtalk and a new t...
New
Elixir Blog Post: Live video streaming from iOS devices made simple with Elixir & Membrane Framework
Greetings from Membrane Framework team!
Check out our case study based on our latest projects at Software Mansion.
https://blog.swmansi...
New
Building on other people’s work I bashed things together and suddenly I can know when someone is speaking using Elixir and Membrane.
New
Other popular topics
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
I would like to know what is the best IDE for elixir development?
New
Lets say I have map like this fetching from my database
%{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)?
Would
mix ecto.rollback -v 200809061...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #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
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









