Long-time listener (and YouTube aficionado) Owen Bickford joins Jerod backstage to discuss his recent contribution to Changelog’s Elixir/Phoenix-based open source platform.
Wondering why your Phoenix application is recompiling dozens or hundreds of files every time you make a small change? Cross-module compilation dependencies are often to blame.
Phoenix v1.5 has been released with LiveView integration. This release makes it easier than ever to build interactive, real-time applications. We put together a quick screencast to show just how much you can accomplish in 15 minutes with LiveView
After José’s announcement yesterday I just had to get my hands a little dirty and kick the tires.
José and the Phoenix team just announced this cool new dashboard for monitoring real-time performance of your production Phoenix systems. I’ll be setting this up and kicking the tires on changelog.com ASAP.
Jam session! I sat down (metaphorically) with Phoenix’s new LiveView feature to see if I can integrate it into our admin to provide a Google Docs-esque experience for podcast co-hosts.
This is my first long-form video where I work toward a goal with no clue how to actually get there. Please let me know if you dig this style in general and/or if you have any advice on the particulars.
José Valim, writing on the Dashbit blog:
I have thought about launching “Devise for Phoenix” probably hundreds of times. I had long conversations with Chris McCord (creator of Phoenix) and co-workers about this. Helping Phoenix users get past the burden of setting up authentication can be a great boost to adoption. At the same time, I never found a proper way to approach the problem.
You can probably guess what’s coming next…
About 2 months ago I decided to handwrite a simple and secure authentication solution on top of a Phoenix application.
Cool stuff. Click through to learn the details of what he came up with (and what’s happening next).
Vulns sourced from the community-maintained elixir-security-advisories.
Johanna Larsson built the super cool Hex Diff tool for the Elixir community. What does it do?
In short, you input any Hex package name and a version range, and it will generate a highlighted git diff for you, right there in your browser. Not only that, but you can also share the link to the diff, and even highlight a specific row.
In this post on her blog, Johanna goes into the details of how she built the project, how it works, and issues she ran into along the way.
The Lumen Project is an alternative implementation of the Erlang VM, more known as the BEAM. It is designed to work in WebAssembly with the specific goal of bringing Elixir and Erlang to the browser with minimal overhead, tightly compiled rather than porting a full VM. Can it replace JS for some developers?
This is a great resource to have at your disposal while reading the official Elixir docs.
While working throughout the guide - there were multiple positions where the ideolog seemed overwhelming resulting to various logical bugs because of shorthand syntax mismatch. There is no repository available to cross-check your results either to fix your bugs. Hence - I thought it would be nice to have this as a reference guide to how you need to implement your project.
Jerod is joined by Chris and Desmond (co-hosts of the ElixirTalk podcast) to catch up on what’s moving and shaking in the Elixir and Phoenix communities. We discuss what’s attractive about Elixir, what it means to have the language finalized, why folks are so excited by Phoenix LiveView, the ambitious new Lumen project that’s bringing Elixir to WebAssembly, and more.
What I’m most excited for with Phoenix LiveView isn’t necessarily the cool technology that it really is, but more the freedom that it gives me to quickly implement nice-to-have features that would otherwise be too much work to bother with.
Conventional template languages like EEx use a form of interpolation to embed a programming language into a markup language, which can result in some ugly code that can be difficult to write and debug.
Temple is written using pure elixir.
There are some good ideas here, for sure. (Click through for code samples.)
My concern with this (and with pretty much all non-HTML style template languages) is cognitive overhead for folks who’d rather be writing HTML. That being said, if I were creating a web app from scratch all by my lonesome, I’d 💯% give Temple a go.
The Discord team bumped up against some limitations of the BEAM (Erlang’s virtual machine) when dealing with rather large data structures:
The double-edged sword of immutable data structures is that mutations are modeled by taking an existing data structure and an operation and creating a brand new data structure that is the result of applying that operation to the existing data structure.
This meant that when someone joined a server — internally referred to as guilds — with a Member List of 100,000 members, we would have to build a new list with 100,001 members in it.
You’ll want to click through and read all of the data structures they tried to fix this problem. It’s some seriously solid engineering and I love how they continued to measure and push themselves further. Finally, they reached for Rust thanks to BEAM’s NIF feature and really scaled up the speed.
José Valim, announcing the just-released Elixir v1.9:
… releases was the last planned feature for Elixir. We don’t have any major user-facing feature in the works nor planned. I know for certain some will consider this fact the most excing part of this announcement!
This doesn’t mean the language will stop moving forward, but you’ll have to read the full announcement to get the full picture. The Releases feature looks shiny, for sure. Congrats to all involved for yet another awesome milestone!
Phoenix 1.3 introduced the idea of Contexts, which I’m generally very much in favor of. However, I wish there was a little bit more structure to the idea. It’s so open ended that I’ve found deciding where best to put a function kind of tricky, and then I frequently end up with duplicate behavior across contexts or have a hard time finding functions later on because the module they’re in made sense at the time, but it doesn’t make as much sense now.
So, I’m proposing the idea of a Primary Context and a Secondary Context.
I’ve also struggled to determine just how to use Contexts to my benefit. It seems that Devon is trying an add more structure approach whereas I have (so far) gone with a YAGNI approach.
Adam Wathan was gracious enough to invite me on Full Stack Radio to discuss why and how we built this very platform that I’m using to write and you’re using to read.
Most of the show focuses on Elixir itself, with topics ranging from pattern matching and immutability to the pipe operator and deployment. Adam also got me to confess a dirty little secret… I still don’t really know what GenServers are! 😱
Oban’s primary goals are reliability, consistency and observability. It is fundamentally different from other background job processing tools because it retains job data for historic metrics and inspection. You can leave your application running indefinitely without worrying about jobs being lost or orphaned due to crashes.
Nick Janetakis joins Jerod backstage to talk shop. We discuss how Nick is using the Changelog.com source code as a guide to build his video course platform, coding practices we’ve developed over the years, how to balance between shipping features and creating content, newsletters as the new social network, how Nick makes his videos, and a whole lot more.
Lots of goodies have landed in Elixir lately, including
mix release, an official
Config module, a
~U sigil for UTC datetimes, and much more. José Valim lays out all of the details in this post.
In this short Q&A, Sergiy Kukunin, an Elixir expert, shares his thoughts on why Elixir is becoming so popular, its core advantages, and its drawbacks.
Sergiy also shared this as a takeaway to getting started with Elixir.
…the syntax of Elixir has some things in common with Ruby. The languages are entirely different, but it is always good to see symbols and elements you are used to. The simplest thing is to use some of the new Elixir-compatible web-development frameworks. The most popular web framework for Elixir is Phoenix. You should definitely give it a try, especially if you are used to using Ruby on Rails. This will simplify development while still making the app faster and more reliable.
The dwyl team went “all-in” on Elixir back in 2016 and are often asked if they would make the same choice again. Here’s the TLDR of their answer:
The question of “Which Programming Language” is one we ask ourselves fairly regularly, and is the reason that lead us to discover and decide on using Elixir in 2016. We periodically survey the “up-and-coming” languages like Kotlin, Julia, Lua, etc. and keep concluding that our choice of Elixir is the one we would make again right now. Elixir is the “full package” from idea to deployment!
Click through for their full reasoning, which includes why they switched from Node.js to Elixir in the first place, Elixir’s pros/cons they’ve learned along the way, and a list of other languages they would choose given different use cases.