Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt <[email protected]>
Newsgroups gmane.comp.lang.caml.inria
Message-ID <[email protected]>
Hello

Here is the latest OCaml Weekly News, for the week of October 31 to
November 07, 2023.

Table of Contents
─────────────────

A second article about Miou
atddiff: report incompatibilities after modifying a typed interface
OCaml implementation of webbench
Using Docusaurus to document an OCaml project
Release of ocaml-sf/learn-ocaml:0.16.0
Discord.ml: Eio-based Discord library with voice support
Release of Fmlib 0.5.7
Survey on the new “Getting Started” Documentation on OCaml.org
Other OCaml News
Old CWN


A second article about Miou
═══════════════════════════

  Archive: <https://mastodon.social/@dinosaure/111295328688421482>


Dinosaure announced
───────────────────

  I finally made my second article about #Miou (#OCaml 5 & #multicore)
  and its notion of rules. It’s available here:
  <https://blog.osau.re/articles/miou_rules.html> (enjoy the reading).


atddiff: report incompatibilities after modifying a typed interface
═══════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/new-atddiff-report-incompatibilities-after-modifying-a-typed-interface/13347/1>


Martin Jambon announced
───────────────────────

Background
╌╌╌╌╌╌╌╌╌╌

  ATD stands for “Adjustable Type Definitions”. The [ATD project]
  consists of a language for specifying types and their JSON
  representation and code generators that make it safe and easy to read
  and write JSON data. It currently offers interoperability for 6
  programming languages (D, Java, OCaml, Scala, TypeScript,
  Python/Mypy).


[ATD project] <https://github.com/ahrefs/atd>


Tracking incompatibilities with atddiff
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Atddiff takes two versions of an `.atd' file, which is a collection of
  type definitions, compares them and reports incompatibilities. Here’s
  a simple example:

  ┌────
  │ (* example.v1.atd  *)
  │ type t = {
  │   x: string;
  │ }
  └────

  ┌────
  │ (* example.v2.atd *)
  │ type t = {
  │   ?x: string option;
  │ }
  └────

  Atddiff finds one problem:
  ┌────
  │ $ atddiff example.v1.atd example.v2.atd
  │ [221ed3ce] Forward incompatibility:
  │ File "example.v1.atd", line 2, characters 2-11
  │ File "example.v2.atd", line 2, characters 2-19:
  │ Formerly required field 'x' is now optional.
  │ The following types are affected:
  │   t
  └────

  Incompatibilities can be backward (= can’t read older data), forward
  (= can’t read newer data), or both. Depending on the use case for a
  type, the user may care about just one direction. The [documentation]
  expands a bit on this and provides a command to use atddiff with git.

  The recommended version of atddiff is the latest, >= 2.15.0. It is
  installed as part of the `atd' opam package:
  ┌────
  │ opam update
  │ opam install atd.2.15.0
  └────


[documentation]
<https://atd.readthedocs.io/en/latest/atd-language.html#how-to-change-a-json-interface-safely>


OCaml implementation of webbench
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-implementation-of-webbench/13348/1>


bigconvience announced
──────────────────────

Overview
╌╌╌╌╌╌╌╌

  [webbench_ml] is the OCaml implementation of [webbench]


[webbench_ml] <https://github.com/bigconvience/webbench_ml>

[webbench] <http://home.tiscali.cz/~cz210552/webbench.html>


Web Bench
╌╌╌╌╌╌╌╌╌

  Web Bench is very simple tool for benchmarking WWW or proxy servers.
  Uses fork() for simulating multiple clients and can use
  HTTP/0.9-HTTP/1.1 requests. This benchmark is not very realistic, but
  it can test if your HTTPD can realy handle that many clients at once
  (try to run some CGIs) without taking your machine down. Displays
  pages/min and bytes/sec. Can be used in more aggressive mode with -f
  switch.


Build
╌╌╌╌╌

  ┌────
  │ $ git clone https://github.com/bigconvience/webbench_ml.git
  │ $ cd webbench_ml
  │ $ eval `opam env`
  │ $ dune build
  │ $ dune exec -- webbench -t 10 -c 20 http://127.0.0.1:8000/
  └────


Using Docusaurus to document an OCaml project
═════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/using-docusaurus-to-document-an-ocaml-project/13359/1>


Mathieu Barbin announced
────────────────────────

  Hi!

  I wanted to share some positive feedback on using [Docusaurus] to
  document an OCaml Project: [Bopkit].

  Among the reasons I choose to experiment with it was its compatibility
  with `ocaml-mdx' and the `dune-runtest' & `dune-promote' workflow.
  That is, a lot of the dynamic contents that shows in the doc stays in
  sync when the code is updated during development, including file
  parts, expect tests traces and mermaid diagrams.

  I also liked the fact that the contents is mostly based on `*.md'
  files that are present in the tree, and those that can be browsed
  directly from GitHub as well (such as all the README.md found at the
  leaf of the project’s directory structure, which are rendered
  similarly by GitHub).

  This integrates well with GitHub and GitHub Actions in that the doc
  can be hosted directly in the GitHub pages of the project.

  I’ve also experimented with their support for a global search box via
  [algoalia] which was overall straight forward to setup.

  As a side note, I just went through their [v3 migration guide], and I
  liked the experience.

  Putting it out there in case you’re interested in trying it out, or
  simply want to browse an example of a Docusaurus setup involving an
  OCaml project using `ocaml-mdx' and `dune'.

  Thanks!


[Docusaurus] <https://docusaurus.io/>

[Bopkit] <https://mbarbin.github.io/bopkit/>

[algoalia] <https://docusaurus.io/docs/search#using-algolia-docsearch>

[v3 migration guide] <https://docusaurus.io/docs/migration/v3>


Release of ocaml-sf/learn-ocaml:0.16.0
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-ocaml-sf-learn-ocaml-0-16-0/13361/1>


Erik Martin-Dorel announced
───────────────────────────

  Dear all,

  We are pleased to announce the latest stable release of [Learn-OCaml],
  version `0.16.0'.

  Many thanks to all users who contributed bugs reports, fixes, and
  enhancements!

  A comprehensive list of the fixes and enhancements offered by this
  release is available in [the Release Notes] which also gathers static
  binaries for Linux and macOS, the corresponding [opam-repository pull
  request] is pending, and the Docker images of [learn-ocaml] and
  [learn-ocaml-client] are immediately available on Docker Hub.

  If you happen to maintain a `learn-ocaml' server, we strongly
  recommend that you update your version to `0.16.0' to benefit from
  important fixes, as well as newest features.


[Learn-OCaml] <https://github.com/ocaml-sf/learn-ocaml>

[the Release Notes]
<https://github.com/ocaml-sf/learn-ocaml/releases/tag/v0.16.0>

[opam-repository pull request]
<https://github.com/ocaml/opam-repository/pull/24739>

[learn-ocaml] <https://hub.docker.com/r/ocamlsf/learn-ocaml/tags>

[learn-ocaml-client]
<https://hub.docker.com/r/ocamlsf/learn-ocaml-client/tags>

Highlights
╌╌╌╌╌╌╌╌╌╌

  1. From a student point-of-view, a feature developed by M. Hernouf, D.
     Pinto, and L. Gesbert from OCamlPro significantly improves the
     UI/UX for the *exercises list*, adding three sub-tabs `By
     category', `By skill' (see the screenshot below), and `By
     difficulty', with collapsible blocks:

     <https://global.discourse-cdn.com/business7/uploads/ocaml/original/2X/6/616d3600c476e1c58a9446961aac8a60fb6a847f.png>

  2. From a teacher point-of-view, the handling of *Open/Closed status
     for assigned exercises* has been significantly improved (cf. issues
     [#534] and [#558]). When exercises are assigned, learn-ocaml’s
     teacher tab now shows the global-status of the exercises,
     especially for unassigned students (see the screenshot below). The
     underlying soundness invariant has been made explicit, and is now
     verified using a dedicated **ppx_expect** test suite.

     <https://global.discourse-cdn.com/business7/uploads/ocaml/original/2X/5/5f7794020fdfb596233087987e94ce1c81e5b0a8.png>

  If need be, feel free to open issues in the [Learn-OCaml bug tracker]
  or the [learn-ocaml.el bug tracker], or post in this thread to share
  comments.

  Happy OCaml learning and teaching, and stay tuned for the next
  release!

  Erik Martin-Dorel for the Learn-OCaml team 🐫


[#534] <https://github.com/ocaml-sf/learn-ocaml/issues/534>

[#558] <https://github.com/ocaml-sf/learn-ocaml/issues/558>

[Learn-OCaml bug tracker]
<https://github.com/ocaml-sf/learn-ocaml/issues/new/choose>

[learn-ocaml.el bug tracker]
<https://github.com/pfitaxel/learn-ocaml.el/issues>


Erik Martin-Dorel later added
─────────────────────────────

  For those who don’t know the learn-ocaml platform yet:

  • the [learn-ocaml] artifact (distributed under the MIT license) is a
    full-stack web server written in OCaml, fully customizable to serve
    Markdown-based lectures and interactive exercises endowed with
    auto-grading tests, written in OCaml as well;
  • an [emacs frontend] for learn-ocaml is also available on [MELPA];
  • the [learn-ocaml-corpus] is a large collection of exercises that
    originated in the [OCaml MOOC] and has been further extended by
    several authors since then;
  • a static instance of learn-ocaml, combining the latest release of
    learn-ocaml and learn-ocaml-corpus’ exercises, is available at:
    [https://ocaml-sf.org/learn-ocaml-public/]


[learn-ocaml] <https://github.com/ocaml-sf/learn-ocaml>

[emacs frontend] <https://github.com/pfitaxel/learn-ocaml.el>

[MELPA] <https://melpa.org/#/learn-ocaml>

[learn-ocaml-corpus] <https://github.com/ocaml-sf/learn-ocaml-corpus>

[OCaml MOOC]
<https://www.youtube.com/watch?v=o0CK_7ruImE&list=PLTBEN441uEY36t5CCrJkdTSv588d3nWN5>

[https://ocaml-sf.org/learn-ocaml-public/]
<https://ocaml-sf.org/learn-ocaml-public/#activity=exercises>


Discord.ml: Eio-based Discord library with voice support
════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/discord-ml-eio-based-discord-library-with-voice-support/13370/1>


anqou announced
───────────────

  Hi. I’m writing a Discord library, Discord.ml, in OCaml for my
  personal project. As of now, it supports voice functionality as well
  as text one, and you can write, for example, a music bot with this
  library.

  <https://github.com/ushitora-anqou/discordml>

  I used Eio to write this library and wrote a simple Erlang-like actor
  model implementation ([actaa]). Also, I used Cohttp-eio (beta1) with
  ocaml-websocket to communicate with the Discord’s server (gateway).

  I hope someone may be interested in this library. Any feedback would
  be appreciated!


[actaa] <https://github.com/ushitora-anqou/actaa>


Release of Fmlib 0.5.7
══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-fmlib-0-5-7/13373/1>


Helmut announced
────────────────

  Hi all,

  I am happy to annouce the release 0.5.7 of `Fmlib'.

  This release makes some minor improvements for combinator parsing with
  separate lexer and parser. The position information contains now
  character and byte offsets and offers position range information on
  syntax errors.

  For more information on combinator parsing with separate lexer and
  parser please read
  <https://hbr.github.io/fmlib/odoc/fmlib_parse/parse_lex.html>.

  • General information about fmlib:
    <https://hbr.github.io/fmlib/odoc/index.html>
  • Combinator parsing with fmlib:
    <https://hbr.github.io/fmlib/odoc/fmlib_parse/index.html>


Survey on the new “Getting Started” Documentation on OCaml.org
══════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/survey-on-the-new-getting-started-documentation-on-ocaml-org/13380/1>


Sabine Schmaltz announced
─────────────────────────

  Hello everyone,

  we’ve prepared a survey to capture some anonymous feedback on the new
  documentation in the [“Getting Started” section on OCaml.org].

  I’d be stoked if you could help us by reviewing the new pages and
  completing the survey, no matter if you’re a newcomer to OCaml or not.

  We’re conducting this survey to understand if and what we need to
  change going forward, so that, in the end, we have documentation that
  works for newcomers with varying backgrounds on OCaml.org. We’re doing
  this in a non-public survey, so that everyone can speak their mind
  freely without being judged. A summary of points brought up will be
  posted at latest by Nov 30 as a response to this post.

  If you’re interested in contributing to the documentation, or having a
  call with us, there’s a question at the very end of the survey where
  you can leave your Email so we can reach out to you.

  Thanks for participating! Let’s make the OCaml documentation awesome!
  :fire:

  <https://docs.google.com/forms/d/e/1FAIpQLSeP8JUaHEoJYnFBV25ziYBSDezeXzbFrkUmi1cCvkimv3bUAw/viewform?usp=sf_link>


[“Getting Started” section on OCaml.org]
<https://ocaml.org/docs/get-started>


Other OCaml News
════════════════

From the ocaml.org blog
───────────────────────

  Here are links from many OCaml blogs aggregated at [the ocaml.org
  blog].

  • [WebAssembly Support for OCaml: Introducing Wasm_of_Ocaml]
  • [Beta release of Frama-C 28.0~beta (Nickel)]
  • [Tutorial: Building a Browser Extension With Irmin]
  • [Off to the Races: Using ThreadSanitizer in OCaml]
  • [Prioritising Mental Health at Tarides]
  • [Porting OBuilder to FreeBSD]
  • [Tutorial: How to Port Lwt Applications to Eio]
  • [Florian compiler weekly, 26 September 2023]
  • [A Year of SpaceOS: Showing the World the Benefits of OCaml]
  • [Our Experience at Tarides: Projects From Our Internships in 2023]
  • [Beyond TypeScript: Differences Between Typed Languages]
  • [What the interns have wrought, 2023 edition]
  • [The State of the Art in Functional Programming: Tarides at ICFP
    2023]
  • [Release of Frama-Clang 0.0.14]
  • [Oxidizing OCaml: Data Race Freedom]


[the ocaml.org blog] <https://ocaml.org/blog/>

[WebAssembly Support for OCaml: Introducing Wasm_of_Ocaml]
<https://tarides.com/blog/2023-11-01-webassembly-support-for-ocaml-introducing-wasm-of-ocaml>

[Beta release of Frama-C 28.0~beta (Nickel)]
<https://frama-c.com/fc-versions/nickel.html>

[Tutorial: Building a Browser Extension With Irmin]
<https://tarides.com/blog/2023-10-25-tutorial-building-a-browser-extension-with-irmin>

[Off to the Races: Using ThreadSanitizer in OCaml]
<https://tarides.com/blog/2023-10-18-off-to-the-races-using-threadsanitizer-in-ocaml>

[Prioritising Mental Health at Tarides]
<https://tarides.com/blog/2023-10-10-prioritising-mental-health-at-tarides>

[Porting OBuilder to FreeBSD]
<https://tarides.com/blog/2023-10-04-porting-obuilder-to-freebsd>

[Tutorial: How to Port Lwt Applications to Eio]
<https://tarides.com/blog/2023-09-27-tutorial-how-to-port-lwt-applications-to-eio>

[Florian compiler weekly, 26 September 2023]
<http://gallium.inria.fr/blog/florian-cw-2023-09-26>

[A Year of SpaceOS: Showing the World the Benefits of OCaml]
<https://tarides.com/blog/2023-09-20-a-year-of-spaceos-showing-the-world-the-benefits-of-ocaml>

[Our Experience at Tarides: Projects From Our Internships in 2023]
<https://tarides.com/blog/2023-09-15-our-experience-at-tarides-projects-from-our-internships-in-2023>

[Beyond TypeScript: Differences Between Typed Languages]
<https://tech.ahrefs.com/beyond-typescript-differences-between-typed-languages-f3e14253?source=rss----303662d88bae--ocaml>

[What the interns have wrought, 2023 edition]
<https://blog.janestreet.com/what-the-interns-have-wrought-2023/>

[The State of the Art in Functional Programming: Tarides at ICFP 2023]
<https://tarides.com/blog/2023-09-08-the-state-of-the-art-in-functional-programming-tarides-at-icfp-2023>

[Release of Frama-Clang 0.0.14]
<https://frama-c.com/fc-plugins/frama-clang.html>

[Oxidizing OCaml: Data Race Freedom]
<https://blog.janestreet.com/oxidizing-ocaml-parallelism/>


Old CWN
═══════

  If you happen to miss a CWN, you can [send me a message] and I’ll mail
  it to you, or go take a look at [the archive] or the [RSS feed of the
  archives].

  If you also wish to receive it every week by mail, you may subscribe
  to the [caml-list].

  [Alan Schmitt]


[send me a message] <mailto:[email protected]>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[caml-list] <https://sympa.inria.fr/sympa/info/caml-list>

[Alan Schmitt] <https://alan.petitepomme.net/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.