Digests » 84

this week's favorite

Comparing Elixir and Go

Elixir and Go have both grown significantly in popularity over the past few years, and both are often reached for by developers looking for high concurrency solutions. The two languages follow many similar principles, but both have made some core tradeoffs that affect their potential use cases.

How (and when!) to store images in your database with Elixir & Phoenix

In the examples below, we’ll be working with an existing Ecto model called Recommendation, which already contains a URL to an image we’d like to fetch and store in our database. To do this, the first step is to add a binary field to the DB schema.

Are Ports Fast Enough? – Benchmarking Language Interop with Elixir • Noah Muth

Some background: I’m exploring the possibility of using Elixir to drive a game engine. Elixir is a great candidate for a scripting language because of its user-friendly nature, but it’s not fast enough to power a rendering engine by itself. For that, you need a native language like C, Rust, or Go, with some means of communication between the Elixir gameplay logic and the native rendering code.

Nested Forms in Phoenix

I recently spent some time dealing with nested forms in Phoenix. Nested forms are great when you want to create multiple database records in a single transaction and associate them with each other. I am new to Phoenix and really struggled to find any resources that helped me with my specific problem. I decided to document what I learned in the process in hopes of helping others that are new to Elixir and Phoenix.

Performance of idiomatic Elixir code?

I was inspired by this post in /r/ProgrammerHumor, and decided to see how idiomatic Elixir code would run compared to idiomatic Ruby code. The task is simple - given some string, split it into two substrings, one containing all the vowels and the other all the consonants. For this exercise, we'll assume the string has no spaces or any other characters except English vowels or consonants.