Engineering blog

Technical writing from Tweag engineers on build systems, functional programming, type systems, open source, infrastructure, machine learning, and software practice.

Latest from the blog.

19 February 2026

Nickel since 1.0

A round-up of improvements over the last two and a half years

Joe Neeman

13 February 2025

Bashfulness

In which we delve into the vagaries of Bash formatting and pit Topiary against shfmt in the ultimate, totally unbiased showdown.

Christopher Harrison

5 September 2024

Adding algebraic data types to Nickel

A recent release of Nickel added algebraic data types and pattern matching. This blog post explains the motivation behind this addition, the design choices made, the considerations around backward compatibility and how ADTs can be useful for a configuration language.

Yann Hamdaoui

20 June 2024

Nickel modules

Implementing an equivalent to the NixOS module system in Nickel

Théophane Hufschmitt

21 May 2024

LLM-based work summaries with work-dAIgest

Do you regularly wonder where your time went during a week worth of work? We present work-dAIgest, a tool developed during Tweag's GenAI hackathon that aims to use data from standard workplace tools such as GitHub, Google Calendar, ... to create a summary of your work week (or any other time period), powered by open-source large language models (LLM).

Simeon Carstens, Nour El Mawass

16 May 2024

Nickel: Toward a Programmable LSP for Configurations

Nickel 1.5 ships with a new contract evaluator in the LSP. Together with custom contracts, this enables a powerful and native way to extend the LSP with custom checks, from complex validation rules to enforcing security policies on your infrastructure-as-code.

Yann Hamdaoui

26 October 2023

nixtract 0.1.0

Building the foundation to analyze your Software Supply Chain in Nix

Guillaume Desforges

30 May 2023

Announcing Tf-Ncl 0.1

With Nickel releasing 1.0 I'm excited to announce the 0.1 release of Tf-Ncl, a tool for writing Terraform deployments with Nickel instead of HCL.

Viktor Kleen

9 March 2023

Announcing Topiary

We're happy to announce the first release of Topiary, a formatter for many languages that leverages Tree-sitter.

Erin van der Veen, Nicolas Bacquey, Guillaume Genestier, Christopher Harrison, and Tor Hovland

2 March 2023

Chainsail: Now Unchained and Open-Source

Tweag releases the full source code of the Chainsail web service, for sampling multimodal distributions, first announced in August 2022. This blog post gives a tour of the Chainsail service architecture, links out to the relevant parts of the source code and proposes possible extensions to Chainsail for which the Tweag team would welcome contributions from the community.

Simeon Carstens

29 September 2022

Four months into The Nix Book

A comprehensive report on what happened in four months of dedicated work on Nix documentation, and what I learned from it.

Valentin Gagarin

5 May 2022

Existential optics

A presentation of an alternative encoding for optics such as lenses and prisms using existential types.

Marco Perone

21 April 2022

Announcing WebAuthn

Announcement of a WebAuthn Haskell library, and a description of how the protocol works

Erin van der Veen and Silvan Mosberger

3 February 2022

Trustix - Consensus and voting

We discuss existing consensus models and why no global consensus mode is well suited to Trustix, opting for a user-defined algorithm instead.

Adam Hoese, Taeer Bar-Yam

20 December 2021

Nix 2.4 and 2.5

Overview of the new features in Nix 2.4 and 2.5

Eelco Dolstra

5 March 2020

Code is Engineering, Types are Science

Peirce divides reasoning into three complementary processes: deduction, abduction and induction. In this post, I will show how these logical processes relate to software.

Juan Raphael Diaz Simões

19 December 2019

Haskell art in your browser with Asterius

Asterius compiles Haskell code into WebAssembly code to be executed in a browser or in Node.js. It has reached a new milestone by being able to compile the diagrams library and its dependencies.

Sylvain Henry (IOHK), Cheng Shao

25 October 2019

Markov chain Monte Carlo (MCMC) Sampling, Part 1: The Basics

In this first post of Tweag's four-part series on Markov chain Monte Carlo sampling algorithms, you will learn about why and when to use them and the theoretical underpinnings of this powerful class of sampling methods. We discuss the famous Metropolis-Hastings algorithm and give an intuition on the choice of its free parameters. Interactive Python notebooks invite you to play around with MCMC yourself and thus deepen your understanding of the Metropolis-Hastings algorithm.

Simeon Carstens

6 September 2019

Why Haskell is important

People keep asking me, “What's the point of Haskell, why do you folks even use it?”. How can you answer this?

Mark Karpov

1 August 2019

Code Line Patterns: Creating maps of Stackage and PyPi

We visualize large collections of Haskell and Python source codes as 2D maps using methods from Natural Language Processing (NLP) and dimensionality reduction and find a surprisingly rich structure for both languages. Clustering on the 2D maps allows us to identify common patterns in source code which give rise to these structures. Finally, we discuss this first analysis in the context of advanced machine learning-based tools performing automatic code refactoring and code completion.

Simeon Carstens, Matthias Meschede

10 April 2019

The Sneakernet: Towards A Much Faster Internet

Inspired by the Event Horizon Telescope images, we develop a quick exploratory study about future possibilities of this technology called the Sneakernet: Could massive data transfer give a new live to the homing pigeon industry? How about using transportation means that are optimized to carry incredible amounts of weight? Or transportation means that are designed to be fast as a bullet?

Matthias Meschede

28 February 2019

JupyterWith: Declarative, Reproducible Notebook Environments

Millions of Jupyter notebooks are spread over the internet - machine learning, astrophysics, biology, economy, you name it. What a great age for reproducible science! Or that's what you think until you try to actually run these notebooks. Then you realize that having understandable high-level code alone is not enough to reproduce something on a computer. JupyterWith is a solution to this problem.

Juan Simões, Matthias Meschede

6 February 2019

Mapping a Universe of Open Source Software

The repositories of distributions such as Debian and Nixpkgs are among the largest collections of open source (and some unfree) software. They are complex systems that connect and organize many interdependent packages. In this blog post I'll try to shed some light on them from the perspective of Nixpkgs, mostly with visualizations of its complete dependency graph.

Matthias Meschede