First month of functional programming in Elixir

Thoughts from one month of functional programming in Elixir

Elixir has an impressive feature set and a fast-growing community. Coming from an object-oriented background using mostly Java and Javascript, Elixir syntax and structure is both familiar and not.

Processing Large CSV files with Elixir Streams

Processing Large CSV files with Elixir Streams

Elixir Streams are a powerful and elegant way to process large CSV files. In this article I compare the greedy and the lazy approach with memory and cpu benchmarking.

No Touching released

no_touching provides a way to check if your code is calling private functions from other libraries/dependencies! Highly configurable, extremely fast, and a really nice check to add to CI.

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

How to perform Hot Code Swapping using Distillery— #2 — A (Live Demo) GenServer State update.

This article will guide you to perform hot code swapping in Elixir using the Elixir package distillery-2.0 (at the moment of writing this article).

A live demo on updating GenServer state will stand out as a good example.

WaspVM 0.8.0 released

Complete instruction set support, 67% increase in efficiency over previous version, and more. View the release notes here

Phoenix Contexts

In the latest ElixirCast episode we’ll look at Phoenix contexts. This is a great episode for anyone new to Phoenix or wanting to see how contexts work.

Phoenix 1.4 Chat Server: Part 4

Phoenix 1.4 Chat Server, Part 4.

This episode covers building an Auth Plug. It will let us restrict any action in any controller to only logged-in users or to only admins. We also set up a special function plug for the user controller for restricting actions to the correct user. E.g. users can edit their own accounts but not each others.

Message passing for actors and humans

Slides and Video for my CodeMesh talk this year.

Inject from your controller to decouple your contexts in Phoenix.

In this post I will show you a simple pattern to decouple your Phoenix context so that you can specify from your controller how you want to preload your Ecto.Query.

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

Hex Bob Package Status Page

I’ve created a small page listing all available precompiled packages of hex bob. Added availability checks given the recent issues with updates.

Ecto and Binary IDs

Using UUIDs as primary keys is simple with migration_primary_key and a simple change to the schema:

How We Used Elixir's GenServers + Dynamic Supervisors to Build Concurrent, Fault Tolerant Workflows

At The Flatiron School, we leveraged Elixir’s GenServers and Dynamic Supervisors to “deploy” large amounts of content to our students faster and less error-prone than ever before.

hackney version 1.15.0 has been released

just released hackney version 1.15.0 an HTTP client library. This release add a performance improvement to the pool and an addition to multipart forms handling.

site: news:

Gitlab-ing Phoenix — (Elixir and others) Aka GitOps

This article is all about Automating Phoenix Development & Deployment using Gitlab CI/CD.

TMIB-24: Last December, priority bumping and CircleCI integration were improved

How to pattern match a function in Elixir

I found how to pattern match a function on Improve error messages for invalid expression in match · Issue #5649 · elixir-lang/elixir.

x = &List.first/1
case &List.first/1 do
  ^x -> true

I also wrote a summary for it: How to pattern match a function in Elixir - dsdshome

Feel free to check it out and leave some comments.

A deeper dive in Elixir's Plug

Being new to Elixir and Phoenix, I spend quite some time in the projects’ documentation. One thing that stood out for me recently is the first sentence of Phoenix’s Plug documentation: “Plug lives at the heart of Phoenix’s HTTP layer and Phoenix puts Plug front and center.”

So naturally, I felt compelled to take a deeper dive into Plug and understand it better. I hope the article helps you out as well, you can read it here.

Correios CEP 0.3.0 released! Zip code validation.

Correios CEP allows to find Brazilian addresses by zip code, directly from Correios database. No HTML parsers.

Changelog for version 0.3.0:

  • Validate zip code.
  • Typespecs and Dialyzer.

Check it out at:

Cloak v1.0.0-alpha.0 released!

Cloak is an encryption library which helps you encrypt your Ecto schema data, and it’s now nearly at 1.0.0!

Introducing Whistle, a different approach to building interactive web apps in Elixir

Whistle is an implementation of an Elm(ish) architecture in the server, letting you write interactive web apps entirely in Elixir.