[Caml-list] Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt
2024-05-14T13:25:53Z

[-- Attachment #1: Type: text/plain, Size: 34428 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of May 07 to 14,
2024.

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

Some code for Molecular Mechanics in OCaml
OCaml.org Newsletter: April 2024
Example of using LSP server in Emacs
Dune Developer Experience Feedback Form
DkML 2.1.1
A May update on wasm_of_ocaml
OCaml 5.2.0 released
Old CWN

Some code for Molecular Mechanics in OCaml
══════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/some-code-for-molecular-mechanics-in-ocaml-ann/14610/1>

UnixJunkie announced
────────────────────

Recently, I released a bunch of code for some Molecular Mechanics
calculations in OCaml.

This is pretty much at the beta stage for the moment.

<https://github.com/UnixJunkie/MMO>

Maybe in the future I will create a proper library to encapsulate the
Mol and Mol2 modules in there; they allow to perform some operations
on small molecules.

For those interested, there is a partial implementation of the
Universal Force Field (UFF) in there; only the part concerning
non-bonded interactions.

OCaml.org Newsletter: April 2024
════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ocaml-org-newsletter-april-2024/14611/1>

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

Welcome to the April 2024 edition of the OCaml.org newsletter! This
update has been compiled by the OCaml.org team. You can find [previous
updates] on Discuss.

Our goal is to make OCaml.org the best resource for anyone who wants
to get started and be productive in OCaml. The OCaml.org newsletter
provides an update on our progress towards that goal and an overview
of the changes we are working on.

We couldn't do it without all the amazing people who help us review,
revise, and create better OCaml documentation and work on issues. Your
participation enables us to so much more than we could just by
ourselves. Thank you!

This newsletter covers:
• *OCaml Cookbook:* We shipped a new, community-driven section in the
Learn area. Help us make it really useful by contributing and
reviewing recipes for common tasks!
• *Community & Marketing Pages Rework:* We have UI designs for the
reworked and new pages of the community section and are starting
work to implement these.
• *General Improvements:* As usual, we also worked on general
maintenance and improvements, so we're highlighting some of the
work that happened below.

[previous updates] <https://discuss.ocaml.org/tag/ocamlorg-newsletter>

Open Issues for Contributors
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

You can find [open issues for contributors here]!

Here's some new (and as of time of writing this newsletter still open)
issues that were opened this month:

• Package Versions page is missing dark mode styles
[ocaml/ocaml.org#2341] by [@sabine]
• (Data) Extend the Data Model of Academic Institution to Record
Information about Course Materials [ocaml/ocaml.org#2328] by
[@sabine]

[open issues for contributors here]
<https://github.com/ocaml/ocaml.org/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+no%3Aassignee>

[ocaml/ocaml.org#2341] <https://github.com/ocaml/ocaml.org/issues/2341>

[@sabine] <https://github.com/sabine>

[ocaml/ocaml.org#2328] <https://github.com/ocaml/ocaml.org/issues/2328>

The OCaml Cookbook
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

We shipped a new, community-driven section in the Learn area: the
OCaml Cookbook!

The OCaml Cookbook is a place where OCaml developers share how to
solve common tasks using packages from the ecosystem.

A task is something that needs to be done inside a project. A recipe
is a code sample and explanations on how to perform a task using a
combination of open source libraries.

The Cookbook now live at [ocaml.org/cookbook], but there are not a lot
of recipes published yet.

Here's how we need your help:

1. Help review [open pull requests for cookbook recipes]!
2. Contribute new recipes and tasks for the cookbook!
3. Suggest improvements to existing recipes and the UI.

*Relevant PRs and Activities:*
• Open PRs in need of reviewers:
• PR: Cookbook geodesic [ocaml/ocaml.org#2381] by [@F-Loyer]
• PR: Cookbook / subprocess creation [ocaml/ocaml.org#2382] by
[@F-Loyer]
• PR: Cookbook getenv [ocaml/ocaml.org#2383] by [@F-Loyer]
• PR: Cookbook : linalg [ocaml/ocaml.org#2386] by [@F-Loyer]
• PR: Use camlzip and with_open_text [ocaml/ocaml.org#2371] by
[@cuihtlauac]
• PR: Deserialise and post-process YAML recipes
[ocaml/ocaml.org#2372] by [@cuihtlauac]
• PR: Rebased database recipes [ocaml/ocaml.org#2376] by
[@cuihtlauac]
• PR: Rebased basic concurrency recipe [ocaml/ocaml.org#2377] by
[@cuihtlauac]
• PR: Rebased sorting recipe [ocaml/ocaml.org#2378] by [@cuihtlauac]
• PR: Rebased ascii and utf-8 recipes [ocaml/ocaml.org#2379] by
[@cuihtlauac]

[ocaml.org/cookbook] <https://ocaml.org/cookbook>

[open pull requests for cookbook recipes]
<https://github.com/ocaml/ocaml.org/pulls?q=is%3Apr+is%3Aopen+label%3ACookbook>

[ocaml/ocaml.org#2381] <https://github.com/ocaml/ocaml.org/pull/2381>

[@F-Loyer] <https://github.com/F-Loyer>

[ocaml/ocaml.org#2382] <https://github.com/ocaml/ocaml.org/pull/2382>

[ocaml/ocaml.org#2383] <https://github.com/ocaml/ocaml.org/pull/2383>

[ocaml/ocaml.org#2386] <https://github.com/ocaml/ocaml.org/pull/2386>

[ocaml/ocaml.org#2371] <https://github.com/ocaml/ocaml.org/pull/2371>

[@cuihtlauac] <https://github.com/cuihtlauac>

[ocaml/ocaml.org#2372] <https://github.com/ocaml/ocaml.org/pull/2372>

[ocaml/ocaml.org#2376] <https://github.com/ocaml/ocaml.org/pull/2376>

[ocaml/ocaml.org#2377] <https://github.com/ocaml/ocaml.org/pull/2377>

[ocaml/ocaml.org#2378] <https://github.com/ocaml/ocaml.org/pull/2378>

[ocaml/ocaml.org#2379] <https://github.com/ocaml/ocaml.org/pull/2379>

Community & Marketing Pages Rework
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

We have [UI designs for the reworked and new pages of the community
section] and are starting work to implement these. We are opening
small issues for contributors to help. :orange_heart:

*Relevant PRs and Activities:*
• PR: UI: Added DateTime of Event on the Client Side in the User's
Timezone [ocaml/ocaml.org#2339] by [@maha-sachin]
• PR: Create new Events page with routing under Community
[ocaml/ocaml.org#2338] by [@shakthimaan]
• PR: Add event_type field to Events, and render tag in Event cards
[ocaml/ocaml.org#2366] by [@csaltachin]

[UI designs for the reworked and new pages of the community section]
<https://www.figma.com/file/7hmoWkQP9PgLTfZCqiZMWa/OCaml-Community-Pages?type=design&node-id=637%3A4539&mode=design&t=RpQlGvOpeg1a93AZ-1>

[ocaml/ocaml.org#2339] <https://github.com/ocaml/ocaml.org/pull/2339>

[@maha-sachin] <https://github.com/maha-sachin>

[ocaml/ocaml.org#2338] <https://github.com/ocaml/ocaml.org/pull/2338>

[@shakthimaan] <https://github.com/shakthimaan>

[ocaml/ocaml.org#2366] <https://github.com/ocaml/ocaml.org/pull/2366>

[@csaltachin] <https://github.com/csaltachin>

General Improvements and Data Additions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Relevant PRs and Activities:*
• Bugfixes
• PR: fix: add .modules style for odoc-generated documentation pages
[ocaml/ocaml.org#2355] by [@sabine]
• PR: Fix: correct text color on community resource card
[ocaml/ocaml.org#2329] by [@sabine]
• PR: fix: Make Community card about LearnOCaml point to the correct
URL [ocaml/ocaml.org#2331] by [@yurug]
• Documentation
• PR: OCaml Tour: -New sections- Introduction and Before We
Begin. Added REPL definition and double semicolon use
[ocaml/ocaml.org#2336] by [@Alfredo-Carlon]
• PR: Minor line editing on "Values and Functions" Tutorial
[ocaml/ocaml.org#2321] by [@jeuxdeau]
• Data
• PR: [planet]: add melange blog [ocaml/ocaml.org#2362] by
[@anmonteiro]
• PR: (data) add april OUPS meetup [ocaml/ocaml.org#2360] by
[@sabine]
• PR: Add TUM as an academic institution [ocaml/ocaml.org#2347] by
[@PumPum7]
• PR: Add Routine job post. [ocaml/ocaml.org#2325] by [@mefyl]
• PR: (data) Add OCaml Workshop to Upcoming Events
[ocaml/ocaml.org#2326] by [@sabine]
• PR: (data) add ReasonSTHLM meetup [ocaml/ocaml.org#2308] by
[@sabine]
• PR: Add missing Mdx changelogs [ocaml/ocaml.org#2368] by
[@tmattio]
• PR: Fix small typo in Dune 3.14 announcement
[ocaml/ocaml.org#2315] by [@Leonidas-from-XIV]
• PR: Dune 3.15.0 announcement [ocaml/ocaml.org#2316] by
[@Leonidas-from-XIV]
• PR: OCaml 5.2.0-beta2 changelog entry [ocaml/ocaml.org#2343] by
[@Octachron]
• PR: (data) add March 2024 OCaml.org newsletter
[ocaml/ocaml.org#2317] by [@sabine]
• PR: Add the announement for opam 2.2.0~beta2
[ocaml/ocaml.org#2334] by [@kit-ty-kate]
• PR: jobs: remove XenServer positions [ocaml/ocaml.org#2387] by
[@edwintorok]
• Move of the OCaml Language Manual from v2.ocaml.org to ocaml.org
• PR: fix: Serve manual under /lts and /latest URLs
[ocaml/ocaml.org#2345] by [@sabine]
• PR: Remove /manual/lts URL, fix broken route for /manual/latest
[ocaml/ocaml.org#2348] by [@sabine]
• PR: Add /api/** redirection [ocaml/ocaml.org#2352] by [@mtelvers]
• PR: Handle lts, default and missing version in middleware
[ocaml/ocaml.org#2358] by [@cuihtlauac]
• PR: Add served pages to sitemap [ocaml/ocaml.org#2363] by
[@cuihtlauac]
• PR: Skip unreleased manuals from sitemap [ocaml/ocaml.org#2367] by
[@cuihtlauac]
• PR: Turn some v2 redirects into local [ocaml/ocaml.org#2356] by
[@cuihtlauac]
• Refactor / Code health
• PR: Remove Commit module from Global [ocaml/ocaml.org#2319] by
[@cuihtlauac] (created/merged: 2024-04-05T14:17:31Z)
• PR: chore: remove learn_sidebar.eml, which was not used anymore
[ocaml/ocaml.org#2342] by [@sabine]
• PR: Add link to deploy.ci.ocaml.org in HACKING
[ocaml/ocaml.org#2354] by [@cuihtlauac]
• PR: Use type annotation for data parameters [ocaml/ocaml.org#2384]
by [@cuihtlauac]

[ocaml/ocaml.org#2355] <https://github.com/ocaml/ocaml.org/pull/2355>

[@sabine] <https://github.com/sabine>

[ocaml/ocaml.org#2329] <https://github.com/ocaml/ocaml.org/pull/2329>

[ocaml/ocaml.org#2331] <https://github.com/ocaml/ocaml.org/pull/2331>

[@yurug] <https://github.com/yurug>

[ocaml/ocaml.org#2336] <https://github.com/ocaml/ocaml.org/pull/2336>

[@Alfredo-Carlon] <https://github.com/Alfredo-Carlon>

[ocaml/ocaml.org#2321] <https://github.com/ocaml/ocaml.org/pull/2321>

[@jeuxdeau] <https://github.com/jeuxdeau>

[ocaml/ocaml.org#2362] <https://github.com/ocaml/ocaml.org/pull/2362>

[@anmonteiro] <https://github.com/anmonteiro>

[ocaml/ocaml.org#2360] <https://github.com/ocaml/ocaml.org/pull/2360>

[ocaml/ocaml.org#2347] <https://github.com/ocaml/ocaml.org/pull/2347>

[@PumPum7] <https://github.com/PumPum7>

[ocaml/ocaml.org#2325] <https://github.com/ocaml/ocaml.org/pull/2325>

[@mefyl] <https://github.com/mefyl>

[ocaml/ocaml.org#2326] <https://github.com/ocaml/ocaml.org/pull/2326>

[ocaml/ocaml.org#2308] <https://github.com/ocaml/ocaml.org/pull/2308>

[ocaml/ocaml.org#2368] <https://github.com/ocaml/ocaml.org/pull/2368>

[@tmattio] <https://github.com/tmattio>

[ocaml/ocaml.org#2315] <https://github.com/ocaml/ocaml.org/pull/2315>

[@Leonidas-from-XIV] <https://github.com/Leonidas-from-XIV>

[ocaml/ocaml.org#2316] <https://github.com/ocaml/ocaml.org/pull/2316>

[ocaml/ocaml.org#2343] <https://github.com/ocaml/ocaml.org/pull/2343>

[@Octachron] <https://github.com/Octachron>

[ocaml/ocaml.org#2317] <https://github.com/ocaml/ocaml.org/pull/2317>

[ocaml/ocaml.org#2334] <https://github.com/ocaml/ocaml.org/pull/2334>

[@kit-ty-kate] <https://github.com/kit-ty-kate>

[ocaml/ocaml.org#2387] <https://github.com/ocaml/ocaml.org/pull/2387>

[@edwintorok] <https://github.com/edwintorok>

[ocaml/ocaml.org#2345] <https://github.com/ocaml/ocaml.org/pull/2345>

[ocaml/ocaml.org#2348] <https://github.com/ocaml/ocaml.org/pull/2348>

[ocaml/ocaml.org#2352] <https://github.com/ocaml/ocaml.org/pull/2352>

[@mtelvers] <https://github.com/mtelvers>

[ocaml/ocaml.org#2358] <https://github.com/ocaml/ocaml.org/pull/2358>

[@cuihtlauac] <https://github.com/cuihtlauac>

[ocaml/ocaml.org#2363] <https://github.com/ocaml/ocaml.org/pull/2363>

[ocaml/ocaml.org#2367] <https://github.com/ocaml/ocaml.org/pull/2367>

[ocaml/ocaml.org#2356] <https://github.com/ocaml/ocaml.org/pull/2356>

[ocaml/ocaml.org#2319] <https://github.com/ocaml/ocaml.org/pull/2319>

[ocaml/ocaml.org#2342] <https://github.com/ocaml/ocaml.org/pull/2342>

[ocaml/ocaml.org#2354] <https://github.com/ocaml/ocaml.org/pull/2354>

[ocaml/ocaml.org#2384] <https://github.com/ocaml/ocaml.org/pull/2384>

Example of using LSP server in Emacs
════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/example-of-using-lsp-server-in-emacs/14601/4>

Tim McGilchrist announced
─────────────────────────

I wrote a blog post about my setup
<https://lambdafoo.com/posts/2022-09-07-ocaml-with-emacs-2022.html>
The only change I've made is to use `envrc-mode' rather than
`direnv-mode'.

Dune Developer Experience Feedback Form
═══════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/dune-developer-experience-feedback-form/14617/1>

ostera announced
────────────────

The Dune team at [Tarides] is looking to get inputs from all of you to
improve the Dune DX (developer experience), so we've opened a [small,
anonymous, unstructured feedback form] to hear your ideas on how Dune
could be improved :camel:

We're looking forward to your ideas! :sparkles:

[Tarides] <https://tarides.com>

[small, anonymous, unstructured feedback form]
<https://forms.gle/izg5xSt1XNp3i4Rc8>

DkML 2.1.1
══════════

Archive: <https://discuss.ocaml.org/t/ann-dkml-2-1-1/14620/1>

jbeckford announced
───────────────────

Use [https://ocaml.org/install] if you are a first-time user (the
install steps haven't changed).

The upgrade steps and release notes are available at
<https://gitlab.com/dkml/distributions/dkml/-/releases/2.1.1>. For
those who are on 2.1.0, the upgrade is the following in PowerShell:

┌────
│ 1..6 | % { @("bash","sh","with-dkml","ocamllsp","git","opam","dune","ocamlrun") | % { taskkill /F /IM "$_.exe" }; Start-Sleep 1 }
│ winget upgrade dkml
└────

[https://ocaml.org/install] <https://ocaml.org/install>

Major Changes
╌╌╌╌╌╌╌╌╌╌╌╌╌

• The opam repository is fixed to [commit
6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd] for stability. If you need
a new version of a package and can't wait for the next version of
DkML, you can pin that package's url (recommended) or float the opam
repository with `opam repository set-url default
git+https://github.com/ocaml/opam-repository.git#main'.
• Windows SDK 10.0.22621.0 and VC 17.8 (14.38) added to allowed
list. This supports Visual Studio 2022, especially for GitLab CI.
• New supported package: `tiny_httpd'

[commit 6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd]
<https://github.com/ocaml/opam-repository/tree/6c3f73f42890cc19f81eb1dec8023c2cd7b8b5cd>

Patches
╌╌╌╌╌╌╌

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Package What Issue
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
`base_bigstring.v16.0' Implement `memmem' for Windows <https://github.com/janestreet/base_bigstring/issues/6>
`core_kernel.v0.16.0' MSVC fix didn't make it to 0.16.0 <https://github.com/janestreet/core_kernel/pull/107>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Upgraded Packages
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Package From To
─────────────────────────────────────────────────────────────────────────
dune (et al) 3.12.1 3.15.0
ocaml 4.14.0 4.14.2
ocamlformat (et al) 0.25.1 0.26.1
odoc 2.2.0 2.4.1
odoc-parser 2.0.0 2.4.1
lsp (et al) 1.16.2 1.17.0
mdx 2.3.0 2.4.1
ctypes (et al) 0.19.2-windowssupport-r7 0.19.2-windowssupport-r8
tiny_httpd 0.16
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Thanks to OCaml Software Foundation for sponsoring DkML!

A May update on wasm_of_ocaml
═════════════════════════════

Archive:
<https://discuss.ocaml.org/t/a-may-update-on-wasm-of-ocaml/14635/1>

Jan Midtgaard announced
───────────────────────

Spring is over us and several months have passed since we last shared
[an update on WebAssembly compilation].

[an update on WebAssembly compilation]
<https://discuss.ocaml.org/t/a-december-update-from-the-ocaml-wasm-organisation/13565>

Introduction
╌╌╌╌╌╌╌╌╌╌╌╌

[`wasm_of_ocaml'] is a compiler from OCaml bytecode to [WebAssembly],
similar to [`js_of_ocaml'] from which it was forked. `wasm_of_ocaml'
offers a functional, almost drop-in replacement for `js_of_ocaml' -
with better performance.

For now, the compiler targets a JavaScript-hosted WebAssembly
engine. The produced code furthermore requires the following [Wasm
extensions] to run:
• [the GC extension], including functional references and 31-bit
integers
• [the tail-call extension]
• [the exception handling extension]

[`wasm_of_ocaml'] <https://github.com/ocaml-wasm/wasm_of_ocaml>

[WebAssembly] <https://webassembly.org/>

[`js_of_ocaml'] <https://github.com/ocsigen/js_of_ocaml>

[Wasm extensions] <https://webassembly.org/roadmap/>

[the GC extension] <https://github.com/WebAssembly/gc>

[the tail-call extension]
<https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md>

[the exception handling extension]
<https://github.com/WebAssembly/exception-handling/blob/master/proposals/exception-handling/Exceptions.md>

Platform support
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

• [Node 22 now supports the WasmGC extension], meaning that it can run
`wasm_of_ocaml' output out of the box!
• CloudFlare uses [V8 12.0 since Dec 4, 2023]. [This corresponds to
Chrome 120], and thus includes the WasmGC extension, effectively
enabling OCaml development on CloudFlare! For more details see the
[WebAssembly CloudFlare docs]
• [The upcoming 0.14.0 release] of [the WasmEdge WebAssembly engine]
adds WasmGC support too. Along with the [just merged exception
support], this paves the way for running `wasm_of_ocaml' output…

[Node 22 now supports the WasmGC extension]
<https://nodejs.org/en/blog/announcements/v22-release-announce>

[V8 12.0 since Dec 4, 2023]
<https://developers.cloudflare.com/workers/platform/changelog/#2023-12-04>

[This corresponds to Chrome 120] <https://v8.dev/docs/version-numbers>

[WebAssembly CloudFlare docs]
<https://developers.cloudflare.com/workers/runtime-apis/webassembly/>

[The upcoming 0.14.0 release]
<https://github.com/WasmEdge/WasmEdge/releases/tag/0.14.0-rc.4>

[the WasmEdge WebAssembly engine] <https://github.com/WasmEdge/WasmEdge>

[just merged exception support]
<https://github.com/WasmEdge/WasmEdge/pull/3306>

`wasm_of_ocaml' news
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

Since the last update in December
• Jérôme gave a talk about `wasm_of_ocaml' at the INRIA Cambium
seminar - [slides available here]
• Olivier Nicole joined the `wasm_of_ocaml' effort
• Jérôme and Olivier visited Jane Street to help them adopt
`wasm_of_ocaml'

Notable features
• Sourcemap support was added [ocaml-wasm/wasm_of_ocaml#27]
• This required adding sourcemap support to the `wasm-metadce' and
`wasm-merge' binaryen tools [WebAssembly/binaryen#6372]
• A first implementation of separate compilation was completed
[ocaml-wasm/wasm_of_ocaml#36]
• One can compile cmo and cma files, producing intermediate archive
files
• Then the files can be linked together: relevant Wasm modules are
put in a directory, and JavaScript code is generated to load them
and link them together
• Store long-lived toplevel values into globals
[ocaml-wasm/wasm_of_ocaml#30]
• The initialization code produced by `wasm_of_ocaml' can be large
and contain a large number of variables. This is challenging to
both binaryen tools and the Wasm engines. The problem can be
alleviated by storing long-lived toplevel values into global
variables. As an side benefit, many closures can be statically
allocated (since their free variables are now stored in globals),
which again can provide performance improvements in the remaining
parts of the code.
• Tuple syntax changes [ocaml-wasm/wasm_of_ocaml#31]
• Prepared the switch to the new version of binaryen, which has
small syntax changes
• Use the JS String Builtins proposal for string conversions when
available [ocaml-wasm/wasm_of_ocaml#33]
• Improve the WAT (Wasm text format) output to be more readable
[ocaml-wasm/wasm_of_ocaml#34]
• Name local variables (they were just numbered) and use shorter
names (the names used to be systematically suffixed to ensure they
were unique).

Other features and fixes
• Fixed file descriptor management so that it works with large file
descriptors [ocaml-wasm/wasm_of_ocaml#18]
• PR: Update Firefox version information in README (no longer beta)
[ocaml-wasm/wasm_of_ocaml#19]
• PR: Fix pin branch in installation instructions
[ocaml-wasm/wasm_of_ocaml#20]
• PR: Add `Stdlib.String.fold_{left,right}' to build on OCaml < 4.13
[ocaml-wasm/wasm_of_ocaml#21]
• PR translating stubs of `integers_js_stubs' to Wasm
[o1-labs/integers_stubs_js#10]
• Tracked a bug in a test on the repo [o1-labs/integers_stubs_js#9]
• PR: Generate valid Wasm code [ocaml-wasm/wasm_of_ocaml#22]
• PR: Avoid using `eval' for statically known strings
[ocaml-wasm/wasm_of_ocaml#24]
• PR: Have physical equality inspect Javascript objects
[ocaml-wasm/wasm_of_ocaml#25]
• PR: Tune optimization profiles [ocaml-wasm/wasm_of_ocaml#26]
• PR: Correction and precision about Binaryen version
[ocaml-wasm/wasm_of_ocaml#29]

Binaryen fixes
• PR: wasm-merge: check that the types of imports and exports
match. [WebAssembly/binaryen#6437]
• Improved binaryen's linker to check that the types of imports and
exports match. Found a type mismatch in the wasm_of_ocaml runtime
this way.
• PR: Fixes regarding explicit names [WebAssembly/binaryen#6466]
• The name of some module components were lost during module linking
• PR: Fix writing of data segment names in name section
[WebAssembly/binaryen#6462]
• Binaryen could actually generate a malformed name section

[slides available here]
<https://cambium.inria.fr/seminaires/transparents/20231213.Jerome.Vouillon.pdf>

[ocaml-wasm/wasm_of_ocaml#27]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/27>

[WebAssembly/binaryen#6372]
<https://github.com/WebAssembly/binaryen/pull/6372>

[ocaml-wasm/wasm_of_ocaml#36]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/36>

[ocaml-wasm/wasm_of_ocaml#30]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/30>

[ocaml-wasm/wasm_of_ocaml#31]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/31>

[ocaml-wasm/wasm_of_ocaml#33]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/33>

[ocaml-wasm/wasm_of_ocaml#34]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/34>

[ocaml-wasm/wasm_of_ocaml#18]
<https://github.com/ocaml-wasm/wasm_of_ocaml/issues/18>

[ocaml-wasm/wasm_of_ocaml#19]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/19>

[ocaml-wasm/wasm_of_ocaml#20]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/20>

[ocaml-wasm/wasm_of_ocaml#21]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/21>

[o1-labs/integers_stubs_js#10]
<https://github.com/o1-labs/integers_stubs_js/pull/10>

[o1-labs/integers_stubs_js#9]
<https://github.com/o1-labs/integers_stubs_js/issues/9>

[ocaml-wasm/wasm_of_ocaml#22]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/22>

[ocaml-wasm/wasm_of_ocaml#24]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/24>

[ocaml-wasm/wasm_of_ocaml#25]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/25>

[ocaml-wasm/wasm_of_ocaml#26]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/26>

[ocaml-wasm/wasm_of_ocaml#29]
<https://github.com/ocaml-wasm/wasm_of_ocaml/pull/29>

[WebAssembly/binaryen#6437]
<https://github.com/WebAssembly/binaryen/pull/6437>

[WebAssembly/binaryen#6466]
<https://github.com/WebAssembly/binaryen/pull/6466>

[WebAssembly/binaryen#6462]
<https://github.com/WebAssembly/binaryen/pull/6462>

OCaml 5.2.0 released
════════════════════

Archive: <https://discuss.ocaml.org/t/ocaml-5-2-0-released/14638/1>

octachron announced
───────────────────

The OCaml team has the pleasure of celebrating the birthday of Inge
Lehmann by announcing the release of OCaml version 5.2.0.

Some of the highlights in OCaml 5.2.0 are:
• Re-introduced GC compaction
GC compaction can now be manually triggered by calling `Gc.compact
()' manually. This is expected to be particularly useful for
programs that wish to release memory to the operating system after a
temporary memory-intensive phase.

• Restored native backend for POWER 64 bits
With this restored backend, all 64 bits architecture supported in
OCaml 4 are supported bin OCaml 5

• Thread sanitizer support
Thread sanitizer is a dynamic data race detector which instrument
memory accesses to detect and explain data races at execution
time. Since the instrumentation is costly (with a 2x to 7x
slowdown), it must be enabled with the `ocaml-option-tsan'
configuration flag. (The reference manual contains more information
on how to use TSAN.)

• New Dynarray module
This new standard library module provides a standard implementation
for resizeable array, which is guaranteed to be memory safe even in
presence of data races.

• New -H flag for hidden include directories
This new flag makes it possible for build tools to split cleanly
dependencies between direct (the dependencies explicitly added by
the project) and indirect dependencies (the dependencies introduced
by the direct dependencies) without the quirks of previous
implementations.

• Project-wide occurence metadata support for developer tools
When compiling a module with the `-bin-annot' and
`-bin-annot-occurrences' flags, the compiler stores in the `.cmt'
file an index of all occurences of values, types, modules, …

• Raw identifiers
To improve OCaml upward-compatibility, there is a new syntax for
lowercase identifiers, `let \#if = 0', which works even if the
identifier is a keyword in some OCaml versions. This change has been
adopted in OCaml 5.2 in preparation of the introduction of the
`effect' keyword in OCaml 5.3

• Local open in type expressions
Local open are now allowed in type expression: `val (+): Int64.(t ->
t -> t)'.

And a lot of incremental changes:

• Around 20 new functions in the standard library besides the new
Dynarray module (in the `Array', `Float', `Format', `Fun',
`In_channel', `Out_channel', and `Random' modules )
• Many fixes and improvements in the runtime
• Many bug fixes

OCaml 5.2.0 is still a somewhat experimental release compared to the
OCaml 4.14 branch. In particular

• The Windows MSVC port is still unavailable.
• Ephemeron performances need to be investigated.
• `statmemprof' is being tested in the developer branch of OCaml.
• There are a number of known runtime concurrency or GC performance
bugs (that trigger under rare circumstances).

Since the Windows MSVC port and statmemprof are still missing, the
maintenance support for OCaml 4.14 will be extended until at least the
end of the year.

Please report any unexpected behaviours on the [OCaml issue tracker]
and post any questions or comments you might have here on discuss.

The full list of changes can be found in the changelog below.

[OCaml issue tracker] <https://github.com/ocaml/ocaml/issues>

Installation Instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

The base compiler can be installed as an opam switch with the
following commands:

┌────
│ opam update
│ opam switch create 5.2.0
└────

The source code for the release candidate is also directly available
on:

• [GitHub]
• [OCaml archives at Inria]

[GitHub] <https://github.com/ocaml/ocaml/archive/5.2.0.tar.gz>

[OCaml archives at Inria]
<https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0.tar.gz>

Fine-Tuned Compiler Configuration
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

If you want to tweak the configuration of the compiler, you can switch
to the option variant with:

┌────
│ opam update
│ opam switch create <switch_name> ocaml-variants.5.1.0+options <option_list>
└────

where `<option_list>' is a space separated list of `ocaml-option-*'
packages. For instance, for a `flambda' and `no-flat-float-array'
switch:

┌────
│ opam switch create 5.2.0+flambda+nffa ocaml-variants.5.2.0+options ocaml-option-flambda ocaml-option-no-flat-float-array
└────

OCaml 5.2.0 Changelog (13 May 2024)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

(Changelog elided to reduce message size. Please follow the archive link
above.)

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:alan.schmitt@polytechnique.org>

[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/>

[-- Attachment #2: Type: text/html, Size: 46495 bytes --]