Elixir Wizards S4E3 Steve Bussey on Real-Time Applications + Pattern Matching with Todd

Check your podcast feed for the latest episode of the Elixir Wizards podcast or listen to the episode here: https://podcast.smartlogic.io/s4e3-bussey

And listen to Pattern Matching with Todd here: https://podcast.smartlogic.io/s4e3b-pattern-matching-crumm

ElixirMix Podcast 094: Custom Credo Checks with Devon Estes

In this episode of ElixirMix, we catch up with Devon Estes to learn what he’s doing with Credo. Devon talks about creating custom Credo checks for the benefit of our teams and projects. We cover his project Nicene that defines additional Credo checks, learn tips like using git to only run checks on modified files and much more!

Podcast Episode

Linear regression with Elixir and Phoenix LiveView

A little two part series on Linear Regression using Elixir with Phoenix LiveView: https://tiemenwaterreus.com/posts/linear-regression-elixir-phoenix-liveview-i/

ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.

Preview "Phoenix Beginner's Guide"

A 4 chapter preview of my new “Phoenix Beginner’s Guide”: https://www.wintermeyer-consulting.de/books/phoenix/1.5/

It’s targeted to programmers who are interested in @elixirphoenix but might have never worked with @elixirlang before.

  • Elixir Introduction
  • Phoenix Basics
  • LiveView Basics
  • Router

A Comprehensive Guide to the Elixir pipe operator

Everything you should know about piping in Elixir: https://k.lelonek.me/elixir-pipe

Correios CEP 0.5.0 released! Support for proxy configuration.

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

Now you can find address using a proxy.

# Not using a proxy
iex> Correios.CEP.find_address("54250610")
{:ok,
 %Correios.CEP.Address{
   city: "Jaboatão dos Guararapes",
   complement: "",
   neighborhood: "Cavaleiro",
   state: "PE",
   street: "Rua Fernando Amorim",
   zipcode: "54250610"
 }}

# Using a proxy
iex> Correios.CEP.find_address("54250610", proxy: {"myproxyhost", 8888})
{:ok,
 %Correios.CEP.Address{
   city: "Jaboatão dos Guararapes",
   complement: "",
   neighborhood: "Cavaleiro",
   state: "PE",
   street: "Rua Fernando Amorim",
   zipcode: "54250610"
 }}

# Using a proxy with authentication
iex> Correios.CEP.find_address("54250610", proxy: {"myproxyhost", 8888}, proxy_auth: {"myuser", "mypass"})
{:ok,
 %Correios.CEP.Address{
   city: "Jaboatão dos Guararapes",
   complement: "",
   neighborhood: "Cavaleiro",
   state: "PE",
   street: "Rua Fernando Amorim",
   zipcode: "54250610"
 }}

Changelog for version 0.5.0:

Added

  • Support for proxy configuration. Issue #7

Changed

  • Update dependencies.

Check it out at:

IoT Traffic Light for CI Status Updates

This has been a pretty long-running hobby project of mine: A real world traffic light that shows the status of our CI server. I think I maintained and overengineered this for almost a decade and implemented it with various hardware and programming languages.

The newest iteration is done in Elixir, with the help of Nerves and Phoenix.

Client (on a Raspberry PI): https://github.com/fabrik42/traffic-light-client-elixir

Server: https://github.com/fabrik42/traffic-light-server-elixir

IntelliJ Elixir v11.7.0

Changelog

Enhancements

  • Convert annotator.ModuleAttribute to Kotlin
  • Apply optional Kotlin transformations.

Bug Fixes

  • Check if at least one resolution for module attribute references is valid

    Previously, it was checked if module attributes resolved to exactly one declaration, but this is no longer true with the looser reference resolution that allows invalid results for PisPolyVariantReference. resolve() will return null when there is more than one result from multiResolve even if some are invalid, so we need to explicitly check if the PsiReference is a PsiPolyVariantReference and if so check if any are valid.

  • Fix deprecation warnings for annotator.ModuleAttribute.
  • Quick fixes for inlinables in annotator.ModuleAttribute.
  • Fix iex and erl arguments not being saved for IEx Mix Run Configurations.

Installation Instructions

Adding Gleam to a Mix project

Minimal Elixir Mix project that also compiles Gleam code.

https://github.com/midas-framework/elixir_with_gleam

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.

From Zero to Custom email templates and layouts with Bamboo

Seen a ticket in the repo a few weeks back and thought I would take a stab at showing people how easy it is to use Bamboo as your mailer in Elixir.

https://morphic.pro/posts/how-to-use-bamboo-with-custom-layouts-in-phoenix

Telemetría → :telemetry convenient wrapper

I am glad to announce the first Telemetria release. https://hexdocs.pm/telemetria

It takes care of event registration (through compilation manifest), runtime and release configs (through config provider), and basically allows to wrap any expressions and/or functions to “telemetryized” calls.

If you hesitated to add telemetry to your project, it’s a great time. Example from docs:

defmodule MyMod do
  import Telemetria

  defpt pi, do: 3.14
  deft answer, do: 42 - pi()

  def inner do
    short_result = t(42 * 42)
    result =
      t do
        # long calculations
        :ok
      end
  end
end

Enjoy. Feedback is very welcome, as always.

Elixir Wizards S4E2 Mohd Maqbool Alam on System and Application Architecture

Second episode of the Elixir Wizards podcast is out today. Check your podcast feed or listen here: https://podcast.smartlogic.io/s4e2-alam

Converting snake_case keys to camelCase in Elixir

How to convert snake_case to camelCase in Elixir.

Printex V1.1.0

Elixir Library for printing debugging date types to terminal with colors and formats for easy identification.

scree shot

Using Mnesia in an Elixir Application

Learn more about Mnesia, see when you would use such a tool, and take a look at some of the pros and cons of using it. After covering the fundamentals of Mnesia, we’ll dive right into a sample application where we’ll build an Elixir application that uses Mnesia as its database.

https://blog.appsignal.com/2020/05/19/using-mnesia-in-an-elixir-application.html

Let’s Code: Contact Form in Phoenix – The Schema

I’m writing a series on adding a contact form to a Phoenix 1.4+ application. This first post covers the schema and how I approach data modeling in Phoenix applications that use Ecto. I hope you find it useful 💜

https://zachporter.dev/posts/lets-code-contact-form-in-phoenix-part-one/

Write your own Phoenix PubSub adapter

Short guide on writing your own Phoenix PubSub adapter, with an example based on EventStore.

https://www.erlang-solutions.com/blog/how-to-write-a-phoenix-pubsub-adapter-tutorial-example-based-on-eventstore.html

Many to Many relationships in Ecto - Part-02

https://www.youtube.com/watch?v=_ut8o0fdXRo&t=6s

IntelliJ Elixir v11.6.1

Changelog

v11.6.1

Bug Fixes

  • Support diffs in pattern matching added in Elixir 1.10.0 in the ExUnit formatter. Ports elixir-lang/[email protected].
  • Only require at least the number of children to safely get a specific child instead of exact number to allow getting prefix children when there are grammatical errors.

Installation Instructions

Managing Multi-Step forms with Phoenix LiveView

Big forms are a pain to manage— even harder to manage when you need to change values based on previous input and compute data based on that new selection. Phoenix LiveView can make this easier. Check out some techniques I used to help organize big forms.

https://bernheisel.com/blog/liveview-multi-step-form/