ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.
Created a library Every to use with periodic tasks when you need to schedule you task at even intervals, for example every
every 2 hours,
every day and so on. And can be used with
# Lets say we want to trigger our task every 5 minutes and current time is 12:02 # so next call will be at 12:05, 12:10 ... 12:55 ... Process.send_after(self(), :work, Every.minutes(5, nil)) # If we want to trigger every minute Process.send_after(self(), :work, Every.minute()) # If we want to trigger every hour Process.send_after(self(), :work, Every.hour()) # If we want to trigger every 2 hours Process.send_after(self(), :work, Every.hours(2, nil)) # If we want to trigger every day Process.send_after(self(), :work, Every.day())
I just published a post today ‘Robust compute for RDF queries: Managing fault tolerance in Elixir with supervision trees’.
The post briefly reviews the process model of Erlang (and Elixir) and introduces the following abstractions in Elixir: GenServer, Supervisor, and DynamicSupervisor.
It then develops a demo Elixir application that can be used to query DBpedia for random resources and save the results into GenServer processes. It goes on to show how processes can be created under OTP supervision trees both statically and dynamically and how they are automatically recreated when they error.
This is the first part of what will be a series on unit testing in Elixir, including some ideas about what a unit test in Elixir is exactly and some tips for writing unit tests.
Iteraptor is a tiny library to
filter deeply nested structures in Elixir.
Starting with v1.3 it iterates through
MapSet as well (besides lists, maps, and keywords.)
from_flatmap transform will return list for what was mapset since there is no way to understand it was originally a mapset based on the flat structure.
Morphix is a tiny library of functions to perform transforms on maps and arrays. Functions include converting strings to atoms in maps, flattening nested data structures, and removing nils from maps. This latest update (0.4.0) adds removing nils from lists, nested lists, lists nested inside maps, etc.
A review of SQL joins and how to do them in Ecto.
In this episode of Elixir Mix, the panel talks with Arjan Scherpenisse who is the technical co-founder at BotSquad. Arjan lives in the Amsterdam area of the Netherlands. Also, he is currently working with Miracle Things. Check out today’s episode where the panel and Arjan talk about his article and his latest projects.
I recently started extending Gossip, a chat network for text based games, with other services. When expanding these, I wanted to keep them up to date on any changes that occurred on Gossip’s backing data.
For this I came up with a sync protocol that lives on top of the standard socket, that gets enabled for higher privileged applications. This was really cool to write, so I hope everyone checks it out!
In this edition of Elixir Alchemy, we’ll dive into hot code reloading to see how Erlang’s code server handles seamless code upgrades in Elixir. To understand how all this works, we’ll start at the module level and work our way up. Let’s get started! https://blog.appsignal.com/2018/10/16/elixir-alchemy-hot-code-reloading-in-elixir.html
This post talks about how we used Interceptor to easily replace the deprecated ExStatsD by the recommended Statix library: https://medium.com/onfido-tech/interceptor-easily-intercept-your-elixir-function-calls-3fb17ee18826
EventBus.Model.Event struct optional attribute type specs to allow
Update type names and docs for the consistent naming convention (Note: there is no logic or method name change)
Update the Travis script to prevent breaks on merges:
- Include dialyzer warnings
- Include coverage
- Include credo checks
Part 1 of Getting Started with Ecto covers how to install and configure Ecto. Check it out and share it.
Slax uses the Erlang library
:erlsom to do the actual parsing and provides some Elixir niceties to make it a little easier to work with. I plan to follow up with another blog post around some of the implementation details early next week.
I just published a new post today ’Working with SHACL and Elixir: Applying SPARQL.ex to RDF shapes’:
Here I focus on a simple use case with SHACL and an RDF shape used to provide a template description for the result graph. That is, instead of using a specific SPARQL query we will generate SPARQL queries from the RDF shape that defines the valid result graphs.
Spandex 2.4.0 has been released, adding support for function decorators to easily create traces and spans based on function calls.
defmodule MyThing do @decorate span() def do_something_complicated(arg1, arg2) do # ... end end
This will generate a span called
MyThing.do_something_complicated/2 that reports how long the function took to execute and reports errors that are raised.
In this episode of Elixir Mix, the panel talks to Kate Travers. She was a student/apprentice with Flatiron School and now is on staff as a software engineer! We talk about adopting Elixir at Flatiron School and how Pattern Matching is a super power. Kate has been speaking on the topic too.