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