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

Concepts of Functional Programming

Hello and welcome to this post about the concepts of functional programming. This article is written for developers who want to be introduced to functional programming. The idea is to describe some important concepts within functional programming and then continue discussing OCaml in future posts. The topics covered in this post are: Immutability Pure functions (isolated functions) Higher-order functions First-class functions Recursion Referential transparency Statements and Expressions Currying and Partial Application History Before we dive into these concepts, let’s explore the history of functional programming....

Jan 16 · 11 min · 2331 words