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…
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…
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…
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…
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…
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…
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…
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 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…
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…
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 .
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 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…
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…
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…
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…
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…
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…
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 ] }…
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…
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.…
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…
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,…
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…
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…
Discussing a bit of functional programming history, going through Lambda Calculus and LISP specification, among others. Slides View slides in fullscreen here .
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…
Introducing the Haskell language to an audience of (mostly) Scala developers in the beautiful city of Medellin. Slides View slides in fullscreen here .
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…
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…
Showcasing the Haskell language to an audience of Scala developers, highlighting the similarities and differences. Slides View slides in fullscreen here .
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…
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 .