Bye Opam, Hello Nix

I’ve been writing OCaml since November 2023 and I enjoy the language; it’s fun to write and has some features I really appreciate. However, you may have noticed I only mentioned the “language” in the first sentence. That’s because I have issues with Opam, the package manager for OCaml. It has been a pain in my development workflow and I want to eliminate it. Not long ago, I was browsing Twitch and saw some content on Nix hosted by BlackGlasses (altf4stream), Metameeee and dmmulroy....

May 13 · 9 min · 1763 words

Announcing DBCaml, Silo, Serde Postgres and a new driver for postgres

I’ve spent the last four months working on DBCaml. Some of you may be familiar with this project, while others may not. When I started DBCaml, I had one primary goal: to build a toolkit for OCaml that handles pooling and mapping to types and more. This toolkit would also run on Riot, which is an actor-model multi-core scheduler for OCaml 5. An issue I’ve found in the OCaml space and databases is that most of the existing database libraries either don’t support Postgres version 14 and higher, or they run on the PostgreSQL library, which is a C-binding library....

May 3 · 6 min · 1127 words

Introducing DBCaml, Database toolkit for OCaml

It’s time for me to discuss what I’ve been working on recently: Dbcaml. Dbcaml is a database toolkit built for OCaml, based on Riot. Riot is an actor-model multi-core scheduler for OCaml 5. Riot works by creating lightweight processes that execute code and communicate with the rest of the system using message-passing. You can find Riot on GitHub. The core idea of DBCaml is to provide a toolkit that assists with the “boring” tasks you don’t want to deal with, allowing you to focus on your queries....

Feb 20 · 7 min · 1356 words

Building a Connnection Pool for DBCaml on top of riot

While developing DBCaml, I needed to build a connection pool to manage all the connections to the database. This allows us to create a pool of connections that can be used by multiple processes to send queries to the database and then return the connection back to the pool. In this post, I will provide a more in-depth explanation of how the pool, named PoolParty, looks and functions. It’s important to note that DBCaml is currently in an unstable version (v0....

Feb 19 · 8 min · 1680 words

OCaml: Introduction

Time to delve into OCaml, a functional programming language that was first released in 1996 and has gained popularity in the academic world. This article is for those who are interested in OCaml and want to learn more about the language. It covers parts that I felt I needed to learn when I started with OCaml, and it’s a continuation of the “concepts of functional programming” article I wrote a while ago....

Feb 12 · 11 min · 2222 words