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.

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
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
OCaml Tips: Converting a String to a List of Characters

While playing with OCaml I was surprised to learn there’s no built-in function the convert a string to a list of its characters. Admittedly, that’s not something you need very often, but it does come handy from time to time. There are many ways to implement such a function ourselves and the one I like the most makes use of List.init:

24 Oct 2022

Bozhidar Batsov

Read Article
Bilingual "hello world"

Here is a fun (and slightly useless) hack: #cd "." (* echo "Hello world" <<"OCAMLCODE_END" *) let () = print_endline "Bonjour le monde" (...

28 Nov 2007

Till Varoquaux

Read Article