This Week's Trending
This Month's Trending
This Year's Trending
In the official docs, it’s written that ideally structs should have less than 32 fields (source here).
Do you go around that limitation?...
New
Last Three Year's Trending
Background
I am trying to encode a structure into json format using the Jason library. However, this is not working as expected.
Code
Le...
New
I’m considering writing an integration with Salesforce. Salesforce has SObjects of various types like Case, Quote, Lead, CustomObject__c...
New
TLDR;
What should I emit for inspect/2 output of library structs? Executable code, string representation or default (outputs the struct ...
New
What’s the best/most succinct way to define a struct that is only used inside of one module? I sometimes have structures that I want to b...
New
Trending Over Three Years
I have this struct of preload records.
I want to remove
__meta__ and Ecto.Association.NotLoaded from the main struct as well as from t...
New
Hello, how do I get struct in array ? please see my pic :
I need to get the struct’s params , like this : a.cms_post.title
My output...
New
Hello,
Is it possible to check if an argument to a guard is a particular structure?
Context: I am trying to have a defguard definition ...
New
Hey folks! I want to add documentation for individual fields on a struct/typedstruct, and I’m wondering about available options? I’m new ...
New
Hey I have a list of structs and it has fields like: id, date, counter etc
how would i take out every id from this list and return the i...
New
Background
I have a TypedStruct with an optional field, :rank. This field is sometimes present and sometimes not.
@derive Jason.Encode...
New
Hello,
I’m having a list of elixir structs and I need to store in into file for later use and I don’t want to serialise it.
So I used :...
New
Hi!
I have a couple of structs and I want to build one of them depending on some STRING as input:
defmodule Mystruct1 do ... end
defmod...
New
I’m looking for a typespec that would match, for instance:
%Foo{specific_key: "abc"}
%Bar{specific_key: "abc"}
%Baz{specific_key: "abc"}...
New
I want to load a json (list of objects) into list of structs in a module attribute.
Seems like I need three modules for that.
json
[
...
New
Hello, i’m new to Elixir and Erlang world, but I want to create mechanism to restrict the use of a module through steps involving data. S...
New
I’m generating a module from a macro, like this:
defmodule WhereTheMacroIs do
defstruct [:same_for_all]
defmacro generate(name) do
q...
New
As the title says, can someone advises on the best way to remove the duplication in the code snippet below.
I am referring to the field ...
New
Hi,
Lets say I have a struct, lets say named Struct with the singular field x (default 0).
When I create it I get &Struct{x: 0}
Si...
New
I have a struct define as follows
defmodule Employee do
defstruct [:fname, :lname, :id, salary: 0, job: "none"]
then I made a list, co...
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
- #api
- #processes
- #forms
- #metaprogramming
- #security
- #performance
- #hex







