This week, Jonathan Bennett and Lars Wikman chat about Elixir and Nerves — a modern language that’s a take on Erlang, and an embedded Linux approach for running Elixir code on devices.
- https://underjord.io
- https://elixir-lang.org/
- https://nerves-project.org/
- Introducing Elixir and the ecosystem from Oredev 2023
- Introducing Nerves from Oredev 2024 (just released)
- The Soul of Erlang & Elixir, by Sasa Juric
Subscribe to catch the show live, and come to Hackaday for the rest of the story!
Did you know you can watch the live recording of the show Right on our YouTube Channel? Have someone you’d like us to interview? Let us know, or contact the guest and have them contact us! Take a look at the schedule here.
Direct Download in DRM-free MP3.
If you’d rather read along, here’s the transcript for this week’s episode.
Theme music: “Newer Wave” Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
I worked with Elixir & Nerves in my previous job and it was a a joy (still working with Elixir, but sadly not embedded anymore). Device I was building was a bridge between PLC, POS, NFC card scanner, a bunch of custom controllers on a RS485 bus, and a backend in “the cloud”. The device was based on RPi CM4, and was overpowered for what we needed (but during & post- COVID, you get what you get). Obviously set of libraries to interact with protocols, like Modbus, was limited but writing them in Elixir was a breeze! Binary & bitstring syntax is superb! It allows you to build protocols almost declaratively. When I compared my protocol implementation for NFC scanner to example one provided by manufacture, it was like 1/5, less buggy and more complete. On the other hand, libraries for interacting with backend, web ui, storage, network error reporting/logging, are not a problem at all.
Nerves part brings minimal Linux image based on Buildroot, provisioning, A/B partitioning, OTA, firmware signing, network config, remote access, app failure restarting.