Martin Jambon 🌍🌎🌏

@mjambon
29 Followers
60 Following
177 Posts
Peace is not an ideal, it's a compromise.

Indent multiline text in #ocaml with this one weird trick the government doesn't want you to know:

val indent : int -> string -> string

let indent n str =
let prefix = String.make n ' ' in
str
|> String.split_on_char '\n'
|> List.map (fun line -> prefix ^ line)
|> String.concat "\n"

It's crazy that it took me 35 years to discover this song. I'm really bad at this.

Mazzy Star - Be my Angel (1990)
starts like Fade into You (1993), their most famous song
https://www.youtube.com/watch?v=g7JQ0dM6VqE

Mazzy Star - Be My Angel

YouTube

RE: https://piaille.fr/@SaintObjetBot/115994254204521191

J'étais petit quand Téléchat était à la télé et ça me faisait un peu peur !

I filmed myself to prove I'm real or something.
Study #16, 2026
I've been making more of these simple works lately. Follow me on Instagram for more updates. https://www.instagram.com/martinjambon #art
Francis Hallé est mort, mais son rêve continue : faire renaître une forêt primaire de 70 000 ha
https://lareleveetlapeste.fr/francis-halle-est-mort-mais-son-reve-continue-faire-renaitre-une-foret-primaire-de-70-000-ha/
Francis Hallé est mort, mais son rêve continue : faire renaître une forêt primaire de 70 000 ha

Après son décès, le projet ambitieux de Francis Hallé se poursuit : laisser renaître une vaste forêt primaire en Europe de l’Ouest.

La Relève et La Peste
[ANN] Testo 0.3

Testo 0.3.4 is out! Testo is an industry-grade test framework for OCaml. It is suitable for unit-testing OCaml code and for end-to-end testing command-line executables. Testo is an open-source project maintained by the OCaml community, with support from Semgrep. Highlights of this release include: better integration with Dune (testo-template, --chdir) improved Windows support (internal CI checks, CRLF/LF diff highlighting) quick start instructions and revised tutorial Enjoy!

OCaml

Pragmatism is recognizing that the circle constant is τ but calling it 2π for backward compatibility.
https://www.tauday.com/tau-manifesto

P.S.: I'm not going to hang my painting on a circular curtain rod after all. Maybe a straight one will do.

No, really, pi is wrong: The Tau Manifesto

For millennia, the circle has been considered the most perfect of shapes, and the circle constant π captured the geometry of the circle in a single number. But π is wrong, and it’s time to set things right.

Tau Day
Here's a proof of concept adding exhaustiveness checking to ocamllex: https://github.com/ocaml/ocaml/pull/14447
#ocaml
Proof-of-concept: exhaustiveness checking for ocamllex regular expressions by mjambon · Pull Request #14447 · ocaml/ocaml

Goal: make ocamllex print a warning if a rule can fail on some input and show an example of nonmatching input. This is a help to prevent getting the undesirable exception Failure("lexing: empt...

GitHub

I wrote an #OCaml program that checks whether a regular expression matches every input string. If not, it provides an example of nonmatching input.

$ echo '.? | [^h]. | .[^i] | ...+' | exhausteve
The provided regular expression is not exhaustive.
Here is an example of nonmatching input:
"hi"

I had a lot of fun working on this project that nobody asked for and I'm very happy with how it turned out!

https://github.com/mjambon/exhausteve

GitHub - mjambon/exhausteve: My name is Steve, Exhausteve

My name is Steve, Exhausteve. Contribute to mjambon/exhausteve development by creating an account on GitHub.

GitHub