QFM014: Elixir Reading List April 2024

Everything that I found interesting last month about the Elixir ecosystem.

Tags: qfm, elixir, reading, list, april, 2024

elena-mozhvilo-9pHHUYDnNMs-unsplash.jpg Photo by Elena Mozhvilo on Unsplash

April’s “Elixir Reading List” provides another dive into what’s new in the world of Elixir programming, this month showcasing articles that focus on optimisation, best practices, and enhancing the user experience of Phoenix apps.

Sparkline SVG is an Elixir library that simplifies visualising trends with customisable SVG-based sparkline charts. How to Generate a PDF on a Page Behind Auth in Elixir addresses the challenge of securely generating PDFs for authenticated pages, sharing clever solutions using ChromicPDF and WeasyPrint.

For developers seeking best practices, Understanding Anti-Patterns in Elixir helps you avoid pitfalls in functional programming with Elixir, while Evaluating Phoenix Admin Frameworks offers a candid comparison of admin frameworks to guide you in selecting the best admin UI for your Phoenix apps.

Lastly, Elixir Development Using Podman with VM in Parallels and Shared Folders illustrates how to efficiently set up an Elixir development environment optimised for macOS. This meticulous guide is particularly valuable for users who want to replace Docker with Podman, sharing expert-level insights on configuring Parallels and shared folders for streamlined workflows.

This month’s articles collectively emphasise the importance of practical solutions, productivity, and technical excellence and highlight Elixir’s strengths and flexibility for runtime performance and developer productivity.

And much more!

As always, the Quantum Fax Machine Propellor Hat Key will guide your browsing. Enjoy! elixir-propellor-hat-key.png

Source: Photo by Elena Mozhvilo on Unsplash


4-out-of-5-hats Sparkline SVG: An Elixir Library for Generating SVG Sparkline Charts: The webpage provides detailed technical information and structural elements for a GitHub repository, specifically focusing on a project named ‘Sparkline SVG’. This Elixir library is designed to generate simple, SVG-based sparkline charts without dependencies. Key sections highlight installation instructions, usage examples, and customisation options, making it easier for developers to integrate this tool into their projects. The library facilitates the creation of visually appealing charts to represent data trends compactly, with options to customise the appearance through CSS or inline options.

#GitHub #Elixir #SVG #DataVisualization #SparklineCharts


3-out-of-5-hats How to Generate a PDF on a Page Behind Auth in Elixir: This article describes generating PDF files for pages that are behind authentication, using Elixir. It discusses the challenge of securely creating PDFs from authenticated web pages and introduces solutions such as generating a user session token that can be recognised by PDF generators like ChromicPDF and WeasyPrint. The process involves creating a cookie corresponding to a logged-in user session and using it to access and render the required pages as PDFs, thereby overcoming the common hurdle of maintaining authentication during the PDF generation process.

#Elixir #PDFGeneration #WebDevelopment #Authentication #Programming


4-out-of-5-hats Understanding Anti-patterns in Elixir Programming: The document provides a comprehensive guide on anti-patterns in Elixir programming, detailing common coding mistakes known as “code smells.” It aims to help developers identify and understand the pitfalls of these anti-patterns across four main categories: code-related, design-related, process-related, and meta-programming. The guide also includes examples, problems caused by these patterns, and solutions for refactoring. Furthermore, the initial catalog of anti-patterns was proposed by Lucas Vegi and Marco Tulio Valente, supported by additional security resources from the Erlang Ecosystem Foundation’s Security Working Group.

#Elixir #Programming #AntiPatterns #CodeSmells #SoftwareDevelopment


3-out-of-5-hats How to handle file upload using Trix editor in a Phoenix application: This article by Jason Kaniekete provides an in-depth guide on integrating file uploads into Phoenix applications using the Trix editor. Starting with the basics of setting up Trix and configuring the Phoenix environment, the tutorial then dives into local file uploads to the server. It meticulously covers handling file uploads, including creating routes, setting up controllers, and writing client-side JavaScript for uploading files. Additionally, it explores external file storage options, using Backblaze B2 cloud storage as an example, to demonstrate how to configure an S3 adapter for file uploads. The guide is comprehensive and offers sample code to ease implementation.

#Phoenix #TrixEditor #FileUpload #Elixir #WebDevelopment


4-out-of-5-hats Implementing Natural Conversational Agents with Elixir: Sean Moriarity details his project to build an advanced conversational agent named Nero using Elixir. By integrating technologies like Nx, OpenAI APIs, and ElevenLabs, the post showcases the evolution from a simple home automation system to a more sophisticated conversational model. Efforts to reduce latency and enhance the conversational experience, including real-time speech-to-text processing and seamless integration with machine learning models, underline the technical depth of the project. His journey highlights the continuous improvement mindset, leveraging Elixir’s capabilities for building responsive and interactive applications.

#ConversationalAI #Elixir #MachineLearning #OpenAI #ElevenLabs


3-out-of-5-hats AWS Clients for Elixir: Simplifying Cloud Service Integration: This article introduces AWS clients for Elixir, offering an easy way to access AWS services. The library, generated by aws-codegen, provides a clean API for most AWS services, configurable HTTP client and JSON parser. It simplifies tasks such as listing Amazon Kinesis streams, uploading files to S3 with integrity check, and handling multipart uploads. The documentation is updated from the official AWS docs, ensuring reliability and accessibility for developers.

#AWS #Elixir #CloudComputing #Programming #APIs


4-out-of-5-hats Fundamentals of Object Storage: The article discusses the evolution and fundamentals of Object Storage, delving into its history, practical applications, and the transition from traditional storage solutions to modern, scalable object storage systems. The writer, part of the Underjord team which specializes in Elixir consulting, shares insights gained from a livestream on the subject, supported by Tigris. He explains the basics of object storage, such as its key operations and its advantages over traditional file systems, including scalability and reliability. Additionally, the article covers working with object storage using Elixir, demonstrating operations like listing, putting, and getting objects, as well as advanced features like presigned URLs and multipart uploads.

#ObjectStorage #Elixir #TechInnovation #CloudStorage #DataManagement


5-out-of-5-hats Segregate Responsibilities with Elixir Commanded: The article demonstrates how Elixir’s Commanded library enhances application development with CQRS and Event Sourcing. It emphasizes the benefits of audit tracing, time travel, and event-driven architecture. Additionally, it covers practical implementation aspects like event store setup, command and event management, aggregate design, and projections for efficient data querying.

#Elixir #CQRS #EventSourcing #SoftwareDevelopment #Tech


3-out-of-5-hats Ash 3.0 Release Candidate: The Ash Framework 3.0 introduces a suite of updates, including revamped code organisation, API restructuring, and enhanced developer tools, offering a streamlined and efficient experience for developers. See the full announcement here.

#AshFramework #Elixir #OpenSource #Programming #TechUpdate


4-out-of-5-hats Audio Speech Recognition in Elixir with Whisper Bumblebee: This article introduces Whisper, an advanced audio-speech recognition model from OpenAI, capable of transcribing audio in multiple languages with state-of-the-art accuracy. Whisper’s strengths in handling diverse accents, jargon across specialities, and ambient noise are highlighted, emphasising its robust performance due to extensive training on a large and varied dataset. Moreover, the article explains how developers can use Whisper in Elixir applications via the Bumblebee library, offering possibilities for integrating audio-speech recognition in various projects with examples of potential applications.

#Whisper #OpenAI #Elixir #AudioSpeechRecognition #Bumblebee


3-out-of-5-hats LiveView Playground: Discover how to quickly launch your own LiveView project with minimal setup using LiveView Playground. This guide offers straightforward instructions on setting up a basic LiveView environment, version 0.1.1, allowing for a personalised “Hello World” experience on a local server. Ideal for beginners looking to explore real-time web applications with Elixir’s rich programming capabilities.

#LiveViewPlayground #Elixir #WebDevelopment #RealTimeWeb #Programming


4-out-of-5-hats 2 Helpers to Keep Your Pipelines Flowing: This article showcases practical Elixir programming tips for maintaining efficient code pipelines. It introduces two helpful techniques, “then” and “tap”, aimed at managing and debugging Elixir pipelines without halting their flow. These methods offer streamlined solutions for inspecting and modifying pipeline data, demonstrating their utility in coding practices where maintaining the continuity of data flow is crucial.

#Elixir #Programming #CodeEfficiency #TechTips #SoftwareDevelopment


4-out-of-5-hats Match Operator Guards: This article discusses an experiment aimed at introducing guard clauses to Elixir’s match operator, which traditionally does not support them. Brett Beatty details his approach to extending Elixir’s pattern matching capabilities by creating a macro to handle guards in match expressions. His exploration includes dealing with compiler errors, manipulating quoted expressions, and ensuring code clarity in guard implementation. The experiment’s goal is to make match failures occur when guards are not satisfied without fundamentally changing match operator’s behaviour. The article outlines the challenges, solutions, and considerations for creating a more flexible and expressive matching mechanism in Elixir.

#Elixir #PatternMatching #MacroProgramming #GuardClauses #ProgrammingLanguages


3-out-of-5-hats Constraint Programming Solver: This is an Elixir implementation of the ideas described in Chapter 12, “Concepts, Techniques, and Models of Computer Programming” by Peter Van Roy and Seif Haridi.

#Elixir #Programming #FunctionalProgramming #ComputerScience #OpenSource


3-out-of-5-hats QuillJS: This is not exclusively an Elixir library, but for times when you need to offer rich text editing in your app, QuillJS provides a great option. See also: ProseMirror, which does something similar.

#QuillJS #TextEditor #ProseMirror #WebDevelopment #JavaScript


4-out-of-5-hats Engineering Elixir Applications: This book from The Pragmatic Bookshelf introduces a new paradigm called BEAMOps. This paradigm guides engineers through building, testing, deploying, and debugging BEAM applications with operational orchestrators like Docker Swarm, emphasising continuous improvement and scalability. The book is due by September 2024, and emphasises the importance of owning each stage of the software delivery process for developers.

#PragmaticProgrammers #EngineeringElixir #BEAMOps #SoftwareDevelopment #TechBooks


4-out-of-5-hats Distributed and Parallel Image Processing on Livebook by Ryo Wakabayashi: Presented at ElixirConf EU 2023, this talk on Distributed and Parallel Image Processing with Livebook dives deep into the intricacies of managing image data with Elixir. A perfect blend of technical depth and practical applications, this session showcases the power of Elixir in handling complex, data-intensive operations while leveraging the convenience of Livebook for collaborative and interactive programming.

#ElixirConfEU #Elixir #Livebook #ParallelProcessing #ImageProcessing


3-out-of-5-hats Elixir Macros Demystified, part 1: The article demystifies Elixir macros, offering a clear explanation of their purpose and structure while guiding developers through creating their own custom macros in a beginner-friendly manner. See also: part 2.

#Elixir #Macros #FunctionalProgramming #WebDevelopment #PhoenixFramework


3-out-of-5-hats Dify: The Open-Source LLM App Development Platform: Dify is an open-source application development platform specializing in large language models (LLMs). It allows users to swiftly progress from prototypes to production-ready apps through an intuitive interface that integrates AI workflow, RAG pipeline, agent capabilities, model management, and observability features. Key elements include comprehensive model support from various providers, prompt IDE for crafting and comparing model performance, extensive RAG capabilities for document ingestion and retrieval, and backend-as-a-service for easy integration into business logic.

#Dify #OpenSource #LLM #AIWorkflow #AppDevelopment


4-out-of-5-hats Evaluating Phoenix Admin Frameworks: Erik Näslund discusses his journey in evaluating different admin frameworks for Phoenix, primarily focusing on the ease of integration, functionality, and compatibility with modern web technologies. He narrows down his preferences to either using Kaffy for its relative ease of use and configurability or building a custom solution from scratch for greater control. His insights offer a candid look into the trade-offs and decision-making process involved in selecting the right admin framework for web applications.

#Elixir #PhoenixFramework #WebDevelopment #AdminUI #OpenSource


5-out-of-5-hats Elixir Development Using Podman with VM in Parallels and Shared Folders: This article outlines a complete guide for setting up an Elixir development environment using Podman in place of Docker, optimized for macOS users. The author walks through the intricate process of using a VM in Parallels for better performance over the default setup and shares detailed steps for integrating shared folders, configuring SSH, and setting up a robust development environment with Elixir including handling static files and setting up Postgres as a development database. Special attention is given to the setup’s potential technical snags and their solutions, making it a comprehensive resource for developers looking to optimise their Elixir development workflow with Podman and Parallels on macOS.

#Elixir #Podman #DevelopmentEnvironment #Parallels #macOS

Regards, M@

[ED: If you’d like to sign up for this content as an email, click here to join the mailing list.]

Originally published on quantumfaxmachine.com.

Also cross-published on Medium and Slideshare:

Stay up to date

Get notified when I publish something new.