Engineering blog

46 min read Original article ↗

4 December 2025

The anatomy of a dependency graph

Alexey Tereshenkov

The hidden complexity of dependency graphs

27 November 2025

Shrinking while linking

Joe Neeman

What goes into a static library, and how to make it smaller

20 November 2025

Migrating to Bazel symbolic macros

Alexey Tereshenkov

Learn more about modernizing Bazel macros in your codebase

30 October 2025

Continuous Performance Testing: staying fast

Mesut Güneş

This post introduces Continuous Performance Testing (CPT) as an automated, CI/CD–integrated approach that provides real-time feedback and shifts testing left to catch issues early. It also highlights the value of automated load testing, thresholds (e.g., with K6) and a statistical approach for comparing with past performances.

23 October 2025

Introduction to Agentic Coding

Wesley Fuchter

Structured AI-assisted development workflows for engineering teams.

2 October 2025

Single-line and multi-line formatting with Topiary

Yann Hamdaoui

The second part of a tutorial on how to quickly write a formatter for a programming language using Topiary, our open-source formatting engine based on Tree-sitter.

18 September 2025

Managing dependency graph in a large codebase

Alexey Tereshenkov

Common issues and best practices managing large dependency graphs

11 September 2025

Qualified Imports and Alias Resolution in Liquid Haskell

Xavier Góngora

The story of how I implemented qualified aliases in Liquid Haskell

4 September 2025

Introduction to the dependency graph

Alexey Tereshenkov

What a build systems engineer might want to know

28 August 2025

CodeQL: code organization, metadata, and running in CI

Clément Hurlin

How to write production CodeQL code

14 August 2025

Performance Testing, Part 1: The Road to Continuous Performance Testing

Mesut Güneş

Performance testing is a testing methodology that aims to investigate the responsiveness, speed, and stability of a system by evaluating its performance by testing functional requirements against non-functional criteria.

7 August 2025

Getting started with CodeQL, GitHub's declarative static analyzer for security

Clément Hurlin

How to write your first CodeQL query

31 July 2025

Integrating Nix and Buck2

Claudio Bley

A whirlwind tour on how to integrate Nix with Buck2

24 July 2025

Introduction to the new LaunchDarkly Svelte SDK

Robinson Marquez

Introducting the new LaunchDarkly Svelte SDK

10 July 2025

Publish all your crates everywhere all at once

Joe Neeman

A new multi-crate packaging feature for Cargo

3 July 2025

Bazel workshop made public

The materials from a Bazel workshop we developed for a client are now publicly available

29 May 2025

Quantifying the impact of an AI tool in our company

The challenge of measuring the immeasurable

15 May 2025

Why we blog

Arnaud Spiwack

A blog post about our blog

24 April 2025

The minimal megaparsec tutorial

Clément Hurlin

The shortest megaparsec tutorial there is to write your first DSL parser

17 April 2025

Frontend live-coding via ghci

Cheng Shao

Demonstrate the GHC wasm backend ghci browser mode and how it can be used to live-code a Haskell wasm frontend app.

10 April 2025

Practical recursion schemes in Rust: traversing and extending trees

Yann Hamdaoui

This post introduces recursion schemes, a functional programming technique used to neatly express recursive algorithms and transformations on trees, and what they are good for in Rust specifically.

20 March 2025

A hundred pull requests for Liquid Haskell

Facundo Domínguez

An overview of the improvements in the latest Liquid Haskell release

6 March 2025

Bazel and Testwell CTC++, revisited

Johan Herland

How we shoehorned a proprietary code coverage tool into Bazel's expectations of hermetic and reproducible build actions.

27 February 2025

Evaluating the evaluators: know your RAG metrics

SA

Evaluating retrieval-augmented generation (RAG) is easier than ever, but you need to keep a close eye on the LLMs that drive the evaluation metrics. We discuss some common pitfalls and solutions.

20 February 2025

From minimal skeletons to comprehensive transactions with cooked-validators

Mathieu Montin

cooked-validators is a Haskell library to write offchain code and conduct testing activities over Cardano smart contracts. One of its main features is to create fully-fledged transactions from simple declarative skeletons.

13 February 2025

Bashfulness

CH

Christopher Harrison

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

6 February 2025

The refactoring of a Haskell codebase

Facundo Domínguez

An experience report of a somewhat large refactoring of Liquid Haskell

30 January 2025

Writing a formatter has never been so easy: a Topiary tutorial

Yann Hamdaoui

This blog post is a tutorial on how to quickly write a formatter for a programming language from scratch using Topiary, our open-source formatting engine based on tree-sitter.

23 January 2025

Contract Testing: Shifting Left with Confidence for Enhanced Integration

Mesut Güneş

Contract testing ensures that software components communicate correctly by verifying their 'contracts' or agreements, which define data formats, parameters, and expected responses, effectively creating a mutual understanding between components.

19 December 2024

The Developer Experience Upgrade: From Create React App to Vite

Edian Comachio

A detailed analysis of how migrating from Create React App to Vite enhances build speeds, reduces startup times, and improves the developer experience

21 November 2024

GHC's wasm backend now supports Template Haskell and ghci

Cheng Shao

A summary of the current support status of Template Haskell and ghci in GHC's wasm backend, explaining how it's implemented and laying out potential future improvements.

7 November 2024

Exploring Effect in TypeScript: Simplifying Async and Error Handling

Douglas Massolari

An introduction to Effect, an open-source library that promises to improve your TypeScript code

17 October 2024

Introducing rules_gcs

Malte Poll

Efficient Google Cloud Storage Integration for Bazel

24 September 2024

Python Packaging in the Real World

DH

An empirical analysis of Python packages on PyPI and biomedical journals in 2023, with a focus on the quality of dependency declarations.

12 September 2024

Reflecting away from definitions in Liquid Haskell

JA

Jonathan Arnoult

Internship report: Extensions to the reflection mechanism of Liquid Haskell to handle functions from dependencies.

5 September 2024

Adding algebraic data types to Nickel

Yann Hamdaoui

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.

29 August 2024

Deploying Buildbarn on Kubernetes with mTLS on the side

Yuriy Taraday

No packet should pass unencrypted or unauthenticated.

22 August 2024

Programming Languages & Compilers Activity Report - Q2 2024

Yann Hamdaoui

A summary of the open-source work done by the Programming Languages & Compilers team at Tweag in the second quarter of 2024.

15 August 2024

Let there be types: observable type sharing for GHC Core

JF

Joseph Fourment

A tale of optimising GHC by improving sharing in its intermediate representation.

4 July 2024

An Image Slider in React Native with Skia and Reanimated

OS

Omowunmi Sogunle

Discover how to build a high-performance image slider in React Native using Skia and Reanimated. This tutorial guides you through integrating Skia for sharp 2D graphics and Reanimated for fluid animations.

27 June 2024

Integration testing: pain points and remedies

Mesut Güneş

While a crucial phase of software development, integration testing faces challenges in terms of speed, reliability, and maintenance. This article discusses these common issues in the process.

20 June 2024

Nickel modules

Théophane Hufschmitt

Implementing an equivalent to the NixOS module system in Nickel

6 June 2024

Safe composable Python

Guillaume Desforges

It has never been easier to write testable and type-safe Python.

30 May 2024

Liquid Haskell through the compilers

Facundo Domínguez

An experience report on plugin upgrades

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).

16 May 2024

Nickel: Toward a Programmable LSP for Configurations

Yann Hamdaoui

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.

2 May 2024

The right words in the right place

Valentin Gagarin

A report on another 18 months in Nix documentation.

25 April 2024

Re-implementing the Nix protocol in Rust

Joe Neeman

We re-implemented the nix remote protocol, declaratively

18 April 2024

Cloud Native Computing in 2024—feeling the pulse at Kubecon

We just came out of Kubecon 2024. Here are our impressions of the trends and evolutions in infrastructure, configuration management and cloud native computing

21 March 2024

Evaluating retrieval in RAGs: a practical framework

We introduce an experimental framework for assessing RAG retrieval and explain its main components including benchmark creation, evaluation metrics, parameter space and experiment tracking. Whether you're deep in the field or just starting, this post is your gateway to understanding and improving RAG retrieval performance.

12 March 2024

Software Identifiers through the eyes of Nix

Matthias Meschede

This is an answer to a request for comments issued by CISA about software identifiers that CISA encouraged me to publish as a separate blog post.

7 March 2024

DPS programming for arbitrary types in Haskell

Thomas Bagrel

This blog post presents a safe API for destination-passing style programming using Linear Haskell against arbitrary functional data types.

29 February 2024

Bazel remote execution with rules_nixpkgs

KS

GM

Creating infrastructure for supporting Bazel remote execution with rules_nixpkgs

6 February 2024

Evaluating Retrieval in RAGs: A Gentle Introduction

We introduce the many pitfalls of RAGs, including in retrieval, explain why we need systematic evaluation and provide a quick introduction to existing evaluation frameworks.

18 January 2024

A look under GHC's hood: desugaring linear types

Arnaud Spiwack

How GHC's design informs linear types

7 December 2023

BazelCon Community Day - Munich

A summary of BazelCon Community Day 2023 in Munich

28 November 2023

Source filtering with file sets

Silvan Mosberger

Introducing the lib.fileset Nix library for easy and safe source filtering

23 November 2023

Separating debug symbols from executables

Johan Herland

Make your C/C++ builds faster and smaller with debug fission.

16 November 2023

Announcing Organist

Théophane Hufschmitt

tl;dr: We’re pleased to announce the beta release of Organist, a tool designed to ease the definition of reliable and low-friction development environments and workflows, building on the combined strengths of Nix and Nickel. A mess of cables and knobs I used to play piano as a…

9 November 2023

Integrating Testwell CTC++ with Bazel

A Bazel war story of how we integrated a proprietary code coverage tool that does not play according to Bazel's rules.

2 November 2023

Great Nickel configurations from little merges grow

Yann Hamdaoui

Explore how to write modular and reusable configuration in Nickel using its merge system.

26 October 2023

nixtract 0.1.0

Guillaume Desforges

Building the foundation to analyze your Software Supply Chain in Nix

19 October 2023

JSON Schemas to Nickel contracts

Taeer Bar-Yam

Get better error reporting and LSP integration for your JSON Schemas in Nickel.

12 October 2023

rhine-bayes

MB

Manuel Bärenz

Use monad-bayes and rhine in your interactive machine learning application

5 October 2023

CLI UX in Topiary

CH

Christopher Harrison

Topiary's journey to a modern, user-friendly CLI experience.

21 September 2023

Behind the scenes with FawltyDeps 0.13.0

FawltyDeps 0.13.0 introduces a brand new mapping strategy. In this post, we'll delve into the mechanics of how dependencies and imports are matched, as well as how you can leverage these new features to boost your Python dependency management workflow.

10 August 2023

Supercharging your Rust static executables with mimalloc

Cheng Shao

How to link against mimalloc when creating a static Linux executable for Rust, and why you should do the same.

27 July 2023

Building a Rust workspace with Bazel

IP

Ilya Polyakovskiy

Setting up a Bazel build for the ripgrep codebase

20 July 2023

How to Prevent GHC from Inferring Types with Undesirable Constraints

Nicolas Frisby

A GHC pattern for improving the user experience of type-level programs

13 July 2023

Python Monorepo; Part 2

How to build your Python monorepo from scratch: a simple CI

6 July 2023

A Tour Around Buck2, Meta's New Build System

Andreas Herrmann

An overview of Meta's new build system Buck2 and how it differs from Bazel

29 June 2023

Packaging Topiary in OPAM

Nicolas Jeannerod

Now that Topiary is out and supports OCaml, we need to package it. But how exactly does one package a Rust projet in OPAM, the OCaml Package Manager?

22 June 2023

Assumptions for Liquid Haskell in the large

Facundo Domínguez

A revamp of the mechanism for introducing assumptions

15 June 2023

Coverage-guided fuzzing of Haskell programs for cheap

Cheng Shao

A simple trick to fuzz Haskell programs with libFuzzer

8 June 2023

Announcing halide-haskell

TW

AD

halide-haskell is a Haskell wrapper for Halide that allows you write and just-in-time compile high-performance array and image processing kernels.

1 June 2023

Testing Control-Flow Translations in GHC

Norman Ramsey

Translations of control flow can be tested before the rest of the code generator is ready. The tests examine sequences of abstract state transformations and observations.

30 May 2023

Announcing Tf-Ncl 0.1

Viktor Kleen

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.

25 May 2023

PBT and the Ghost in the Machine

CH

Christopher Harrison

Commandeering techniques from richly typed, functional languages into Python for fun and profit. In this episode: Testing strategies.

17 May 2023

Announcing Nickel 1.0

Yann Hamdaoui

Today, I am very excited to announce the 1.0 release of Nickel. A bit more than one year ago, we released the very first public version Nickel (0.1). Throughout various write-ups and public talks (1, 2, 3), we’ve been telling the story of our dissatisfaction with the state of…

11 May 2023

A journey through the auditing process of a smart contract

FC

Florent Chevrou

Embark with the High Assurance Software Group for a guided tour through the stages of a smart-contract audit, secret weapon included.

4 May 2023

Announcing Skyscope

Ben Radford

A new tool for visualising and exploring Bazel build graphs.

27 April 2023

Type-safe data processing pipelines

GR

Georg Rudoy

Using type-level dependency tags to verify a Haskell pipeline.

20 April 2023

Processing medical images at scale on the cloud

Guillaume Desforges

To allow innovation in medical imaging with AI, we need efficient and affordable ways to store and compute at scale.

13 April 2023

crem: compositional representable executable machines

MP

Marco Perone

How to build state machines in a composable way, controlling which transitions can be executed

4 April 2023

Python Monorepo; Part 1

How to build your Python monorepo from scratch: structure and tooling

23 March 2023

Linear Constraints: the problem with scopes

Arnaud Spiwack

How linear constraints get rid of scope functions and why it matters.

14 March 2023

Announcing FawltyDeps

VR

FawltyDeps is a new tool to help you identify undeclared and unused dependencies in your Python code, making your projects leaner and more reproducible.

9 March 2023

Announcing Topiary

NB

GG

CH

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

2 March 2023

Chainsail goes open-source

Simeon Carstens

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.

23 February 2023

Taking the pulse of infrastructure management in 2023

Yann Hamdaoui

We went to FOSDEM23 and CfgMgmtCamp23. Here are my impressions of the trends and evolutions in infrastructure and configuration management

16 February 2023

opam-nix: Nixify Your OCaml Projects

Alexander Bantyev

We present opam-nix, show how it helps to easily develop, build and test your OCaml projects with Nix

14 February 2023

smtlib-backends: faster SMT-LIB-based Haskell interface to SMT solvers

QA

Quentin Aristote

Announcement of smtlib-backends, a Haskell library providing a generic interface for interacting with SMT solvers using SMT-LIB

9 February 2023

Running a NixOS VM on macOS

Yuriy Taraday

Make your NixOS development on macOS easier with this simple trick...

2 February 2023

announcing jupyenv 0.1.0

DB

Daniel Baker

jupyterWith gets a new name and updates.

31 January 2023

A Semester of HLS: An Internship Report

Berk Özkütük

An experience report on improving HLS during my internship at Tweag.

26 January 2023

Linear Constraints: the problem with O(1) freeze

Arnaud Spiwack

How a linear constraint arrow relates to freezing arrays in Haskell.

24 January 2023

Nix with; with Nickel

François Caddet

The Nix `with` keyword is challenging, but we transpiled it to Nickel anyway.

19 January 2023

Dial M for Monoid

CH

Christopher Harrison

Commandeering techniques from richly typed, functional languages into Python for fun and profit. In this episode: Typeclasses and continuation-passing style.

12 January 2023

Haskell at Work

MP

Marco Perone

Learning and adopting Haskell is not hard with the right resources at hand.

22 December 2022

Making GHC faster at emitting code

Alexis King

How we gained 2–3% improvements in compile times by making GHC better at printing code.

20 December 2022

Announcing Nickel 0.3.1

TN

The Nickel Team

What's new in Nickel 0.3.1

15 December 2022

A Bazel and Nix Migration

Ben Radford

Getting an old Make based project building again after 10 years with the help of Bazel and Nix.

13 December 2022

Optimizing NixOS Search

WW

William Wang

An internship report on my experience working on improving search.nixos.org and my internship at Tweag

8 December 2022

Creating a Delta Lake in Haskell with Sparkle

Zhihan Zhang

A practical introduction to using Sparkle to write Haskell programs which interface with Delta Lake.

1 December 2022

Higher-orderness is first-order interaction

Yann Hamdaoui

Revisit the fundamental concept of higher-order functions with a new perspective: interaction.

24 November 2022

Threads and messages with Rust and WebAssembly

Joe Neeman

How and why to share threads in WASM workers (and when not to)

22 November 2022

WebAssembly backend merged into GHC

Cheng Shao

Announcing the GHC WebAssembly backend – present and future

17 November 2022

JupyterWith Next

DB

RG

Announcing the next version of jupyterWith.

15 November 2022

Staged programming with typeclasses

Thomas Bagrel

Introduction to staged programming in Haskell with typeclasses

10 November 2022

Reinforcement Learning for Open Games

NV

How to tap into the power of reinforcement learning while specifying and executing open games in Haskell.

8 November 2022

Functional programming from sets and functions

MP

Marco Perone

Understanding the basic ideas of functional programming by writing a program using only sets and functions

3 November 2022

Recompilation avoidance in rules_haskell

GG

Guillaume Genestier

Bazel avoids superfluous recompilation for free, but we can make it even better.

1 November 2022

Hard user separation with NixOS

SR

Solène Rapenne

Setup two encrypted partitions with a shared Nix store

27 October 2022

A nub in the haystack

Torsten Schmits

Exploration of a regression in GHC's bytecode generator performance

25 October 2022

Chainsail goes Bayesian statistics

AK

Abdellatif Kadiri

Tweag intern Abdellatif summarizes his internship, in which he augmented Chainsail with a Bayesian Replica Exchange scheme to improve sampling of multimodal distributions.

20 October 2022

Converting a polyglot project build to Bazel: part 1

KC

Karol Czułkowski

Painlessly switch your Haskell build from Cabal to Bazel

18 October 2022

Improving monad-bayes

RC

Reuben Cohn-Gordon

My experience improving monad-bayes, the probabilistic programming language package, as a Tweag fellow.

14 October 2022

Testing stateful systems, part two: Linear Temporal Logic

CH

Carl Hammann

On a previous post, we explained how to write tests for stateful systems using traces — sequences of stateful actions — that can be combined and modified to write complex test cases easily and transparently. This post elaborates on the combinators used to generate new traces from…

11 October 2022

Worry-free NixOS refactors

Taeer Bar-Yam

Comparing Nix input hashes can guarantee that some refactors are bug-free.

6 October 2022

Bazel rules to test Bazel rules

IP

Ilya Polyakovskiy

Looking for a way to test Bazel-rules

29 September 2022

Four months into The Nix Book

Valentin Gagarin

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

22 September 2022

Building Nix flakes from Rust workspaces

Tor Hovland

Learn the options for building a Nix flake out of a Rust workspace, outputting a mix of native code and WebAssembly.

20 September 2022

Optimizing Nickel's Array Contracts

MM

Mahmoud Mazouz

A short dive into Nickel's reference interpreter

15 September 2022

How to keep a Bazel project hermetic?

Mark Karpov

A collection of helpful tips for Bazel users.

13 September 2022

Construction and analysis of the build and runtime dependency graph of nixpkgs

EW

Eloi Wang

A nixpkgs content database with graph building!

8 September 2022

Typopædia Pythonica

CH

Christopher Harrison

Commandeering techniques from richly typed, functional languages into Python for fun and profit. In this episode: Gradual typing and algebraic data types.

1 September 2022

Unit Test Your Nix Code

DB

Daniel Baker

Cleanly and seamlessly add unit tests to your nix functions.

25 August 2022

Introducing the Scalable Build Systems Team

Andreas Herrmann

Introducing the Scalable Build Systems Team

18 August 2022

Introduction to NixOS specialisations

SR

Solène Rapenne

How and when to use NixOS specialisations to manage different boot environments

11 August 2022

Soft k-means clustering with Chainsail

EJ

We recently released a beta version of a web service called Chainsail, that helps with sampling multimodal probability distributions (you can check out our Chainsail announcement blog post for a quick introduction to this tool). In parallel, this post aims to illustrate a use…

9 August 2022

Chainsail: sampling multimodal distributions made easy

DH

EJ

SH

Tweag announces Chainsail, a simple-to-use web service for better sampling of multimodal distributions with a scalable and auto-tuning Replica Exchange algorithm at its core.

4 August 2022

Our roadmap for Nix

Théophane Hufschmitt

Tweag's Nix team plans for the coming years

28 July 2022

Profiling non-CPU time in Haskell

Facundo Domínguez

Limitations of the GHC profiler and announcement of the timestats library

21 July 2022

A dialogue with Liquid Haskell

Facundo Domínguez

New features to understand old verification failures

14 July 2022

Nix – taming Unix with functional programming

Valentin Gagarin

Nix is all about applying functional programming to files and processes.

1 July 2022

Introducing Pirouette 2: formal methods for smart contracts

AS

Alejandro Serrano Mena

The new Pirouette 2 introduces formal method techniques to the verification of smart contracts; in this post we focus particularly in how incorrectness logic helps this goal.

23 June 2022

Incremental builds for Haskell with Bazel

Facundo Domínguez

Announcing the new haskell_module rule in rules_haskell

2 June 2022

Stack and Nix integration

Julien Debon

Integrating Haskell Stack and Nix in a smooth yet non-invasive way, with an explanation, example and template.

26 May 2022

Reproducible probabilistic programming environments

EJ

MN

How to get reproducible development environments for probabilistic programming packages such as PyMC3, Theano or TensorFlow using Nix.

12 May 2022

Comparing strict and lazy

Arnaud Spiwack

Arnaud takes a step back from the slogans and examines the trade-offs between lazy and strict languages.

5 May 2022

Existential optics

MP

Marco Perone

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

28 April 2022

Union and intersection contracts

Yann Hamdaoui

Why union and intersection contracts are hard in a lazy language, and how Nickel handles them.

21 April 2022

Announcing WebAuthn

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

14 April 2022

Getting Things Merged

Clément Hurlin

How to get things merged in large collaborative projects

31 March 2022

Running wasm modules as if they are native executables

Cheng Shao

Introduce the trick we use to run ghc test suite that needs to exec wasm code

25 March 2022

Our first audit of Minswap and the aftermath

Mathieu Boespflug

What Happened On the morning of the 22nd of March, 2022, we were notified about the existence of an unknown critical vulnerability on one of Minswap’s contracts. Everyone here on the audit team was dismayed, since we had conducted an audit for Minswap not long before. We found…

17 March 2022

Porting libffi to pure WebAssembly

Cheng Shao

Cheng demonstrates why it's challenging to port libffi to wasm32, how he implemented it, and how it's useful for cross-compiling the GHC RTS

11 March 2022

First release of Nickel

Yann Hamdaoui

I am excited to announce the first release of Nickel! In the original introductory blog post, I’ve written about why we, at Tweag, are developing yet another configuration language. Our goal is to empower people to write correct, programmable and maintainable configurations…

3 March 2022

Improving Criterion.rs

DH

David Himmelstrup

TLDR; Benchmarking in Rust is now faster, easier, and runs in your browser. My name is David and for the past three months, Tweag has generously sponsored my work on criterion.rs. Criterion.rs is a widely used (with nearly 1.4 million downloads in the last 90 days) benchmarking…

24 February 2022

Named Routes in Servant

GD

Gaël Deest

Use records to structure your Servant APIs

17 February 2022

Writing a type-checking plugin

SD

Sam Derbyshire

A tutorial on how to write a type-checking plugin for GHC

10 February 2022

Ormolu: formatting operator chains

Thomas Bagrel

Why formatting chains of infix operators is hard in Haskell. And how I addressed it for Ormolu.

3 February 2022

Trustix - Consensus and voting

AH

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

26 January 2022

A Case Study on Correctness and Safety Testing of Stateful Systems

VM

Victor Miraldo

How to automatically inject attacks and faults in safety tests using random traces.

19 January 2022

Why Liquid Haskell matters

Facundo Domínguez

On the relevance of Liquid Haskell in programming languages

14 January 2022

Trustix trees

AH

In this post we introduce Merkle trees, the data structures needed to make the Trustix log append-only and searchable.

5 January 2022

Scoped Effect Resources for Polysemy

Torsten Schmits

How to transparently separate resource allocation from business logic for scoped effects in Polysemy

20 December 2021

Nix 2.4 and 2.5

ED

Eelco Dolstra

Overview of the new features in Nix 2.4 and 2.5

15 December 2021

21.11 Zero Hydra Failure Moscow report

Alexander Bantyev

Details about the 21.11 Nix Moscow Hackaton, and some suggestions for organizers of similar events.

9 December 2021

GHC's constraint solver

SD

Sam Derbyshire

In part two of this series on type-checking plugins, we will see how GHC's constraint solver works.

2 December 2021

Implementing a content-addressed Nix

Théophane Hufschmitt

What had to change in the Nix internals to make it able to build content-addressed derivations?

25 November 2021

The Varieties of the Haskelling Experience

NV

Noon van der Silk

A collection of ways various Tweagers develop in Haskell

17 November 2021

Safe Sparkle: a resource-safe interface with linear types

NG

Noah Goodman

On design choices to build a resource-safe interface for Sparkle using linear types

4 November 2021

Profiling Haskell with Cachegrind

JY

Jeffrey Young

Small tutorial on using valgrind to find hot spots in ghc and other Haskell programs

28 October 2021

Hacking on Ormolu: An internship report

Alexander Esgen

An experience report on polishing Ormolu, the Haskell code formatter, during my internship at Tweag.

21 October 2021

Why write a type-checking plugin?

SD

Sam Derbyshire

Why would you want to write a type-checking plugin? Many limitations of the GHC type-checker are exposed here.

13 October 2021

Denotational Homomorphic Testing

DO

Divesh Otwani

Property test a denotational model of a data structure.

30 September 2021

A higher-order integrator for Hamiltonian Monte Carlo

AT

A discussion and benchmark of an alternative integrator for Hamiltonian Monte Carlo.

23 September 2021

Functional data pipelines with funflow2

DH

VR

Introducing a library for writing data pipelines which compose well and fail early

8 September 2021

Building a Go project using Bazel

TB

Tanya Bouman

Building a Go project using Bazel, generating build files with Gazelle

30 August 2021

Daily ICFP: Day 5

NV

RE

Notes from the sixth day of ICFP

27 August 2021

Daily ICFP: Day 4

NV

RE

Notes from the fifth day of ICFP

26 August 2021

Daily ICFP: Day 3

NV

RE

Notes from the fourth day of ICFP

25 August 2021

Daily ICFP: Day 2

NV

RE

Notes from the third day of ICFP

24 August 2021

Daily ICFP: Day 1

NV

RE

Notes from the second day of ICFP

23 August 2021

Daily ICFP: Day 0

NV

RE

Notes from the first day of ICFP

28 July 2021

Convert Cabal-based projects to Bazel automatically

Announcing the gazelle_cabal tool for automatic Bazel rules generation for Cabal projects

21 July 2021

Integrated shrinking in QCheck

Julien Debon

An introduction to Integrated Shrinking and an implementation in QCheck (OCaml)

14 July 2021

Searching for COVID-19 treatments using metabolic networks

AC

Apostolos Chalkis

Apostolos Chalkis introduces dingo, a package for the analysis of metabolic networks, on which he worked as part of this Tweag fellowship.

8 July 2021

Exploring linear Traversable

Sjoerd Visscher

What should the type of linear traverse be exactly?

1 July 2021

Building OCaml Projects with Bazel

Torsten Schmits

Building OCaml projects with the new Bazel ruleset, OBazl

23 June 2021

Deconstructing classes

Nicholas Clarke

Deconstructing the various uses of type classes.

15 June 2021

AsciiDoc in Pandoc and Haskell

GM

Guillem Marpons

Announcing asciidoc-hs, a new AsciiDoc parser and converter in Haskell, adapted for use with Pandoc.

21 May 2021

Simulating Tenderbake

DO

Announcing a simulator for Tenderbake

23 April 2021

Ormolu internship

Mark Karpov

Tweag is looking for interns who want to contribute to Ormolu.

15 April 2021

Arrows, through a different lens

JR

Juan Raphael Diaz Simões

How to use lenses and other optics within an Arrow-based framework.

8 April 2021

Ad-hoc interpreters with capability

GD

Define effect interpreters dynamically using reflection

26 March 2021

Incubating the Haskell Foundation

RE

TS

Incubating the Haskell Foundation during 2020.

25 March 2021

Haskell and Java built with Bazel

Discussion on using Bazel with inline-java

18 March 2021

Types à la carte in Nickel

Yann Hamdaoui

A dive into Nickel's gradual type system, which mixes dynamic and static typing

4 March 2021

Announcing Gomod2nix

AH

Adam Hoese

Better Go packaging with Gomod2nix

25 February 2021

Monadic OCaml: Tezos

Clément Hurlin

Understanding monads in OCaml: mixing promises and errors

17 February 2021

Derivation outputs in a content-addressed world

Théophane Hufschmitt

This is another blog post on the upcoming content-addressed derivations for Nix. We’ve already explained the feature and some of its advantages, as well as the reasons why it isn’t easy to implement. Now we’re going to talk about about a concrete user-facing change that this…

10 February 2021

Announcing linear-base

DO

UD

Announcing linear-base, a standard library for linearly typed Haskell programs.

5 February 2021

Refinement and dependent types fellowship

GR

Georg Rudoy

This post is about compiling refinement types into a dependently typed core language, my project as an Open Source Fellow for Tweag. The post assumes some passing familiarity with the concept of dependent types, and little else. By reading this post, you will learn what a…

29 January 2021

Intern opening to improve GHC performance

RE

Richard Eisenberg

A call to action to improve GHC's performance via a paid internship

22 January 2021

Programming with contracts in Nickel

Yann Hamdaoui

Presenting Nickel: better configuration for less Programming with contracts in Nickel Types à la carte in Nickel Great Nickel configurations from little merges grow In a previous post, I gave a taste of Nickel, a configuration language we are developing at Tweag. One cool feature…

7 January 2021

Haskell dark arts, part I: importing hidden values

RE

How to break encapsulation and import a hidden value in Haskell.

16 December 2020

Announcing Trustix

AH

Adam Hoese

Trustix aims at enhancing trust in software binaries and improve reproducibility tracking using distributed binary caches.

3 December 2020

The Shrinks Applicative

Arnaud Spiwack

An applicative functor to define shrinkers

25 November 2020

A tale of Template Haskell and cross compilation

Why Template Haskell is hard for cross compilation and how Asterius does it

18 November 2020

Self-references in a content-addressed Nix

Théophane Hufschmitt

Why wasn't Nix built with a content-addressed store?

11 November 2020

Pure destination-passing style in Linear Haskell

Arnaud Spiwack

Destinations give you control over your memory allocations, and linear types make them pure.

28 October 2020

Markov chain Monte Carlo Sampling (4)

Simeon Carstens

In the final post of Tweag's four-part series, we discuss Replica Exchange, a powerful MCMC algorithm designed to improve sampling from multimodal distributions. An illustrative example and, as always, an interactive Python notebook with easy-to-modify code lead to an intuitive understanding and invite experimentation.

22 October 2020

Nickel: better configuration for less

Yann Hamdaoui

Presenting Nickel: better configuration for less Programming with contracts in Nickel Types à la carte in Nickel Great Nickel configurations from little merges grow We are making the Nickel repository public. Nickel is an experimental configuration language developed at Tweag…

9 October 2020

Edge computing with servant on Cloudflare

Cheng Shao

Just a few days ago, Cloudflare and Stack builders published a excellent blog post where they demonstrate how to deploy a Haskell program to Cloudflare Worker with Asterius. In this post we go one step further and show that you can deploy full-fledged servant applications just as…

7 October 2020

GHCIDE Fellowship summary

ZD

Zubin Duggal

Summary of the Tweag open source fellowship work related to ghcide

30 September 2020

Fully statically linked Haskell binaries with Bazel

WJ

Bazel gains support for creating fully statically linked Haskell binaries with rules_haskell and rules_nixpkgs.

23 September 2020

Announcing Lagoon

DH

Dorran Howell

Meet Lagoon, a new open source tool for centralizing and querying semi-structured datasets.

16 September 2020

Implicit Dependencies in Build Systems

RB

Robin Bate Boerop

In making a build system for your software, you codified the dependencies between its parts. But, did you account for implicit software dependencies, like system libraries and compiler toolchains? Implicit dependencies give rise to the biggest and most common problem with…

10 September 2020

Content-addressed Nix

Théophane Hufschmitt

Why content-addressability is desirable for Nix.

20 August 2020

How Nix grew a marketing team

RG

Rok Garbas

What do we need to focus on to increase adoption of Nix?

12 August 2020

Developing Python with Poetry & Poetry2nix

AH

Adam Hoese

Learn how to use Nix to create highly reproducible Python builds that are aware of native dependencies.

6 August 2020

Markov Chain Monte Carlo Sampling (3)

Simeon Carstens

Learn about Hamiltonian Monte Carlo, and how to implement it from scratch.

31 July 2020

Nix Flakes (3): Managing NixOS systems

ED

Eelco Dolstra

How to manage NixOS systems using Nix flakes.

28 July 2020

Fall 2020 Open Source Fellowships

RE

The second call for projects for the Tweag Open Source Fellowship is open and brings financial support and mentorship for Open source contributors.

13 July 2020

Announcing qualified do

MP

Announcement of the upcoming QualifiedDo language extension.

8 July 2020

Setting up Buildkite for Nix-based projects

Mark Karpov

How to setup a Buildkite-based CI for Nix projects with workers running on GCP.

29 June 2020

Testing splittable PRNGs

LM

Leonhard Markert

How we ensured that the implementation of random v1.2 produces higher quality random numbers than v1.1.

25 June 2020

Nix Flakes (2): Evaluation caching

ED

Eelco Dolstra

How Nix flakes enable caching of evaluation results of Nix expressions.

19 June 2020

Linear types are merged in GHC

Arnaud Spiwack

Looking back at the journey which brought us there, and forward to what still lies ahead.

18 June 2020

Nix and Software Heritage

AE

How Nix is collaborating with Software Heritage for long-term software reproducibility.

11 June 2020

Inline-java benchmarks

Facundo Domínguez

Benchmarks of inline-java and a discussion of its performance trade-offs.

5 June 2020

Tweag Open Source Fellows

RE

Richard Eisenberg

Tweag introduces our first cohort of Open Source Fellows.

25 May 2020

Nix Flakes (1): Introduction

ED

Eelco Dolstra

An introduction to Nix flakes and a tutorial on how to use them.

6 May 2020

A Bazel for Haskell tutorial

Clément Hurlin

How to build a complete Haskell project with Bazel.

23 April 2020

Deriving Isomorphically

HH

Hans Hoeglund

How to derive instances via arbitrary isomorphisms.

16 April 2020

The three kinds of Haskell exceptions

Arnaud Spiwack

Imprecise, synchronous, asynchronous exceptions: what do they mean, and what to do with them.

9 April 2020

Shared Bazel cache

Mark Karpov

How to set up a remote Bazel cache, and why it is a good idea.

2 April 2020

Eager vs. Lazy Instantiation

GB

Gert-Jan Bottu

This blog post describes the tradeoffs of the choice between eager and lazy instantiation of type variables in GHC.

12 March 2020

Inferred or Specified Types? Your Choice!

GB

Gert-Jan Bottu

During my internship, I implemented the explicit specificity proposal to make GHC type signatures complete.

5 March 2020

Code is Engineering, Types are Science

JR

Juan Raphael Diaz Simões

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

26 February 2020

Probabilistic Programming with monad‑bayes (3)

SB

In this blog post series, we're going to lead you through Bayesian modeling in Haskell with the monad-bayes library. In the third part of the series, we setup a simple Bayesian neural network.

19 February 2020

On linear types and exceptions

Arnaud Spiwack

A primer on the interaction between linear types and exceptions in Haskell.

14 February 2020

Tweag's Open Source Fellowship

RE

The first call for the new Tweag Open Source Fellowship is open. It offers financial support and mentorship to open source contributors.

6 February 2020

A safer inline-java

FD

Facundo Dominguez

In this post about inline-java I aim to walk you through the upcoming safe interface of the library, which allows detecting memory management mistakes at compile time using linear types.

30 January 2020

Profiling Large Haskell Codebases

JR

Juan Raphael Diaz Simões

This post describes a profiling technique for Haskell codebases that yields faithful results and is well adapted to large repositories.

16 January 2020

A Tale of Two Functors

Arnaud Spiwack

Haskell's Data and Control module hierarchies have always bugged me. Now, I understand that the intuition behind the Data/Control separation is rooted in a deep technical justification.

9 January 2020

Markov chain Monte Carlo Sampling (2)

Simeon Carstens

In this second post of Tweag's four-part series, we discuss Gibbs sampling, an important MCMC-related algorithm which can be advantageous when sampling from multivariate distributions. Two different examples and, again, an interactive Python notebook illustrate use cases and the issue of heavily correlated samples.

19 December 2019

Art in browser with Asterius

SH

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.

28 November 2019

How to make your papers run

TF

Teodoro Freund

How to use the Makam metalanguage to implement an executable formal semantics for a simple language.

21 November 2019

Untrusted CI using Nix

FK

Florian Klink

Learn how Nix's new post-build hooks feature can automatically sign and upload artifacts to a binary cache in a trusted way.

8 November 2019

Probabilistic Programming with monad‑bayes (2)

SB

Here's Part 2 in Tweag's Series about Bayesian modeling in Haskell with the monad-bayes library.

30 October 2019

Porcupine: Announcing First Release

YP

Yves Parès

We're happy to announce the first release of Porcupine, an open source framework to express portable and customizable data pipelines.

25 October 2019

Markov chain Monte Carlo Sampling (1)

Simeon Carstens

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.

11 October 2019

Ormolu: Announcing First Release

UD

We're happy to announce the first release of Ormolu, a formatter for Haskell source code.

9 October 2019

Third-party Haskell libraries in Bazel

Bazel gets native support for third-party Haskell libraries and building Cabal packages since the 0.10 release of rules_haskell.

25 September 2019

Bazel's Persistent Worker Mode for GHC

AP

Artem Pelenitsyn

I got the opportunity to work on Bazel's Persistent Worker Mode for GHC during my internship at Tweag. My goal was to improve the mode of communication between Bazel and the Haskell GHC compiler.

20 September 2019

Probabilistic Programming with monad‑bayes (1)

SB

In this blog post series, we're going to lead you through Bayesian modeling in Haskell with the monad-bayes library. In the first part of the series, we introduce two fundamental concepts of `monad-bayes`: `sampling` and `scoring`.

12 September 2019

War Stories of Asterius

SB

Siddharth Bhat

I got the opportunity to work on Asterius, a new Haskell to WebAssembly compiler, during my internship at Tweag. My task was to get anything numerics-related stabilized in its compiled code.

6 September 2019

Why Haskell is important

Mark Karpov

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

1 August 2019

Code Line Patterns

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.

17 July 2019

Revelations from repetition

Every day we write repetitive code. A lot of it is boilerplate that you write only to satisfy your compiler/interpreter. But how do languages differ in their boilerplate content? We explore these questions using data sets of Python and Haskell code.

27 June 2019

CPP considered harmful

Mathieu Boespflug

Edsger Dijkstra took issue with the “unbridled” use of the programming construct in 1968. He noted that our already limited ability to reason about the dynamic behaviour of imperative programs was nigh impossible in the presence of -jumps to arbitrary labels. With , control flow…

27 May 2019

Ormolu: a new Haskell formatter

Mark Karpov

If we think of the average Haskeller, who do we see? A poor, broken person. Tired head falls into the open palms, sobbing, deprived of the basic human right for automated source code formatting. Is it at all conceivable that so many attempts were made and none quite succeeded…

9 May 2019

Announcing inline-js

Cheng Shao

Tweag.io has a bit of a history with language interop. By this point, we created or collaborated with others in the community on HaskellR, inline-c, inline-java, and now inline-js. The original idea for this style of interop was realized in language-c-inline by Manuel Chakravarty…

10 April 2019

The Sneakernet: Towards A Much Faster Internet

Matthias Meschede

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?

3 April 2019

Storing secrets in Terraform

JC

Jonas Chevalier

I want to present you a Terraform plugin for securely managing secrets that was written for Digital Asset, who kindly allowed me to open source it. The general idea of this plugin is to protect secrets by making use of Terraform’s state. Terraform maintains the state of the world…

28 March 2019

Introducing lorri, your project's nix-env

GC

PP

Today we’re excited to announce lorri, a new tool for NixOS, Linux, and macOS that makes developing with Nix even nicer: When people try lorri, we often hear that it is more magical than they expected. What is lorri? lorri is a nix-shell replacement for project development…

20 March 2019

Capability is about free monads

Arnaud Spiwack

There has been recent online discussions about impredicative encoding (aka final encoding) of free monads. Capabilities-as-type-classes, as embodied by the capability library, are essentially the same thing.

11 March 2019

Internships at Tweag

Nicholas Clarke

The time has come again to invite applications for Tweag I/O’s paid internship programme this summer. For the past few years Tweag has taken on a number of students interested in developing their experience working on projects of benefit to the wider programming community. This…

7 March 2019

Kubernetes, KubeNix and kind

TP

Tobias Pflug

In a recent project I was tasked with creating a local testing environment for a Kubernetes cluster the client was actively working on. The main requirements were: Cross platform: It should work on Linux and macOS. Ease of use: The setup should be easy to use. Suitable for CI…

28 February 2019

Declarative, Reproducible Jupyter Environments

JS

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.

20 February 2019

Announcing clodl

FD

Have you ever needed to execute in another computer a binary that you have built, only to find that it doesn’t work because it depends on shared libraries that aren’t installed? Or even worse, you don’t have admin rights on the machine, so you cannot install the correct…

13 February 2019

The types got you

Mark Karpov

Haskell is in a way a unique language. It is, to be clear, a language people and businesses use for building “serious stuff”, yet it is also a language which remains a platform for experimentation with functional programming. This means that the teams which develop in Haskell…

6 February 2019

Mapping a Universe of Open Source Software

Matthias Meschede

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.

23 January 2019

Harnessing the Power of Haskell in JupyterLab

JS

Introduction Haskell and data science - on first sight a great match: native function composition, lazy evaluation, fast execution times, and lots of code checks. These sound like ingredients for scalable, production-ready data transformation pipelines. What is missing then? Why…

20 December 2018

TodoMVC in Haskell via WebAssembly

Cheng Shao

Getting your browser to print “Hello World!” is fun, and a milestone for compiler writers targeting the web. Soon expectations change. Can you call existing code? Can you write a moderately complex web app? How fast does it run? Previously, we showed how Haskell can call…

12 December 2018

DIY benchmark history

Théophane Hufschmitt

If you’re a conscientious developer like I am my boss is, you probably have a benchmark suite for the programs and libraries you develop. This allows you to see the impact of your changes on the performance of your applications. However, the temporal aspect of these benchmark…

4 October 2018

Announcing capability

About a year ago, Michael Snoyman made a blog post about the ReaderT pattern. Ostensibly, it’s a blog post about preferring to encode state as -s when you can. But that’s not how we read it. What we saw first and foremost is a story about using extensional type classes describing…

12 September 2018

Asterius gets a JavaScript FFI

Cheng Shao

Note: since Mar 19, 2020, we’ve changed the JavaScript import syntax: the -th argument is now instead of . The code snippets in this post have been adjusted accordingly. Previously, we announced the Asterius compiler, a new GHC-backend that translates Haskell to WebAssembly…

10 July 2018

Funflow Example: emulating Make

DO

Funflow is a workflow management tool. It turns out that workflow management tools and build tools are closely related. So if you’re more familiar with the latter, this post might be of interest to you. We’ll be illustrating some of Funflow’s features by implementing Make on top…

21 June 2018

Streaming with linear types

EH

In an earlier blog post, we discussed how streaming libraries help writing composable programs without lazy I/O. We showed, for a simple program, how using a streaming library helps reducing the amount of unaided bookkeeping that the programmer needs to do in order to make it…

29 May 2018

Compiling Haskell to WebAssembly

Cheng Shao

Asterius is an experimental WebAssembly backend for GHC. We aim to support most GHC features while making the emitted WebAssembly code as small and fast as possible. The project recently reached an exciting milestone: for the first time, simple Haskell functions can be compiled…

25 April 2018

Announcing Funflow

TN

Funflow is a system for building and running workflows. It’s a system we’ve been working on for the last few months with a small number of clients. In this blog post we’ll talk about what workflows are, why we built Funflow, and what we’d like to do with it in the future. What is…

17 April 2018

Stackage HEAD is now live!

MC

We are happy to announce that Stackage HEAD is now functional. For those who had missed the original blog post, or already forgot it, let’s refresh the idea behind Stackage HEAD. Each Stackage Nightly is a build plan that includes a large set of real-world packages that are known…

29 March 2018

We're hiring! Software engineers

Mathieu Boespflug

We’re hiring multiple software engineers to join our team. Our mission: deliver correct high-performance software faster. We have found functional programming in particular to be an enabling factor for us on some of the most ambitious projects we’ve faced for our clients…

15 March 2018

Nix + Bazel

This is the second post in our series about building polyglot projects using Bazel. You might find it useful to start with our first installment. A is an extraordinary thing. You specify a set of targets, you tell Make what the dependencies are between these targets, and Make…

8 March 2018

Implementing a safer sort with linear types

AV

In the “all about reflection” post, we introduced the data type. Any sorting function should have the type . However, this doesn’t actually guarantee that is indeed a sorting function: it only says that is a sorted list, but not that it is actually a sort of . For example is…

28 February 2018

Bazel now supports building Haskell

MK

Publishing code to the world is easy these days: take your code, tack some extra metadata onto it, call that a package and upload it to npmjs.com / crates.io / Hackage / etc. It’s also easy for other developers to include your code as part of their project: build tools are…

8 February 2018

Internships at Tweag

Nicholas Clarke

Tweag I/O is inviting applications from students for our paid internship programme this summer. If you’re a student excited about working with Haskell, Nix and similar things, then get in touch! In previous years, our interns have worked on a variety of projects across research…

5 February 2018

Free monads for cheap interpreters

JH

James Haydon

The utility of free monads can show up in surprising places. One of the projects I’m working on is an AI, and part of the strategy that it uses for responding to user input is quite simple: it generates many possible responses, and then evaluates them. Most of the computations it…

21 December 2017

All about reflection

Arnaud Spiwack

An important device in the tool belt I carry around everyday is type class reflection. I don’t reach for it often, but it can be very useful. Reflection is a little known device. And for some reason it is often spoken of with a hint of fear. In this post, I want to convince you…

29 November 2017

Making two garbage collectors be good neighbours

Foreign function interfaces (FFI) allow fast interop between languages. Unlike other approaches, like performing RPC calls between different components written in different languages, using the FFI allows for all manner of data to be shared between each language runtime, in the…

16 November 2017

Parallelising your array code

MM

Manuel M T Chakravarty

This is the fifth post in a series about array programming in Haskell — you might be interested in the first, second, third, and fourth, too. A recurring theme in array programming is performance. After all, many algorithms in numerical computing and data science are…

10 November 2017

Nix on the Windows Subsystem for Linux

JC

Jonas Chevalier

Nix on Windows: does it run yet? That’s the question I wondered about while testing the latest NixOS release, version 17.09. To that end, I had the idea of running the Nix installation process from inside the Windows Subsystem for Linux (WSL) see if it worked. And it worked…

1 November 2017

The Exodus to Streamgard, an epic poem

YP

Yves Parès

If Haskell was a god, often would he be depicted with the ravens Modularity and Abstraction flying above him, hovering the world and reporting to him every detail of our whereabouts. Haskell would sit on the Throne of Purity and look upon the world with an eye full of wisdom. And…

27 October 2017

Using Stackage for GHC regression testing

MM

Manuel M T Chakravarty

A recent development in Haskell land is the formation of the GHC DevOps Group, which was the topic of last week’s blog post. The group is a community of parties committed to the future of GHC. Tweag I/O is one such party. We are helping the group achieve its goals with concrete…

19 October 2017

Announcing the GHC DevOps Group

MM

Manuel M T Chakravarty

As Haskell is increasingly used in production environments, the Haskell toolchain is of critical importance to a growing number of people and organisations. At the heart of this toolchain is GHC (The Glasgow Haskell Compiler). Conceived nearly thirty years ago as a research…

12 October 2017

Array fusion with vector

MM

Manuel M T Chakravarty

This is the fourth post in a series about array programming in Haskell — you might be interested in the first, second, and third, too. In the previous post of this series, we explored the basic, down-to-earth, index-based array interfaces that have their roots in the Haskell…

5 October 2017

How to compose streaming programs

Facundo Domínguez

In our first blog post about streaming, we discussed how streaming libraries strengthen types to catch more errors. However, when we strengthen types, we need to be careful to not hinder program composition. After all, precise type information can make it more onerous to convince…

27 September 2017

Immutability and unboxing in array programming

MM

Manuel M T Chakravarty

This is the third post in a series about array programming in Haskell — you might be interested in the first and second, too. In the previous post of this series, we discussed commonly used vector and matrix routines, which are available in highly-optimised implementations in…

22 September 2017

GHC compiler plugins in the wild: typing Java

Previously, we discussed how to use inline-java to call any Java function from Haskell. The reverse is also possible, though that will be a topic for a future post. In this post, we’ll peek underneath the hood to talk a little about how inline-java does its deed. You might find…

15 September 2017

Java from Haskell: a tutorial

Facundo Domínguez

Our introductory post for inline-java showed that we could call methods written in Java (or indeed any JVM function) from Haskell. Much in the style of other packages, it is moreover possible to do using java syntax, so examples from Java API documentation can be reused as-is. In…

6 September 2017

Tracking performance

NM

Nicolas Mattia

In this post I’ll show you how to see the performance of your software project improve over the entire lifetime of the project. That is, how to get something like the below picture. For that, you’ll need to systematically track and store benchmark results over time. We’ll use…

31 August 2017

Enter the matrix, Haskell style

MM

Manuel M T Chakravarty

This is the second post in a series about array programming in Haskell — you might be interested in the previous post, too. Matrices are the bread and butter of most scientific and numeric computing. It is not surprising then that there is a range of standard libraries and…

24 August 2017

Compact normal forms + linear types

Arnaud Spiwack

We saw last time that with linear types, we could precisely capture the state of sockets in their types. In this post, I want to use the same idea of tracking states in types, but applied to a more unusual example from our paper: sending rich structured data types across the…

17 August 2017

Diversity through inline code

MM

Manuel M T Chakravarty

Haskell is an awesome language, but we need to remember that it is not very useful in isolation. In almost any realistic application, Haskell has to coexist with other languages, even if only to call existing C libraries or to make use of operating system services. In actual…

9 August 2017

Array programming in Haskell

MM

Manuel M T Chakravarty

Array programming in Haskell is attractive, but it is also somewhat confusing. Haskell’s functional syntax is close to the mathematical notation that is often used to develop and explain the algorithms on which array programs are based, which leads to great clarity of expression…

3 August 2017

Encode state transitions in types using linear types

Arnaud Spiwack

At the time of our first post on linear types, we were fresh out of the design phase to extend GHC with linear types. We had a prototype implementation, but it was just a proof of concept: there was precious little you could do with it. A few months down the line, we are now in a…

1 August 2017

I am a functional programming evangelist

MM

Manuel M T Chakravarty

I have had a passion for programming ever since I wrote my first piece of code as a kid. I am not sure why. Maybe it is the absolute, god-like control over the behaviour of the machine, or losing myself in the details of the code. In any case, it is intriguing. When teenage play…

27 July 2017

Streaming programs without laziness

In school, we’re taught that I/O is a simple affair: read data in, write data out. Rinse, repeat. But then as practitioners we realize matters are often more complicated. For one, I/O is slow, so we probably want operations to overlap (i.e. be processed asynchronously…

10 July 2017

R and Haskell: best of both worlds with HaskellR

SK

Sigrid Keydana

A guest post by Sigrid Keydana telling us the backstory behind the very cool trading app notebook she put together… Keras, ggplot2, Haskell and R all in one Jupyter notebook! Post originally appeared here. Earlier today, I presented at UseR! 2017 about HaskellR: a great piece of…

23 May 2017

Typing Nix

Théophane Hufschmitt

Théophane is a summer intern here at Tweag I/O. Thanks also in part to the financial help from the Nix community, he’s spending six months on devising a type system for the Nix language. Nix, the purely functional package manager Nix is a cross platform tool for managing the…

18 May 2017

We're hiring! Technical evangelist

TI

Tweag I/O engineering team

Our mission: deliver correct high-performance software faster. To do that, we recruited a team of experimentalists who use their formal training in a variety of theories and their experience to continuously improve our methodology and publish new tech. Theories that are…

13 March 2017

Linear types make performance more predictable

JB

We’re extending GHC with linear types. Ever since Jean-Yves Girard discovered linear logic in 1986, researchers around the world have been going “wow! resource tracking, this must be useful for programming languages”. After all, any real computation on a real machine takes…

17 October 2016

A new ecosystem for Haskell: the JVM

AM

By now, Haskell has first class support for seamlessly embedding foreign code into source files and casually call anything in C (via inline-c) or R (via inline-r), let alone that whole programs can also be compiled down to in-browser JavaScript, thanks to GHCJS. Today the…

20 June 2016

Haskell compute PaaS with sparkle

AM

Maintaining a compute cluster for batch or stream data processing is hard work. Connecting it up to storage facilities and time sharing resources across multiple demands even more so. Fortunately cloud service providers these days typically upscale their offering to not just…

25 February 2016

Haskell meets large scale distributed analytics

AM

Large scale distributed applications are complex: there are effects at scale that matter far more than when your application is basked in the warmth of a single machine. Messages between any two processes may or may not make it to their final destination. If reading from a memory…

9 December 2015

Stack + Nix = portable reproducible builds

YP

Stack and Cabal are great tools for incremental development. But before even starting to think about what your first commit will be about on a freshly checked out project, what you have to do is get a working development environment, by which we mean: see if it builds! Stack…

8 September 2015

Programming R at native speed using Haskell

AV

Most good data stories start with a interesting question. If the average request latency went down by a further 100ms, by how much could we expect user engagement to increase? How can we detect evidence of corruption of government officials given a list of all bids nationwide for…