Blog

The OCaml Planet RSS

Articles and videos contributed by both experts, companies and passionate developers from the OCaml community. From in-depth technical articles, project highlights, community news, or insights into Open Source projects, the OCaml Planet RSS feed aggregator has something for everyone.

Want your Blog Posts or Videos to Show Here?

To contribute a blog post, or add your RSS feed, check out the Contributing Guide on GitHub.

neocaml: a new Emacs package for OCaml programming

I wasn’t an early adopter of TreeSitter in Emacs, as usually such big transitions are not smooth and the initial support for TreeSitter in Emacs left much to be desired. Recently, however, Emacs 30 was released with many improvements on that front, and I felt the time was right for me to (try to) embrace TreeSitter.

14 Mar 2025

Bozhidar Batsov

Read Article
Learning OCaml: Functions without Parameters

A couple of days ago I noticed on OCaml’s Discord server that someone was confused by OCaml function applications (invocations) like these:

02 Mar 2025

Bozhidar Batsov

Read Article
Simple Ways to Run OCaml Code

When people think of OCaml they are usually thinking of compiling code to a binary before they are able to run it. While most OCaml code is indeed compiled to binaries, you don’t really need to do this, especially while you’re learning the language and are mostly playing with small exercises.

23 Feb 2025

Bozhidar Batsov

Read Article
OCaml Adds `List.take` and `List.drop`

One of my small issues with OCaml is that the standard library is quite spartan. Sometimes it misses functions that are quite common in other (similar) languages. One such example are functions like drop, drop_while, take and take_while in the List module.1 What’s weird is that the similar Seq module features all those functions since OCaml 4.14. I believe it was Haskell that popularized them.

23 Feb 2024

Bozhidar Batsov

Read Article
Learning OCaml: Verifying tail-recursion with @tailcall

How can you be sure that an OCaml function you wrote is actually tail-recursive? You can certainly compile the code and look at the generated assembly code, but that’d be quite the overkill, given there is a much simpler way to do this.

16 Jan 2024

Bozhidar Batsov

Read Article
Learning OCaml: Quoted String Literals

While learning OCaml I’ve noticed one curious feature - it has two types of string literals. The first type are the common and quite familiar “double-quoted string literals” (or perhaps simply “string literals”?):

20 Apr 2023

Bozhidar Batsov

Read Article
How are OCaml Programmers Called?

Ruby programmers are commonly called Rubyists. Python programmers are often called Pythonistas. Lisp programmers are widely known as Lispers. Clojure programmers are sometimes called Clojurians.

20 Mar 2023

Bozhidar Batsov

Read Article
Reading Files in OCaml

One thing I’ve noticed on my journey to learn OCaml was that reading (text) files wasn’t as straightforward as with many other programming languages. To give you some point of reference - here’s how easy it is to do this in Ruby:

27 Nov 2022

Bozhidar Batsov

Read Article
OCaml Tips: Implementing a range Function

Lots of programming languages have some built-in range functionality, that’s typically used to generate a list/array of integer numbers. Here are a couple of examples from Ruby and Clojure:

31 Oct 2022

Bozhidar Batsov

Read Article