Elixir Blog Posts

I wrote a guide to SQS message ingestion with GenStage:

While it can be done out-of-the-box with Broadway, learning the fundamentals of GenStage is well worth it. Enjoy!

1 Like

I’ve written a bit about my use of hot code loading to modularize my monolith, and the benefits I get from that. I’ve thought about this a lot over the last three years and failed to think of a simpler alternative path to achieve the same constraints, given the capabilities of our platform.. maybe someone will ?

9 Likes

We’ve just published a new article about the latest updates to Permit – authorization library for Elixir. In the article, Michał, our CTO expands on the topic he presented at ElixirConf EU and explains how Permit helps manage access control in Elixir projects.

:backhand_index_pointing_right: Permit Authorization Library Updates and GraphQL Integration Debut | Curiosum

4 Likes

These are fairly niche, but I’m writing about rewriting my old guitar/music-related passion project, Glorious Voice Leader, in Elixir:

Generating Musical Scales - Lots list manipulation to generate arbitrary musical scales based on a formula, spelling, and root note.

Scales as Multipermutations of 0 and 1 into Twelve Places - Generating all possible scale formulas to write a property test for the solution outlined above.

4 Likes

Learning Elixir: Article Series

I’m continuing my series of articles about Elixir on dev.to. My latest piece explores Function Composition - showing how to build complex functionality from simple, composable parts.

The article covers:

  • Basic composition techniques with anonymous functions
  • Higher-order functions and partial application
  • Composing functions that work with {:ok, value} tuples
  • Real-world examples: data pipelines and middleware patterns
  • Best practices for writing composable code

Function composition is fundamental to functional programming, enabling you to create modular, testable, and maintainable Elixir code.

Check it out: Learning Elixir: Function Composition

Make Elixir Tests Faster

A few tips for speeding up your tests.

1 Like

Future of Permit authorization library

Recently, I wrote about recent updates in our Permit authorization libraries as well as introducing works in progress for Permit.Absinthe, which should make GraphQL API query & mutation authorization a lot easier and more streamlined.

As noted in my recent ElixirConf EU presentation, and mentioned in the previous article, we’re working on finessing several new ideas and exploring a couple of new concepts that Permit can be adapted to support.

The article discusses possibilities for integrating the Permit authorization library with the likes of Ash and Commanded, as well as feasible optimizations and improvements we’re exploring to put in the roadmap - including brainstorming about Postgres RLS.

4 Likes

A little something I learned about Ecto, has_many and deferred checks.

7 Likes

Learning Elixir: Pattern Matching

I’ve published a new article in my Elixir learning series on dev.to exploring Pattern Matching - Elixir’s most powerful feature for writing declarative code.

The article covers:

  • Basic concepts and the match operator
  • Pattern matching with lists, maps, and structs
  • Function clauses and guards
  • Advanced techniques like the pin operator
  • Best practices and common patterns

With practical examples and IEx sessions throughout, you’ll learn how to replace complex conditionals with elegant pattern matching.

Check it out: Learning Elixir: Pattern Matching

2 Likes

Learning Elixir: Lists

I’ve published a new article in my Elixir learning series on dev.to exploring Lists - the fundamental data structure that powers functional programming in Elixir.

The article covers:

  • List basics and syntax
  • Head/tail decomposition and pattern matching
  • Recursive list processing
  • List comprehensions and generators
  • Performance characteristics and optimization
  • Common list operations and Enum functions

With practical examples and IEx sessions throughout, you’ll learn how to effectively work with lists and leverage their immutable nature for building robust applications.

Check it out: Learning Elixir: Lists

1 Like

Learning Elixir: Tuples New article in my Elixir learning series exploring Tuples - the immutable, ordered data structure essential for functional programming in Elixir.

The article covers:

  • Tuple syntax and basic operations
  • Pattern matching with tuples
  • Immutability and performance characteristics
  • When to choose tuples vs other data structures
  • Common use cases and best practices

With practical examples and IEx sessions to help you master tuples in your Elixir applications.

Check it out: Learning Elixir: Tuples

A little example of a distributed cache, with rendezvous hashing + distributed Erlang:

1 Like

A little introspection to generate UIs for what would otherwise be one-off scripts. Too useful to be deleted from the codebase, not useful enough to be promoted to Mix Tasks… And way easier to run graphically.

3 Likes

Hi, all! “Making requests without curl” - a little technique I am using to simulate processing of HTTP requests without involving curl and a web server. Helpful, when one needs to setup tools for code analysis ahead of processing the request.

Scroll for some nice-looking flamegraphs, because who doesn’t like flamegraphs :wink:

2 Likes

Learning Elixir: Maps

New article in my Elixir learning series exploring Maps - the versatile key-value data structure that forms the backbone of many Elixir applications.

The article covers:

  • Map syntax and creation patterns
  • Accessing and updating maps safely
  • Pattern matching with maps for data extraction
  • Working with nested maps for complex data structures
  • Essential map functions and transformations
  • Maps vs other data structures (keyword lists, tuples, structs)
  • Real-world applications (APIs, configuration, data pipelines)
  • Performance considerations and best practices

With comprehensive examples, IEx sessions, and practical patterns to help you master maps in your Elixir applications.

Check it out: Learning Elixir: Maps

An ode to Mailpit, Elixir edition” - wrote about a failed OTP 25 → OTP 26 migration, Swoosh, gen_smtp, mailpit, and the importance of “honest” integration testing for sending email

3 Likes

I have recently been playing around with using the Rosie Pattern Language to create PEG patterns for matching Elixir constructs in code. Rather than boring anyone who doesn’t care to learn more about the topic, I’ve written up my work as a blog post.

Thoughts, feedback and/or suggestions would be greatly appreciated!

2 Likes

Speaking to many members of the Elixir community including developers as well as technical and business decision-makers, we’ve identified that the Elixir ecosystem needs a curated and showcase of business adoption in digital products.

Not only is Elixir present in niches such as telecom and distributed systems, but it’s a great general-purpose language finding its foothold in AI/ML and edge computing. Every once in a while we hear about Elixir being adopted by someone big and relevant for the everyday life. We need to bring this into the spotlight!

This is why we’ve created the Elixir Hub - an entry point to the Elixir world, showcasing and promoting not only the adopters themselves, but also resources essential to being up-to-date with what’s going on: podcasts, books, and more to come.

All of this topped up with a newsletter to keep readers up to date with Elixir’s technical and commercial advancements - we encourage you to sign up to never miss out on those!

Visit the Elixir Hub: https://curiosum.com/sl/rb825gai

6 Likes

Learning Elixir: Keyword Lists

New article in my Elixir learning series exploring Keyword Lists - the specialized ordered key-value structure that powers Elixir’s clean function APIs and configuration systems.

The article covers:

  • Internal structure and syntax variations
  • Creating and manipulating keyword lists safely
  • Function options and configuration patterns (the primary use case)
  • Working with duplicate keys and their semantic value
  • Safe extraction patterns (avoiding pattern matching pitfalls)
  • Keyword Lists vs Maps - when to choose each
  • Validation and documentation patterns
  • Best practices for maintainable and idiomatic code

With comprehensive examples, IEx sessions, and practical patterns to help you master this essential Elixir data structure and write more idiomatic function APIs.

Check it out: Learning Elixir: Keyword Lists

1 Like

How to build a Phoenix-based info station with Nerves.
It’s production-ready to check :right_arrow: Build a Smart Info Station with Nerves, Raspberry Pi & ESP32 E-Ink | Curiosum

3 Likes