Digests » 243

sponsor

Inertia.js Adapter for Phoenix

This package integrates Intertia.js with Phoenix following the Inertia.js protocol. Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.

this week's favorite

Elixir Month

Yes, the Elixir. I’ve decided to use the cold February weather, as well as the relative project calm, and see how far I can go with it.

Diamond Square algorithm fractal genration library implemented in Elixir

The diamond-square algorithm is a method for generating heightmaps for computer graphics. It is a slightly better algorithm than the three-dimensional implementation of the midpoint displacement algorithm which produces two-dimensional landscapes. It is also known as the random midpoint displacement fractal, the cloud fractal or the plasma fractal, because of the plasma effect produced when applied.

Complex Unique Constraints with PostgreSQL Triggers in Ecto

I recently needed to enforce a database constraint similar in spirit to a unique index, however the criteria for what should be considered “unique” was more complex than what a simple unique index in PostgreSQL would be able to deal with. Knowing that Ecto works by intercepting an error raised by the database, I set out to see if I could implement the complex unique constraint logic in the database and still be able to use the Ecto.Changeset.unique_constraint/3 validation without needing to modify any Elixir code.

Deploying Phoenix with CircleCI

By the end of this article, we will have a simple Phoenix application that will run tests using CircleCI, then can be deployed by pushing a Git tag to your repository.

Deploy Elixir apps utilizing Rust NIFs on Render.com

After a long week of dealing with servers at my day job I had no urge to do the same with my side projects. I looked at Render.com and decided to try them out. All was well until I decided to add a mix package that built a Rust NIF. The default build container used by Render for Elixir projects didn't include Rust but after chatting with their team on Slack I came up with a solution, Docker.