Releasing an Elixir Umbrella App with Mix Release and Config

Haven’t had a chance to play around with Elixir’s new release tooling? Learn how to configure your umbrella app for release without Distillery by using mix release, the new Config module with runtime configuration specifications and Docker. https://elixirschool.com/blog/releasing-an-umbrella-app-with-docker-and-mix-release/

Converting to LiveView -- Step By Step (video and article)

Phoenix LiveView was undoubtedly the star of ElixirConf 2019. On the back of that excitement, I recently gave a meetup talk where I converted a traditional controller-driven application to a LiveView app — live! Now I’ve taken that talk and written a blog post describing how easy it is to do this on your own — step by step. The talk video is in the post as well!

https://geoffreylessel.com/2019/converting-to-phoenix-liveview/

Archivist: Plain-Text Blogging with Arcdown and Markdown

Hey all! FunctionHaus and myself have just released version 0.3.1 of Archivist, a plain-text blogging engine similar to Nabo that parses articles as Arcdown by default and uses Earmark to parse content as Markdown.

Archivist takes a similar approach to Nabo, but with some key differences:

  • Articles are formatted in Arcdown format by default, allowing for more robust articles and article features.

  • Content parsing and sorting mechanisms are exposed as anonymous functions, easiliy exposing custom functionality.

  • Articles can be organized into nested topic directories for better organization. Topics are parsed in a hierarchical structure.

  • Use of an “intermediate library pattern” is supported, allowing content and articles to be stored in a dedicated library and separate repository.

  • Default attributes are included for both author names and email addresses

  • created_at and published_at timestamps are permitted

  • Flexible tags can be applied as desired to any article

  • Custom content constraints throw warnings during compilation if violated

  • Slug uniqueness is enforced by default and triggers compile-time warnings

  • Image files can be stored alongside articles, and accessed with helpers

Archivist is under active development and will continue to be improved as it is deployed into production in multiple contexts. Issues are being actively tracked and addressed at the Archivist issue tracker on GitHub.

Please feel free to provide feedback and questions regarding the platform and its usage and we’ll do our best to assist.

Current packages for both Archivist and Arcdown are published to hex.pm.

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.

ElixirMix Podcast 070: Home Automation Using Radio Frequencies with Jon Carstens

In this episode of ElixirMix, we talk with Jon Carstens about using Nerves Project, radio controllers and ingenuity for hacking the home. We also cover NervesHub’s new IEx shell, how it was built, what SmartRent.com does and much more!

Podcast Episode

Creating a Rate Limiter – Live Stream Archive

Eric’s Elixir live stream is back! Here’s the archive from yesterday’s session, where he added a rate limiter to the message sending part of Grapevine.

https://www.youtube.com/watch?v=6tZHxR-3jio

Sharing Phoenix templates across controllers & views

I published a new tutorial: https://alchemist.camp/articles/shared-phoenix-templates

Whenever you use Phoenix’s generators to create a full HTML scaffold, you’ll see that in the template directory, there’s a form.html.eex “partial” or sub-template that’s used inside of both the new.html.eex and the edit.html.eex.

The entire form is embedded inside those new and action templates with just this single line:

<%= render "form.html", Map.put(assigns, :action, Routes.article_path(@conn, :create)) %>

You can use the same pattern to embed any eex template into another in the same directory. But some templates are things you’d want to render from any template. An email list sign-up form, for example, might appear within a blog post, an about page and many other parts of the site.

This tutorial goes through how to make a clean setup for these “shared templates” so it’s just as easy to create and use them as any other template.

IntelliJ Elixir v11.1.0

Enhancements

  • Update gradle plugins

    • gradle-intellij-plugin (org.jetbrains.intellij) to 0.4.10
    • org.jetbrains.kotlin.jvm to 1.3.50
    • de.undercrouch.download to 4.0.0
  • Update IDEA version in builds

    • 2019.2 -> 2019.2.2

Bug Fixes

  • Don’t log if partial or no header typeID is read. It happens too often due to .beam files being written partially to disk during the build process. They will be re-indexed when they are complete.
  • Update gradle intellij plugin to fix runIde on newer macOS.
  • Fix ConcurrentModificationException in Structure View

    Java 9 fixed a bug (https://bugs.openjdk.java.net/browse/JDK-8071667) in HashMap where computeIfAbsent did not check for concurrent modifications, and it turns out that TreeElementList was using concurrent modifications, so it was now broke.

    Fixed by use get or put if it is absent, so that putNew can ensure that the CallDefinition is in the TreeElementList before it is added to the MutableList<TreeElement>, which was the original reason why there was a put inside of computeIfAbsent, which would have put when the function returned anyway.

Installation Instructions

On the Utility of Phoenix LiveView

Brief post documenting why I think LiveView is such a big deal: https://jclem.net/posts/on-the-utility-of-phoenix-liveview

Eric Oestrich on ExVenture – Elixir Internals | Smart Software Podcast

https://podcast.smartlogic.io/season-two-oestrich

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

Web UI for SMS Messaging using Phoenix channels.

Web UI for SMS Messaging using Phoenix channels.

Demo: https://websms.erdem.dev/

Repo: https://github.com/b-erdem/sms-im

Ecron- A lightweight/efficient cron-like job scheduling library.

Ecron is very simple and small, but it’s designed to be so, keeping lightweight and fully customizable.

  • Both cron-like scheduling and interval-based scheduling.
  • Well tested by PropTest 100% coverage.
  • Use receive after at any given time (rather than reevaluating upcoming jobs every second/minute).
  • Minimal overhead. ecron aims to keep its code base small.

Cowboy architecture and execution flow

A little in-depth blog post about cowboy and ranch OTP architecture. I tried to explain how cowboy handles requests and sends the responses.

https://scarfacedeb.me/posts/cowboy-architecture/?ref=sub

Application Layering - A Pattern for Extensible Elixir Application Design

An in-depth walkthrough of Application Layering, a design technique for building maintainable, adaptable and flexible large-scale Elixir codebases.

https://aaronrenner.io/2019/09/18/application-layering-a-pattern-for-extensible-elixir-application-design.html

gen_rmq 2.0.0 version release

GenRMQ is a set of behaviours meant to be used to create RabbitMQ consumers and publishers.

Changelog:

  • Add support for more exchange types
  • Update documentation for exchange types
  • Set minimum required elixir version to 1.7

Up And Running With Faktory In Elixir

This post covers how to get an Elixir application set up with Faktory to allow us to process jobs in the background of our applications and take full advantages of the many features Faktory has on offer.

Up And Running With Faktory In Elixir

Oban Recipes Part 5: Batch Jobs

In the fifth Oban recipe we consider monitoring jobs as a group with the power of pattern matching and queue introspection.

Oban Recipes Part 5: Batch Jobs

LazyFor → Kernel.SpecialForms.for/1 but returning stream

The stream-based implementation of Kernel.SpecialForms.for/1.

Allows the same syntax as for and acts the same way. This is an initial release. It does not yet support :into, :uniq and :reduce options and bitstring comprehensions.

Everything else is supported.

https://hexdocs.pm/lazy_for

Gearbox - A functional state machine with an easy-to-use API, inspired by both Fsm and Machinery

Gearbox focuses on doing one thing and doing one thing right – state transitions. No surprise callbacks, no process management overhead, just pure functional state transitions.

Read more about the description/rationale behind the project over at GitHub!

GitHub

ElixirMix Podcast 069 - Distributed Databases with Wiebe-Marten ("Marten") Wijnja

In this episode of ElixirMix, we talk with Wiebe-Marten about designing for distributed systems. We discuss the common fallacies, the Byzantine General’s problem, CRDTs, GenServer.multi_call and databases like Mnesia, Cassandra, CouchDB, Riak and much more!

Podcast Episode

Password breach lookup and other password validation rules

Together with @danschultzer I wrote a guide on doing password validation rules in Pow based on the NIST SP800-63b recommendations. https://powauth.com/guides/2019-09-14-password-breach-lookup-and-other-password-validation-rules.html