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.

OCaml Functors

In my OCaml project, I’d like to abstract away the details of running containers into specific modules based on the OS. Currently, I have working container setups for Windows and Linux, and I’ve haphazardly peppered if Sys.win32 then where I need differentiation, but this is OCaml, so let us use functors!

01 Jul 2025

Marc Elvers

Read Article
Learning OCaml: Module Aliases

OCaml is famous for allow you to do a lot of things like modules. Like really a lot! Advanced features like functors, aside, it’s really common to either alias module names to something shorter or localize open Module_name to a smaller scope:

06 Apr 2025

Bozhidar Batsov

Read Article
Learning OCaml: Regular Expressions

One of the things that bothered me initially in OCaml was the poor support for working in regular expressions in the standard library. Technically speaking, there’s no support for them at all!

04 Apr 2025

Bozhidar Batsov

Read Article
An OCaml quine | Drup's thingies

(fun x -> Printf.printf "%s %S" x x) "(fun x -> Printf.printf \"%s %S\" x x)"

30 May 2018

Gabriel Radanne

Read Article
Nesting quoted strings in OCaml

Quoting According to the lexical conventions of OCaml, characters different from \ and " can be enclosed in sing...

28 Oct 2017

Shayne Fletcher

Read Article
Monty Hall

Suppose you're on a game show, and you're given the choice of three doors : Behind one door is a car; behind the others, goats. You pick a d...

12 Oct 2016

Shayne Fletcher

Read Article