Digests » 304

this week's favorite

How to compose and refactor Ecto queries with Queries Modules

For a while, I’ve been looking for a perfect way to construct Ecto Queries. At Curiosum we came through a couple of iterations and eventually ended up with a solution that you may call resource-based query modules. Its goal is to extract query-related logic to query module and make contexts more clear & clean.

Axon: Nx-powered neural networks for Elixir

Axon provides abstractions that enable easy integration while maintaining a level of separation between each component. You should be able to use any of the APIs without dependencies on others. By decoupling the APIs, Axon gives you full control over each aspect of creating and training a neural network.

Marketing and sales intelligence with Elixir at PepsiCo

PepsiCo is one of the world’s leading food and beverage companies serving more than 200 countries and territories around the world. Today Elixir is used at varying capacities inside PepsiCo by six different teams. This article explores how the Search Marketing and Sales Intelligence Platform teams adopted and use Elixir to build internal tools.

A deep dive into the Elixir AST

Metaprogramming is an important feature in Elixir. It gives you the ability to write code that, when compiled, gets transformed into a different version of itself. This kind of code is called a macro, and is popullarily referred to as "code that writes code".

Simple Configuration Setup for Elixir Projects

I’ve written about Elixir configuration in an earlier post, describing the differences in the configuration styles. If you don’t know how Elixir configuration works, I suggest reading it also. In this post, I will demonstrate a system for configuring an Elixir project using the config/runtime.exs system introduced in Elixir 1.11. This system is how I configure my projects, so feel free take it as inspiration, but it’s not a law that you have to follow.