Blog

The OCaml Planet

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.

Outreachy May 2024 Demo

The OCaml community participated in the May 2024 round of [Outreachy](https://www.outreachy.org/) internships. Three interns worked on a range of projects including tools to diff OCaml APIs, more accessible diffing tools and running OCaml exercise...

07 Sep 2024

Watch OCaml

View Video
OCaml's New Proposed "include functor" Syntax | OCaml Unboxed

A well-designed interface offers lots of expressiveness with minimal implementation. OCaml programmers thus often implement just a few functions in an interface (module type), then use a functor to define the rest based on these definitions. This idiom, though useful, can be awkward, requiring a little repetition. To make this easier, Jane Street designed the "include functor" syntax. This video shows how it works and why you might want to use it. View instructions to get the compiler I use in this video: https://github.com/janestreet/opam-repository/tree/with-extensions Reference documentation for the "include functor" feature: https://github.com/ocaml-flambda/flambda-backend/blob/main/ocaml/jane/doc/extensions/include-functor.md Code written in this video: https://github.com/goldfirere/janestreet-videos/blob/main/include-functor/include_functor.ml Proposal to include "include functor" in mainstream OCaml: https://github.com/ocaml/RFCs/pull/43

07 Aug 2024

Jane Street - OCaml Unboxed

View Video
Programming with OCaml's Local Mode | OCaml Unboxed

This OCaml Unboxed episode demonstrates some of the twists and turns you might encounter while programming with locals and introduces the *global modality*. Watching this video might help you learn what to look for when programming with locals! View instructions to get the compiler I use in this video: https://github.com/janestreet/opam-repository/tree/with-extensions Full documentation of locals: https://github.com/ocaml-flambda/flambda-backend/blob/main/ocaml/jane/doc/extensions/local/intro.md

24 Jun 2024

Jane Street - OCaml Unboxed

View Video
Regions with OCaml's Local Types | OCaml Unboxed

This OCaml Unboxed episode describes regions and the hidden regional mode in OCaml's local types, as developed by Jane Street. It turns out that local parameters aren't really local: they're regional! This explains how some impossible-looking programs actually work. View instructions to get the compiler I use in this video: https://github.com/janestreet/opam-repository/tree/with-extensions Full documentation of locals: https://github.com/ocaml-flambda/flambda-backend/blob/main/ocaml/jane/doc/extensions/local/intro.md

13 Jun 2024

Jane Street - OCaml Unboxed

View Video
Exploring the Hidden Secrets within OCaml’s Local Function Types | OCaml Unboxed

This OCaml Unboxed episode demonstrates how partial application and currying can cause trouble when mixed with locals. It turns out that putting "local_" in your function type may do more than you bargained for! Code used in this video: https://github.com/goldfirere/janestreet-videos/blob/main/locals/08-function-types/local.ml View instructions to get the compiler I use in this video: https://github.com/janestreet/opam-repository/tree/with-extensions Full documentation of locals: https://github.com/ocaml-flambda/flambda-backend/blob/main/ocaml/jane/doc/extensions/local/intro.md

29 May 2024

Jane Street - OCaml Unboxed

View Video
Pitfalls with Tail Calls and Locals in OCaml | OCaml Unboxed

This is the seventh in a series about locals in OCaml. This episode explains the challenges around tail-call optimization and how to keep local variables from escaping their region. I introduce the [@nontail] annotation to prevent tail-call optimization, which is often needed when writing code with locals. Code used in this video: https://github.com/goldfirere/janestreet-videos/blob/main/locals/07-tails/local.ml View instructions to get the compiler I use in this video: https://github.com/janestreet/opam-repository/tree/with-extensions

07 May 2024

Jane Street - OCaml Unboxed

View Video
Pitfalls with Tail Calls and Locals in OCaml | OCaml Unboxed

This is the seventh in a series about locals in OCaml. This episode explains the challenges around tail-call optimization and how to keep local variables from escaping their region. I introduce the [@nontail] annotation to prevent tail-call optimization, which is often needed when writing code with locals. Code used in this video: https://github.com/goldfirere/janestreet-videos/blob/main/locals/07-tails/local.ml View instructions to get the compiler I use in this video: https://github.com/janestreet/opam-repository/tree/with-extensions

07 May 2024

Jane Street - OCaml Unboxed

View Video
Structures de contrôle : de « goto » aux effets algébriques (14) - Xavier Leroy (2023-2024)

Enseignement 2023-2024 : Structures de contrôle : de « goto » aux effets algébriques Séminaire du 14 mars 2024 : Design and Compilation of Efficient Effect Handlers in the Koka Language Intervenant : Daan Leijen, Microsoft Research Retrouvez les enregistrements audios et vidéos du cycle et son texte de présentation : https://www.college-de-france.fr/fr/agenda/seminaire/structures-de-controle-de-goto-aux-effets-algebriques Chaire Sciences du logiciel Professeur : Xavier Leroy Retrouvez tous les enseignements du Pr Xavier Leroy : https://www.college-de-france.fr/chaire/xavier-leroy-sciences-du-logiciel-chaire-statutaire https://www.youtube.com/playlist?list=PLtimy8tnozICbD45yhB7Ha_zIBJTIK3im Le Collège de France est une institution de recherche fondamentale dans tous les domaines de la connaissance et un lieu de diffusion du « savoir en train de se faire » ouvert à tous. Les cours, séminaires, colloques sont enregistrés puis mis à disposition du public sur le site internet du Collège de France. Découvrez toutes les ressources du Collège de France : https://www.college-de-france.fr Suivez-nous sur : Facebook : https://www.facebook.com/College.de.France Instagram : https://www.instagram.com/collegedefrance X (ex-Twitter) : https://twitter.com/cdf1530 LinkedIn : https://fr.linkedin.com/company/collègedefrance

18 Mar 2024

Collège de France - Sciences du logiciel

View Video
Structures de contrôle : de « goto » aux effets algébriques (14) - Xavier Leroy (2023-2024)

Enseignement 2023-2024 : Structures de contrôle : de « goto » aux effets algébriques Séminaire du 14 mars 2024 : Design and Compilation of Efficient Effect Handlers in the Koka Language Intervenant : Daan Leijen, Microsoft Research Retrouvez les enregistrements audios et vidéos du cycle et son texte de présentation : https://www.college-de-france.fr/fr/agenda/seminaire/structures-de-controle-de-goto-aux-effets-algebriques Chaire Sciences du logiciel Professeur : Xavier Leroy Retrouvez tous les enseignements du Pr Xavier Leroy : https://www.college-de-france.fr/chaire/xavier-leroy-sciences-du-logiciel-chaire-statutaire https://www.youtube.com/playlist?list=PLtimy8tnozICbD45yhB7Ha_zIBJTIK3im Le Collège de France est une institution de recherche fondamentale dans tous les domaines de la connaissance et un lieu de diffusion du « savoir en train de se faire » ouvert à tous. Les cours, séminaires, colloques sont enregistrés puis mis à disposition du public sur le site internet du Collège de France. Découvrez toutes les ressources du Collège de France : https://www.college-de-france.fr Suivez-nous sur : Facebook : https://www.facebook.com/College.de.France Instagram : https://www.instagram.com/collegedefrance X (ex-Twitter) : https://twitter.com/cdf1530 LinkedIn : https://fr.linkedin.com/company/collègedefrance

18 Mar 2024

Collège de France - Sciences du logiciel

View Video
Structures de contrôle : de « goto » aux effets algébriques (13) - Xavier Leroy (2023-2024)

Enseignement 2023-2024 : Structures de contrôle : de « goto » aux effets algébriques Cours du 14 mars 2024 : Logiques de programmes pour le contrôle et les effets Professeur : Xavier Leroy Chaire Sciences du logiciel Tout comme la logique mathématique donne des lois pour raisonner sur les définitions et les énoncés mathématiques, une logique de programmes pour un langage de programmation donne des lois pour établir des propriétés vraies de toutes les exécutions possibles d'un programme écrit dans ce langage. Après des rappels sur cette approche déductive de la vérification de programmes et sur la plus ancienne de ces logiques, celle publiée par C.A.R. Hoare en 1969, ce cours a montré comment cette logique de Hoare s'applique à de nombreuses structures de contrôle, dont plusieurs formes de boucles, avec sortie prématurée mono-niveau ou multi-niveaux, mais aussi à des constructions non-déterministes comme les commandes gardées de Dijkstra, et jusqu'aux coroutines asymétriques et aux threads coopératifs vus au deuxième cours. Même le branchement « goto » peut être spécifié en logique de Hoare, en prenant quelques précautions. Lire la suite : https://www.college-de-france.fr/fr/agenda/cours/structures-de-controle-de-goto-aux-effets-algebriques/logiques-de-programmes-pour-le-controle-et-les-effets Retrouvez les enregistrements audios et vidéos du cycle et son texte de présentation : https://www.college-de-france.fr/fr/agenda/cours/structures-de-controle-de-goto-aux-effets-algebriques Retrouvez tous les enseignements du Pr Xavier Leroy : https://www.college-de-france.fr/chaire/xavier-leroy-sciences-du-logiciel-chaire-statutaire https://www.youtube.com/playlist?list=PLtimy8tnozICbD45yhB7Ha_zIBJTIK3im Le Collège de France est une institution de recherche fondamentale dans tous les domaines de la connaissance et un lieu de diffusion du « savoir en train de se faire » ouvert à tous. Les cours, séminaires, colloques sont enregistrés puis mis à disposition du public sur le site internet du Collège de France. Découvrez toutes les ressources du Collège de France : https://www.college-de-france.fr Suivez-nous sur : Facebook : https://www.facebook.com/College.de.France Instagram : https://www.instagram.com/collegedefrance X (ex-Twitter) : https://twitter.com/cdf1530 LinkedIn : https://fr.linkedin.com/company/collègedefrance

18 Mar 2024

Collège de France - Sciences du logiciel

View Video