Using Postgres range data type in Ecto
Ecto is an amazing database wrapper and let you customize your needs. With Postgres we have a data type for ranges and this post shows you how to implement that.
Check it out: https://pedroassumpcao.ghost.io/using-postgres-range-data-type-in-ecto/
Credo v0.4.8 released!
Credo is a static code analysis tool with a focus on code consistency and teaching.
This version’s CHANGELOG:
-
Add
exclude_functionsoption toPipeChainStart -
No longer report issues in case of ambiguous aliases in
AliasUsage -
Fix false positives for
LargeNumbersin Elixir>= 1.3.2(again) - Lots of refactorings
Building Phoenix Battleship (pt. 5)
Part 5 of the series about building Phoenix Battleship, in which we’ll cover shooting turns :)
http://codeloveandboards.com/blog/2016/08/08/building-phoenix-battleship-pt-5/
Dynamically Load a Module in Elixir using Macros
Elixir way of keeping code clear and reusable is creating modules and importing them when needed. However import method is easy to use for static module names, it requires more afford to load dynamically assigned modules.
IntelliJ Elixir v4.1.0
IntelliJ Elixir v4.1.0 has been released:
-
Multiple Alias (
A.{B, C}) parsing, quoting, and Go To Declaration (BinA.{B, C}will go toA.B) - Code Folding
Creating a supervision tree for Elixir GenEvent behavior
How to implement a fault tolerant event processing that is part of a event sourcing application.
Check it out: https://pedroassumpcao.ghost.io/creating-a-supervision-tree-for-elixir-genevent-behavior/
Simple Bayes v0.9.0 - use with any databases if you wish :)
A new version of simple_bayes is released - now you are able to get the encoded data and store it anywhere. :)
Check it out: https://github.com/fredwu/simple_bayes
Free book - Versioned APIs with Phoenix
Differently from building a house, software evolves. In this free book you’ll how a software project and product can benefit from using versioned APIs, togheter with three different strategies.
Family Ties Part 10 posted, discussing types and records in Erlang and Elixir
Posted the tenth of a continuing series of articles on similarities and differences between Erlang and Elixir. This post discusses records, types, and dialyzer support in the two languages.
http://daniel-azuma.com/blog/2016/08/02/family-ties-10-my-type-of-language
Index of previous articles in the series: http://daniel-azuma.com/articles/family-ties/
WPool 2.1.0
A new version of wpool was just released on hex.pm!
Keep in mind, it contains some small backwards compatibility breaking changes:
-
removed
wpool:call/5. Usewpool:call/4with appropriate parameters instead. -
removed tracing utilities and associated functions (like
wpool_process:age/1). Use external tracing libraries, like recon, instead. -
removed
wpool_shutdown. It was used for tracing purposes only. -
removed
wpool_pool:wpool_set/2. Usewpool_pool:next/2if you need to change that property. The other properties should not be changed from outsidewpool_pool.
ESpec.Phoenix is redesigned!
I’ve just released ESpec.Phoenix v0.5.0.
What is new? Almost all!
I’ve completely changed the approach to testing Phoenix apps with ESpec. Previous versions of the library were more ‘rails way’ then ‘phoenix way’. And it was bad.
Now ESpec.Phoenix is a simple wrapper around ESpec which follows existing conventions of testing phoenix apps. So you can easily migrate from ExUnit to ESpec.
Enjoy!
Flippant - Fast feature toggling backed by Redis
Flippant brings feature toggling to Elixir. Compose groups and rules dynamically to roll out new features. Also, a get an efficient breakdown of every feature the current user has access to—ideal for single page apps.
Flippant is backed by Redis in production, but ships with a Memory adapter for testing. The readme has a detailed walk through to introduce the concepts and get you started.
Building an Elixir Release into Docker-image using gitlab-ci. Part 1
I wrote a blog post about using gitlab-ci and docker to build elixir/phoenix releases. We are using this way to build and deploy our services. I will describe it in details in the next parts of this posts series.
Elixir application in Docker container
I’ve written a post about how to run Elixir application in Docker container. There you can find a very simple Docker config, which I’ve written for my small project.
Bamboo SMTP Adapter v1.2.0
We released a new version of Bamboo SMTP Adapter that should fix some issues with attachments display with some webmail clients (like Gmail).
More information on Github
Is Phoenix deployment really that hard?
How much does the Erlang’s great but unexplored hot code reloading complicate the deployment as we know it?
Read more on Phoenix on Rails blog.
Trans - Embedded translations for Elixir
Trans is a library that helps you managing embedded model translations, it is inspired by the great hstore translate gem for Ruby.
Instead of creating multiple tables for storing basic properties and translation data, Trans leverages modern RDBMs support for unstructured data and uses a single column containing the translations in the form of a dictionary.
Trans code is available in GitHub and can be installed into your application from Hex. For more information refer to the official docs and the README on GitHub. Issues, comments and pull requests are more than welcome :)
Pt. 3 of Deploying a Simple Web App to Heroku
This is the third post of building a basic web application using Plug.Router, Ecto, and the Postgres jsonb datatype. In this post we clean up the snapshot schema a bit and then handle the post logic. In the end, the application has the basic post and get routes, stores records in the database, and of course still deploys through our CI pipeline.
http://www.johnpdaigle.com/complexable/2016/07/28/actually-finishing-the-snapshot-application.html
Collision - A library for polygon collision detection
I’ve been working on a collision detection library over the last week. This weekend I published it to Hex and wrote a short introductory blog post about it:
https://travispoulsen.com/blog/posts/2016-07-31-Collision.html
Run Length Encoding in Elixir
This weekend I tackled the Run Length Encoding problem at Exercism.io.
It was a lot of fun; I highly recommend Exercism and the Elixir track!
Here’s my solution with annotations:
http://www.jakeworth.com/run-length-encoding-in-elixir
Just learning this language; feedback welcome at Exercism:
http://exercism.io/submissions/2c4d596c0a054c3e80db0cef6314e2c0
