| Website | https://mjambon.com |
| Art Website | https://martinj.art |
| Website | https://mjambon.com |
| Art Website | https://martinj.art |
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

RE: https://piaille.fr/@SaintObjetBot/115994254204521191
J'étais petit quand Téléchat était à la télé et ça me faisait un peu peur !
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!
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.

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...
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!