RSSAmplifier

Blog

Gabriel Volpe

Recent content on Gabriel Volpe

gvolpe.comRSS feed ↗44 posts

Latest posts

Build-time systemd schedule

The System and Service Manager systemd provides the building blocks for Linux systems, and it’s the default in NixOS — though, there are a few alternatives such as finix and sixos that currently explore this design space. As someone currently self-hosting a few services on my NixOS servers, it’s become a constant in my toolkit. Current status of my servers, as generated by…

QoS: Dots & SUNix

This blogpost would have been too short if I only talked about a single topic, so I decided to combine both topics into a single post, as both qualify as actual Quality Of Service (QoS) improvements to my workflows. SUNix: Software Updates for Nix SUNix is a recent project I worked on that provides a feature many standard Linux distros ship with: “Available Software Updates” . Ever…

Immich Memories Notifications

One of the most beloved features Immich offers (also Google Photos) is memories . It temporarily transports us back in time to cherish our old precious photos and videos once again. However, we need to remember to open the app on a daily basis to do so — there’s no baked in notification system that would remind us. This is another heavily-requested feature , and if you check out that…

Immich Photos on S3 object storage

As someone who loves going for adventures abroad, the memories I’ve captured behind the lens have become extremely valuable to me. I’ve learned to appreciate that I can still cherish those memories many years later, regardless of whether the source was a DSLR, a smartphone, or a GoPro. The feelings these precious memories rekindle are priceless; as a tech person, it’s only…

The perfect tiling window manager

XMonad has been my main driver for years, and I still think it’s the best X11 window manager ever. However, the X11 windowing system is quite dated, having originated about 40 years ago. Its number of limitations, among other things, has led to the creation of the Wayland protocol. This is a modern protocol that allows compositors to operate in a more efficient and lightweight manner. Since…

Unison: Forex API & Caching

I have been following the Unison programming language for as long as I can remember, given that its authors are very well-known in the Scala ecosystem. Though, it took me a good few years to finally learn it by immersing myself into their amazing documentation and tutorials. TL;DR: I love it more and more every single day! The language itself is easy to learn for anyone coming from a functional…

Home Manager: dotfiles management

What is Home Manager? Quoting the official description from their website : Home Manager "This project provides a basic system for managing a user environment using the Nix package manager together with the Nix libraries found in Nixpkgs. It allows declarative configuration of user specific (non-global) packages and dotfiles." Wait a minute! If you had been following my blog for a while, you know…

NixOS server up in minutes!

Introduction The folks at Garnix have done it again! You can now deploy a NixOS server in minutes, just by defining your system on a flake.nix and git push ‘ing your changes (Garnix needs to be enabled for the repo). In their latest blog post Hands-on NixOS servers , they explain all the necessary steps to deploy your own server, so I won’t repeat things over. Furthermore,…

Flake Schemas

Flake schemas were introduced by Determinate Systems (written by Eelco Dolstra — creator of Nix) about half a year ago now (August 2023), which is quite a promising feature, but what is the current status? Is it usable yet? The PR that introduces flake schemas was submitted to NixOS/nix the same day the announcement was made, and it sadly remains in DRAFT mode until today. However, if you…

Private Nix flake 🔒

Introduction I blogged about Garnix before, and it’s the solution I’ve been using ever since for continuous integration. However, one thing I was missing was that private flakes were unsupported, so I had to live with a private local flake that I was commenting out on my public flake for a long time. Github Actions does support building private flakes by providing an access token, but…

Functional Event-Driven Architecture @ Scalar 2023 - Warsaw, PL 🇵🇱

Coming back to the stages after a few absent years from the circuit to introduce a new book: Functional Event-Driven Architecture - Powered by Scala 3 . Recording Slides View slides in fullscreen here .

Nix remote builds

Remote builds enable interesting use cases and experiments. Besides building for different architectures, another use case that comes to mind would be having a low-resource machine building a derivation that would require heavy CPU usage (e.g. a Rust application) on the fly, without having to rely on CI builds or binary caches, effectively used as a development environment. Here’s what the…

Garnix CI

Garnix is a continuous integration (CI) service for Nix flakes that has been in Beta for a while. In their own words "With Nix-specific optimizations, Garnix makes CI with Nix fast — a few seconds for no-op changes. Easy to setup, too — if you have a flake.nix, you are ready to go. And we provide the build results as a cache, so you don't have to build things locally. To top it all up, we run on…

Neovim meets Nix flakes

It is no secret that Neovim is my favorite text editor. I use it on a daily basis for multiple purposes: To write Scala code (and the occasional Typescript) for $work . To write the extensive text and code for my books . To fine-tune my ever-changing NixOS configuration . To write blog posts such as this one. For the casual Haskell and Rust code I sometimes need to write. Literally for any other…

Scala 3: the missing compiler plugin

If you have read this post when it first came out and felt offended by its catchy title, let me apologize for it. It caused some controversy, so I decided to change the title completely to highlight more what this post was about in the first place. Hope this time folks read to the end before drawing any conclusion :) Scala 3 has been around for a while now, but not many people are using it in…

Scala 3: Error handling in FP land

Introduction Scala 3 introduces union types . Straight from the official documentation, a union type A | B has as values all values of type A and also all values of type B . So the following code snippet compiles performing an exhaustive pattern-matching. def foo ( x : Int | Long ) : Unit = x match case _: Int => println ( 'Int!!!' ) case _: Long => println ( 'Long!!!' ) However, you are not here…

Flakes: NixOS and Home Manager migration

I have recently migrated my entire NixOS and Home Manager (HM) configuration — including programs, services, dotfiles, etc — over to the new kid on the block: Nix flakes . It was not as difficult as I thought it would be but there were a lot of things I had to figure out on my own or by asking more experienced folks on the NixOS matrix channel. So let me tell you the important bits of…

NixOS: build your system on Github actions!

What if I told you that you can save plenty of time and CPU-power by pre-building your entire NixOS configuration on Github actions? Fresh installations could be super fast and pre-validated on a CI build! Well, it’s possible, and it’s what I’m currently doing with my NixOS and Home Manager configurations. Besides hosting your configuration on Github, you’ll need a binary…

Finite-State Machines + FS2 streams: A match made in heaven

As the title says, finite-state machines and Fs2 streams are a match made in heaven! To demonstrate it, I’ll make up a compelling problem to solve and we will get to the final solution step by step. Here’s a sneak-peek of the solution. trait Ticker [ F [ _ ]] { def get : F [ Tick ] def merge ( timerTick : Tick , count : Count ) : F [( Tick , Count )] def ticks : Stream [ F , Tick ] }…

XMonad + Polybar on NixOS

I’ve been a Gnome user for a long time and I have never cared about using a Window Manager ever before but I recently switched to using XMonad full-time. Why? For a couple of reasons. One of the reasons is that I’ve been wanting to try a lightweight window manager for a while. However, the main reason is that Gnome leaks memory , unfortunately, and it seems to be an issue that’s…

Connecting millions of users @ Apache Pulsar Summit 2020 - Online 🌎

A collaborative talk given with my colleague Tamer Abdulazim at the Apache Pulsar Summit 2020. Slides View slides in fullscreen here .

Nix at Chatroulette @ Nixcon 2020 - Online 🌎

Showcasing the ways we leverage Nix at work: dev shells, CI/CD, software packaging, etc. Furthermore, showing examples of our OSS contributions.

What is Nix @ San Francisco Scala Meetup 2020 - Online 🌎

Introducing Nix to an audience of Scala developers at the San Francisco Scala Meetup in October 2020 (online event).

Gnome 3 on NixOS

NixOS can be configured to run any desktop environment you want and Gnome 3 is not an exception. However, it comes with some caveats so keep reading if you are interested in making this duo work seamlessly. Users who enjoy a graphical environment normally like to tweak it with their own preferences as well. E.g. installing new extensions , changing the background image, changing the dock, etc.…

Github actions powered by Nix Shell & Cachix

The more I learn about Nix — a purely functional package manager — the more I am convinced this is the way forward. Even if there’s still room for big improvements. Today I’d like to share with y’all what I’ve been up-to lately. Though, you could imagine I’ve been Nixifying more than one project ;) Nix shell Nix shell is a great tool to create reproducible development…

Parallel typeclass for Haskell

As I’m preparing a talk about refinement types I will be giving this Thursday at the Functional Tricity Meetup , and I’ve recently given a similar talk using the Scala language as well, I realized there is a missing typeclass in Haskell. In the following sections, I will be providing examples and use cases for this typeclass to showcase why it would be great to have it in Haskell. Oh,…

Why Types Matter @ Scala Love 2020 - Online 🌎

Discussing the importance of strong types in domain modeling with the Scala language. Slides View slides in fullscreen here .

Why Types Matter: Haskell Edition @ Functional Tricity 2020 - Online 🌎

Discussing the importance of strong types in domain modeling at the Functional Tricity online meetup. Slides View slides in fullscreen here .

Setting up Ghcide in Ubuntu with Nixpkgs

If you use Ubuntu or any other Linux distribution (AKA distro ) together with Nixpkgs , you might have noticed things don’t play so well together. Nixpkgs has been mainly designed to work seamlessly in Nix OS ; other distros are second class citizens. Quoting the Ghcide repository, it is defined as: Quote "A library for building Haskell IDE tooling" It is not defined as an IDE, because it…

The art of interviewing engineers

These past few weeks I’ve been interviewing with a few companies, as I’m actively on the lookout for a new challenge , and the number of flaws I have encountered in some hiring processes has disturbed me. Interviewing is hard; interviewing Software Engineers is a work of art. Let’s be honest. Software Engineers, especially in the functional programming space, are a scarce…

Why Functional Programming? @ MVD Scala Meetup 2019 - Montevideo, UY 🇺🇾

Discussing a bit of functional programming history, going through Lambda Calculus and LISP specification, among others. Slides View slides in fullscreen here .

FP Design Pattern @ SUGAR Meetup 2019 - Buenos Aires, AR 🇦🇷

Discussing excerpts from my book Practical FP in Scala back in my hometown. Slides View slides in fullscreen here .

Functional Dependencies & Type Families

In the past few months I have learnt a lot! Probably the coolest stuff has been about Functional Dependencies and Type Families , so this is my attempt to explain it in order to gain a better understanding and hopefully help someone else out there as well. So please be kind if you see any mistake, let me know and I’ll try to fix it 🙂 A motivating example One of the fun applications…

Entering a Purely Functional World @ Scala MDE Meetup 2019 - Medellin, CO 🇨🇴

Introducing the Haskell language to an audience of (mostly) Scala developers in the beautiful city of Medellin. Slides View slides in fullscreen here .

Lessons learned while writing a Haskell application

Having introduced Haskell at my last job I wanted to put into practice all the stuff I learned: take the good, leave the bad. So I started working on an exchange rates API using a few libraries I haven’t used before, exclusively for fun and learning purposes. In this blog post I’ll try to share what I have identified as good practice so far and what are my personal recommendations when…

Up Your MTL Game with Classy Optics @ Scalar 2019 - Warsaw, PL 🇵🇱

Discussing the cats-mtl as well as classy optics; a fascinating topic in the field of functional programming. Slides View slides in fullscreen here .

Context bound vs Implicit evidence: Performance

In a recent pull request review at work I suggested using context bound to declare effect capabilities instead of implicit values as this is what I see the most in OSS projects and it has also been my preference for a while. It makes the code look nicer even though the latter approach is equivalent. Context bound constraints get translated into implicits values at compile time. Context bound def…

Haskell for Scala devs @ Tokyo Scala Meetup 2019 - Tokyo, JP 🇯🇵

Showcasing the Haskell language to an audience of Scala developers, highlighting the similarities and differences. Slides View slides in fullscreen here .

Cats Effect: Tagless Final & Beyond! @ Scala eXchange 2018 - London, UK 🇬🇧

Since the first introduction of Cats Effect, many things have changed and this has taken its design and performance to a whole new level, making complex problems seemingly trivial in production systems. Join Gabriel to learn how to deal with side effects in a pure functional way while abstracting over the effect type to take composition to the next level. Starting with a review of the basic…

Classy Lenses @ Scale By The Bay 2018 - San Francisco, US 🇺🇸

Presenting at the “unconference” of the Scale By The Bay conference in America, in front of a remarkable crowd.

Cats Effect: The IO Monad for Scala @ Scala IO 2018 - Lyon, FR 🇫🇷

Discussing the Cats Effect library and its benefits, including a few advanced examples taken from our production usage at Paidy.

Building a REST API with HTTP4S @ Scala Matsuri 2018 - Tokyo, JP 🇯🇵

An improvised talk about API designs with Http4s while abstracting over the effectType. Given at the unconference of the Scala Matsuri 2018 event.

Cats Effect: The IO Monad @ Dublin Scala Meetup 2017 - Dublin, IE 🇮🇪

Showcasing the IO Monad for Scala with the Cats Effect library to an audience of Scala developers. Slides View slides in fullscreen here .

Functional Data Validation @ Eindhoven Haskell Meetup 2017 - Eindhoven, NL 🇳🇱

Showcasing three different ways of performing data validation in Haskell: Simple Validation. A bit more descriptive: Either Monad. Full report of errors: Validation Applicative. Slides View slides in fullscreen here .