[cwn] Attn: Development Editor, Latest OCaml Weekly News
Alan Schmitt
alan.schmitt at polytechnique.org
Tue Jun 20 02:52:16 PDT 2023
Hello
Here is the latest OCaml Weekly News, for the week of June 13 to 20,
2023.
Table of Contents
─────────────────
Packaging an executable for homebrew install for non-OCaml users
v0.16 release of Jane Street packages
New release of Menhir (20230608)
Dream-html - DSL to build HTML, integrated with Dream
release of minisat 0.5
Which filters would you like to see on the OCaml blog at OCaml.org?
OCaml Platform Newsletter, May 2023
Congratulation to the OCaml team for the 2023 SIGPLAN programming languages software award! 🏆
Other OCaml News
Old CWN
Packaging an executable for homebrew install for non-OCaml users
════════════════════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/packaging-an-executable-for-homebrew-install-for-non-ocaml-users/12388/1>
James Geddes asked
──────────────────
Would anyone have an example I could look at of a homebrew “formula”
for an OCaml program? I’m looking to distribute an executable to
colleagues who are not OCaml users.
(There seem to be lots of moving parts and I’m not sure which one has
stopped moving!).
Many thanks.
Roland Csaszar replied
──────────────────────
All official Homebrew formulas are located in this GitHub repo:
<https://github.com/Homebrew/homebrew-core/tree/master/Formula>
The interesting part is `install'.
Examples using `make':
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Dune:
<https://github.com/Homebrew/homebrew-core/blob/eee23c0176f12814a5597e14f34d57d596c82e88/Formula/dune.rb>
Opam:
<https://github.com/Homebrew/homebrew-core/blob/eee23c0176f12814a5597e14f34d57d596c82e88/Formula/opam.rb>
Examples using `dune':
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Coq:
<https://github.com/Homebrew/homebrew-core/blob/49b63bb867b5d966331f81b4b73929b295be33c1/Formula/coq.rb>
Menhir:
<https://github.com/Homebrew/homebrew-core/blob/49b63bb867b5d966331f81b4b73929b295be33c1/Formula/menhir.rb>
Examples using Opam and something else:
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Semgrep (Opam & Python):
<https://github.com/Homebrew/homebrew-core/blob/49b63bb867b5d966331f81b4b73929b295be33c1/Formula/semgrep.rb>
Reference
╌╌╌╌╌╌╌╌╌
Homebrew’s Formula reference: <https://docs.brew.sh/Formula-Cookbook>
v0.16 release of Jane Street packages
═════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-v0-16-release-of-jane-street-packages/12398/1>
Diana Kalinichenko announced
────────────────────────────
Dear OCaml developers,
We are pleased to announce the v0.16 release of Jane Street packages!
This release comes with 34 new packages and a plethora of new
features, fixes, and enhancements.
The remainder of this post highlights the main changes since the v0.15
release.
Release-wide changes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
◊ Switch to OCaml 4.14
We are switching Base and all our packages, except sexplib0, to OCaml
4.14 and above.
Previously, Base supported the four latest OCaml versions. The prime
reason for it was to ensure that a single ppxlib release would work
across multiple compilers. However, ppxlib now depends solely on
sexplib0, not Base.
Meanwhile, we are making a considerable effort to integrate the latest
OCaml features. We’ve already added features like the `In_channel'
module from the 4.14 standard library to Base, and we’re working on
switching to the 5.0 compiler internally.
As a result, we decided to remove the strict requirement for Base’s
backward compatibility. Instead, we hope to provide a more
comprehensive Stdlib replacement and better testing for recent
compiler versions. We plan to eventually add support for OCaml 5
primitives in Base, starting with releases v0.17 or v0.18.
◊ 32-bit platform support
As stated [previously], we are no longer testing on 32-bit platforms.
That said, we expect that our packages will mostly continue to
function on 32-bit, and we strive to maintain compatibility. In
particular, we will keep responding to bug reports and accepting
32-bit compatibility patches. We’re also hoping that Tarides’ work in
this area will improve the testing of our packages across many
platforms, including 32-bit bytecode.
[previously]
<https://discuss.ocaml.org/t/jane-street-packages-dropping-support-for-32-bit/8621>
◊ Deprecation of `Caml' in favor of `Stdlib'
We are deprecating our `Caml' alias for the OCaml standard library, in
favor of using the default module, `Stdlib'. This allows writing code
that references the standard library regardless of whether Base is
opened or not.
◊ Local allocations
We’ve included annotations for local allocations in our public release
code; however, these annotations are not recognized by the stock OCaml
compiler. More information on local allocations can be found in our
blog post at <https://blog.janestreet.com/oxidizing-ocaml-locality/>.
For those interested in experimenting with local allocations, our
OCaml fork with local allocation support can be found [here]. Please
be aware that this is highly experimental and not guaranteed to
function outside of Jane Street.
[here] <https://github.com/ocaml-flambda/ocaml-jst>
Future plans
╌╌╌╌╌╌╌╌╌╌╌╌
◊ Shadowing `Stdlib'
We plan to stop shadowing Stdlib in Base. We also plan to add a flag
to Dune to enable `-nopervasives' during compilation, which prevents
`Stdlib' from being opened automatically. The previous practice of
shadowing Stdlib in Base has caused issues, and we hope this new
approach will prove more resilient.
◊ OCaml extensions
We intend to create an experimental Opam repository with our internal
compiler for a more straightforward setup. This will allow users to
experiment with our new language extensions before they are integrated
into mainstream OCaml.
At present, we convert our native syntax for OCaml extensions into
annotations. However, once we transition to the experimental repo, we
will release the unmodified code featuring the preferred `local_'
syntax.
Many, many other changes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Since our last release, we have focused on delivering improved
changelogs for our users, and we plan to maintain these efforts moving
forward. Most of our libraries now include changelog files that
outline changes since the v0.15 release. Browse [our GitHub
repositories] and access the respective `CHANGES.md' files for more
information.
For examples, see changelogs for [Base], [Async_kernel], and [VCaml].
[our GitHub repositories] <https://github.com/janestreet>
[Base] <https://github.com/janestreet/base/blob/master/CHANGES.md>
[Async_kernel]
<https://github.com/janestreet/async_kernel/blob/master/CHANGES.md>
[VCaml] <https://github.com/janestreet/vcaml/blob/master/CHANGES.md>
New packages
╌╌╌╌╌╌╌╌╌╌╌╌
[base_trie] – trie data structure library for Base.
[bidirectional_map] – a library for bidirectional maps and multimaps.
[content_security_policy] – a library for building content-security
policies for the Web.
[cpuid] – a library for parsing CPU capabilities from the `cpuid'
instruction.
[csv] – tools for working with CSVs on the command line
[dedent] – a library for improving the readability of multi-line
string constants in code.
[diffable] – an interface for diffable data structures.
[env_config] – a helper library for retrieving configuration from an
environment variable.
[hardcaml_axi] – Hardcaml AXI interface types.
[hardcaml_c] – Hardcaml C simulation backend.
[hardcaml_handshake] – Hardcaml handshake component.
[indentation_buffer] – a library for building strings with
indentation.
[jane_rope] – string representation with cheap concatenation.
[js_of_ocaml_patches] – additions to js_of_ocaml’s standard library
that are required by Jane Street libraries.
[lru_cache] – an LRU Cache implementation for Core.
[man_in_the_middle_debugger] – a man-in-the-middle debugging library
for Async readers and writers.
[n_ary] – a library for N-ary datatypes and operations, generalizing
enumerations, variants, tuples, and lists.
[numeric_string] – a comparison function that sorts numeric fragments
of strings according to their numeric value.
[of_json] – a friendly applicative interface for Jsonaf.
[ordinal_abbreviation] – a minimal library for generating ordinal
names of integers.
[polling_state_rpc] – an RPC which tracks the state on the client and
server so it only needs to send diffs across the wire.
[ppx_demo] – a PPX that exposes the source code string of an
expression/module structure.
[ppx_derive_at_runtime] – defining a new PPX deriver by naming a
runtime module.
[ppx_globalize] – a PPX rewriter that generates functions to copy
local values to the global heap.
[ppx_sexp_conv] – generation of S-expression conversion functions from
type definitions.
[ppx_stable_witness] – a PPX extension for deriving a witness that a
type is intended to be stable.
[ppx_tydi] – let expressions inferring pattern type from expression.
[regex_parser_intf] – interface shared by `Re_parser' and `Re2.Parser'
[re_parser] – typed parsing using regular expressions.
[semantic_version] – semantic versioning data structure.
[stored_reversed] – a library for representing a list temporarily
stored in reverse order.
[streamable] – a collection of types suitable for incremental
serialization.
[tilde_f] – provides a let-syntax for continuation-passing style.
[torch] – we are taking over the development of ocaml-torch from
Laurent Mazare. Many thanks to him for his original work!
[base_trie] <https://github.com/janestreet/base_trie>
[bidirectional_map] <https://github.com/janestreet/bidirectional_map>
[content_security_policy]
<https://github.com/janestreet/content_security_policy>
[cpuid] <https://github.com/janestreet/cpuid>
[csv] <https://github.com/janestreet/janestreet_csv>
[dedent] <https://github.com/janestreet/dedent>
[diffable] <https://github.com/janestreet/diffable>
[env_config] <https://github.com/janestreet/env_config>
[hardcaml_axi] <https://github.com/janestreet/hardcaml_axi>
[hardcaml_c] <https://github.com/janestreet/hardcaml_c>
[hardcaml_handshake] <https://github.com/janestreet/hardcaml_handshake>
[indentation_buffer] <https://github.com/janestreet/indentation_buffer>
[jane_rope] <https://github.com/janestreet/jane_rope>
[js_of_ocaml_patches]
<https://github.com/janestreet/js_of_ocaml_patches>
[lru_cache] <https://github.com/janestreet/lru_cache>
[man_in_the_middle_debugger]
<https://github.com/janestreet/man_in_the_middle_debugger>
[n_ary] <https://github.com/janestreet/n_ary>
[numeric_string] <https://github.com/janestreet/numeric_string>
[of_json] <https://github.com/janestreet/of_json>
[ordinal_abbreviation]
<https://github.com/janestreet/ordinal_abbreviation>
[polling_state_rpc] <https://github.com/janestreet/polling_state_rpc>
[ppx_demo] <https://github.com/janestreet/ppx_demo>
[ppx_derive_at_runtime]
<https://github.com/janestreet/ppx_derive_at_runtime>
[ppx_globalize] <https://github.com/janestreet/ppx_globalize>
[ppx_sexp_conv] <https://github.com/janestreet/ppx_sexp_conv>
[ppx_stable_witness] <https://github.com/janestreet/ppx_stable_witness>
[ppx_tydi] <https://github.com/janestreet/ppx_tydi>
[regex_parser_intf] <https://github.com/janestreet/regex_parser_intf>
[re_parser] <https://github.com/janestreet/re_parser>
[semantic_version] <https://github.com/janestreet/semantic_version>
[stored_reversed] <https://github.com/janestreet/stored_reversed>
[streamable] <https://github.com/janestreet/streamable>
[tilde_f] <https://github.com/janestreet/tilde_f>
[torch] <https://github.com/janestreet/torch>
New release of Menhir (20230608)
════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-new-release-of-menhir-20230608/12399/1>
François Pottier announced
──────────────────────────
Dear users of Menhir,
I am happy to announce a new release of Menhir, with several minor
changes and bug fixes, listed below.
┌────
│ opam update
│ opam upgrade menhir
└────
Happy parsing, François Pottier francois.pottier at inria.fr
<http://cambium.inria.fr/~fpottier/>
2023/06/08
╌╌╌╌╌╌╌╌╌╌
• The new command line switch `--dump-menhirLib <directory>' causes
the source files `menhirLib.ml' and `menhirLib.mli' to be created in
the designated directory. This command can be useful to users with
special needs who wish to use `menhirLib' but do not want to rely on
it being installed somewhere in the file system. (Contributed by
Nicolás Ojeda Bär.)
• Changes in the public API of the library `MenhirSdk'. (Contributed
by Frédéric Bour.)
⁃ The function `Lr1.reductions', whose type is `t -> (terminal *
production list) list', is still present but is now deprecated.
The function `Lr1.get_reductions', whose type is `t -> (terminal *
production) list', should be used instead. The library offers a
view of the automaton after conflict resolution, so, for each
token, at most one production can be reduced.
⁃ The function `Lr1.default_reduction : Lr1.t -> production option'
appears. This function indicates which states have a default
reduction.
⁃ The function `Cmly_read.read_channel' appears.
⁃ The module `Cmly_read.Lift' appears.
• The new experimental flag `--specialize-token' causes the code
back-end to perform code specialization so as to guarantee that each
token is examined exactly once (thus never more than once) by the
parser. This causes an increase in code size and does not (yet)
allow a performance increase. This feature is independent of the
choice between `-O 0', `-O 1' and `-O 2'. It may disappear in the
future.
• Inconsistent type definitions used to be produced when
`--only-tokens' and `--inspection' were passed on the command line.
The type `terminal' was defined at the toplevel, whereas it should
always be defined inside the submodule `MenhirInterpreter'.
(Reported and fixed by Frédéric Bour.)
• Malformed code and type definitions used to be produced when
`--external-tokens' and `--inspection' were passed on the command
line. Fixed. (Reported by Maxime Dénès.)
• Enable OCaml warning 39 (unused rec flag) in the OCaml code produced
by Menhir’s code back-end. Menhir now carefully emits `let' instead
of `let rec' when a function is not recursive.
Dream-html - DSL to build HTML, integrated with Dream
═════════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-dream-html-dsl-to-build-html-integrated-with-dream/12032/3>
Continuing this thread, Yawar Amin announced
────────────────────────────────────────────
Just an update that this is now in opam repository:
<https://ocaml.org/p/dream-html/latest>
Repo: <https://github.com/yawaramin/dream-html>
Docs:
<https://yawaramin.github.io/dream-html/dream-html/Dream_html/index.html>
release of minisat 0.5
══════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-release-of-minisat-0-5/12336/6>
Simon Cruanes announced
───────────────────────
It didn’t take long, but here’s [minisat 0.6] which actually switches
to the C++ minisat from the C minisat that was used so far. That means
new functions such as `unsat_core' are now available!
[minisat 0.6] <https://github.com/ocaml/opam-repository/pull/23922>
Which filters would you like to see on the OCaml blog at OCaml.org?
═══════════════════════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/which-filters-would-you-like-to-see-on-the-ocaml-blog-at-ocaml-org/12429/1>
Zineb Jambin announced
──────────────────────
Dear OCaml users,
I am currently working with the OCaml.org maintainers on improving the
blog section of the OCaml.org website. Specifically, I am adding
filters that enable you to quickly find relevant articles from the
OCaml community.
To make this feature truly useful, it is essential that we add
relevant and useful tags to the blog posts. I would like to hear your
feedback on which specific tags you would like to see.
Your opinion is very important to us. Here are some ideas for possible
tags/filters:
• By authors
• Industry vs Personal blog / kind of blog source
• relating to libraries and packages
…
Feel free to add your own tag suggestions or comment on those that
have already been proposed. Which filters are most important to you?
Your feedback will help us improve the search experience and make
ocaml.org more user-friendly for everyone.
Thank you in advance for your participation and contribution!
OCaml Platform Newsletter, May 2023
═══════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ocaml-platform-newsletter-may-2023/12431/1>
Thibaut Mattio announced
────────────────────────
Welcome to the second issue of the OCaml Platform newsletter!
We’re excited to share the work we’ve done in May on improving OCaml
developer experience with the [OCaml Platform]. Similar to the
[previous update], this issue is structured around the development
workflow we’re currently exploring or improving.
The highlight of this month is the publication of the
[work-in-progress roadmap for the OCaml Platform]. We published it to
start gathering community feedback on the Design Principles and
Persona of the Platform. The feedback will be used to establish our
plans for the next three years. We’ve received tons of very insightful
and constructive feedback already, and in the coming weeks and months,
we’ll revise the roadmap based on that feedback. As a next step, we’ll
share the first version of the proposed developer workflows.
Another important milestone this month is the release of [Dune 3.8].
The release comes with support for compiling OCaml projects to
JavaScript using Melange, which has seen its [first stable release]
this month! It also contains several important features and
improvements that have been in the work for some time, like the new
`concurrent' action and the composition of Coq rules.
As a last highlight, the first alpha of opam 2.2 is getting very
close. There were some unexpected issues while preparing the release
this month, but the opam team is still aiming for a release in June.
There’s a lot of other very exciting work to talk about, so let’s
delve into it!
• Building Packages
• *Dune* Exploring Package Management in Dune
• *opam* Native Support for Windows in opam 2.2
• *Dune* Improving Dune’s Documentation
• *Dune* Composing installed Coq theories
• *Dune* Running Actions Concurrently
• *Dune* Benchmarking Dune on Large Code Bases
• Compiling to JavaScript
• *Dune* Compile to JavaScript with Melange in Dune
• Generating Documentation
• *Odoc* Add Search Capabilities to `odoc'
• *Odoc* Support for Tables in `odoc'
• Editing and Refactoring Code
• Merlin* Support for Project-Wide References in Merlin
• Merlin* Improving Merlin’s Performance
• OCaml LSP* Using Dune RPC on Windows
• OCaml LSP* Upstreaming OCaml LSP’s Fork of Merlin
• Formatting Code
• *OCamlFormat* Closing the Gap Between OCamlFormat and `ocp-indent'
[OCaml Platform] <https://ocaml.org/docs/platform>
[previous update]
<https://discuss.ocaml.org/t/ocaml-platform-newsletter-april-2023/12187>
[work-in-progress roadmap for the OCaml Platform]
<https://discuss.ocaml.org/t/a-roadmap-for-the-ocaml-platform-seeking-your-feedback/12238>
[Dune 3.8] <https://github.com/ocaml/dune/releases/tag/3.8.0>
[first stable release]
<https://discuss.ocaml.org/t/ann-melange-1-0-compile-ocaml-reasonml-to-javascript/12305>
Releases
╌╌╌╌╌╌╌╌
Here are the new versions of Platform tools we released in April. Have
a look at the [OCaml Changelog] to read announcements and feature
highlights!
• [Dune 3.8.0]
• [opam 2.1.5]
• [Merlin 4.9]
[OCaml Changelog] <https://ocaml.org/changelog>
[Dune 3.8.0] <https://github.com/ocaml/dune/releases/tag/3.8.0>
[opam 2.1.5] <https://github.com/ocaml/opam/releases/tag/2.1.5>
[Merlin 4.9] <https://github.com/ocaml/merlin/releases/tag/v4.9-500>
Building Packages
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
◊ *Dune* Exploring Package Management in Dune
Contributors: @rgrinberg (Tarides), @Leonidas-from-XIV (Tarides),
@gridbugs (Tarides), @kit-ty-kate (Tarides)
Explorations continue on adding package management support to Dune.
This month progress has been made on several fronts:
• The work on the solver has been started, including vendoring the
opam-0install solver for solving dependencies when generating Dune
lockfiles. A work-in-progress implementation of lockfile generation
is available on the `main' branch.
• The source tree handling has undergone a refactor to eventually
allow multiple context-specific lockfiles.
• The source fetching implementation has seen improvements, including
checksum handling and a better Fetch API. This results in a cleaner
interface for building opam packages.
• Work continues on prototyping the building of opam packages, which
includes the addition of new `Patch' and `Substitute' actions. This
has increased the subset of opam packages that can now be built.
*Activities:*
• Merged the PR that added the ability to build opam packages –
[ocaml/dune#7626].
• Added safety mechanisms in lock directory regeneration –
[ocaml/dune#7832].
• Introduced feature to set environment in build rules –
[ocaml/dune#7742].
• Merge the PR that added conservative lockfile generation –
[ocaml/dune#7732].
• Simplified entries in cookie – [ocaml/dune#7701].
• Fixed location handling for source copies – [ocaml/dune#7697].
• Improved checksum handling – [ocaml/dune#7696].
• Tested install action – [ocaml/dune#7695].
• Versioned lock directory format – [ocaml/dune#7693].
• Created a better API for fetch – [ocaml/dune#7675].
• Vendored opam-0install – [ocaml/dune#7668].
• Open a PR adding a feature to return the retrieved checksums on
failure for checksum verification – [ocaml/dune#5552].
• Carried out a refactor to allow passing in a custom runner to
`OpamStd.Sys' – [ocaml/dune#5549].
[ocaml/dune#7626] <https://github.com/ocaml/dune/pull/7626>
[ocaml/dune#7832] <https://github.com/ocaml/dune/pull/7832>
[ocaml/dune#7742] <https://github.com/ocaml/dune/pull/7742>
[ocaml/dune#7732] <https://github.com/ocaml/dune/pull/7732>
[ocaml/dune#7701] <https://github.com/ocaml/dune/pull/7701>
[ocaml/dune#7697] <https://github.com/ocaml/dune/pull/7697>
[ocaml/dune#7696] <https://github.com/ocaml/dune/pull/7696>
[ocaml/dune#7695] <https://github.com/ocaml/dune/pull/7695>
[ocaml/dune#7693] <https://github.com/ocaml/dune/pull/7693>
[ocaml/dune#7675] <https://github.com/ocaml/dune/pull/7675>
[ocaml/dune#7668] <https://github.com/ocaml/dune/pull/7668>
[ocaml/dune#5552] <https://github.com/ocaml/opam/pull/5552>
[ocaml/dune#5549] <https://github.com/ocaml/opam/pull/5549>
◊ *opam* Native Support for Windows in opam 2.2
Contributors: @rjbou (OCamlPro), @kit-ty-kate (Tarides), @dra27
(Tarides), @emillon (Tarides), @Leonidas-from-XIV (Tarides)
Throughout May, the opam team has focused on reviewing and fixing
remaining PRs for the 2.2 alpha release. This effort debugged and
resolved issues found during testing, and the team is now working
through the handful PRs pending review.
A new release, opam 2.1.5 point release, has also been rolled out,
backporting several fixes from the upcoming 2.2 release, and an
important security fix. You can read the announcement on the [OCaml
Changelog].
*Activities:*
• Installed cygwin internally during init – [ocaml/opam#5545].
• Added cygwin support to depexts – [ocaml/opam#5542].
• Implemented fully revertible environment updates –
[ocaml/opam#5417].
• Some windows shell updates – [ocaml/opam#5541].
• Better cygwin support in core – [ocaml/opam#5543].
• init: detect local cygwin installation – [ocaml/opam#5544].
• init: install cygwin internally - [ocaml/opam#5545].
• Used OCaml code to copy/move/remove directories instead of unix
commands – [ocaml/opam#4823].
• Fix performance regression in opam install/remove/upgrade/reinstall
– [ocaml/opam#5503].
[OCaml Changelog] <https://ocaml.org/changelog?t=opam>
[ocaml/opam#5545] <https://github.com/ocaml/opam/pull/5545>
[ocaml/opam#5542] <https://github.com/ocaml/opam/pull/5542>
[ocaml/opam#5417] <https://github.com/ocaml/opam/pull/5417>
[ocaml/opam#5541] <https://github.com/ocaml/opam/pull/5541>
[ocaml/opam#5543] <https://github.com/ocaml/opam/pull/5543>
[ocaml/opam#5544] <https://github.com/ocaml/opam/pull/5544>
[ocaml/opam#4823] <https://github.com/ocaml/opam/pull/4823>
[ocaml/opam#5503] <https://github.com/ocaml/opam/pull/5503>
◊ *Dune* Improving Dune’s Documentation
Contributors: @emillon (Tarides)
Two Dune libraries now have a documentation page on OCaml.org: both
[dune-build-info] and [dune-configurator] now have their API
documentation directly on their package page, and for Dune itself, a
link to its official documentation has been included.
A new `action:' directive has been added to the Dune Sphinx domain,
allowing for improved cross-referencing. Finally, the old `.org'
format Dune example docs have been converted to Markdown to
standardize the documentation format further.
The improvements to the documentation have been published as part of
the Dune 3.8 release. The new structure and many improvements can be
viewed on [Dune documentation].
*Activities:*
• Placed uncategorized pages under the most appropriate header –
[ocaml/dune#7683].
• Converted README.org in example to markdown – [ocaml/dune#7738].
• Added API documentation for dune-build-info – [ocaml/dune#7739].
• Directed readers to the official docs in odoc – [ocaml/dune#7746].
• Added an odoc index for configurator – [ocaml/dune#7749].
• Corrected the documentation for `(map_workspace_root)' –
[ocaml/dune#7775].
• Expanded actions documentation with a special directive –
[ocaml/dune#7804].
[dune-build-info]
<https://ocaml.org/p/dune-build-info/latest/doc/index.html>
[dune-configurator]
<https://ocaml.org/p/dune-configurator/latest/doc/index.html>
[Dune documentation] <https://dune.readthedocs.io/en/stable/>
[ocaml/dune#7683] <https://github.com/ocaml/dune/pull/7683>
[ocaml/dune#7738] <https://github.com/ocaml/dune/pull/7738>
[ocaml/dune#7739] <https://github.com/ocaml/dune/pull/7739>
[ocaml/dune#7746] <https://github.com/ocaml/dune/pull/7746>
[ocaml/dune#7749] <https://github.com/ocaml/dune/pull/7749>
[ocaml/dune#7775] <https://github.com/ocaml/dune/pull/7775>
[ocaml/dune#7804] <https://github.com/ocaml/dune/pull/7804>
◊ *Dune* Composing installed Coq theories
Contributors: @Alizter and @ejgallego (IRIF)
Last month, the PR that brings [support for composing Coq theories
with Dune] was merged.
This is now available in the release of Dune 3.8.0! From this point
onwards, Coq users can utilize Dune to build Coq projects even if they
depend on Coq projects that use other build systems!
[support for composing Coq theories with Dune]
<https://github.com/ocaml/dune/pull/7047>
◊ *Dune* Running Actions Concurrently
Contributors: @Alizter and @hhugo (Nomadic Labs)
Last month, a couple of PRs were merged into Dune to [add a new
concurrent action] and it was utilized to [run inline tests
concurrently].
These patches are part of Dune 3.8.0 release, starting now, you can
use the new `concurrent' action in your Dune rules:
┌────
│ (rule
│ (action
│ (concurrent
│ (run <prog> <args>)
│ (run <prog> <args>))))
└────
[add a new concurrent action]
<https://github.com/ocaml/dune/pull/6933>
[run inline tests concurrently]
<https://github.com/ocaml/dune/pull/7012>
◊ *Dune* Benchmarking Dune on Large Code Bases
Contributors: @gridbugs (Tarides), @Leonidas-from-XIV (Tarides)
The quality of the dune benchmark results has been improved, averaging
out the variance seen in short tests by running them multiple times.
This enhancement aims to reduce the effect of the background noise
inherent in the environment.
The dune benchmarks also exposed two broken packages: the hash of
[ppx_rapper (3.1.0)] artefact has been updated as it had changed in
place, and [ocamlcodoc] artefacts have been added to the
[opam-source-archives] as the original URL is no longer reachable.
Moreover, a stack overflow in `dune-rpc-lwt' exposed by the benchmarks
has been fixed.
*Activities:*
• Ran short monorepo benchmarks multiple times – [ocaml/dune#7798].
• Fixed issues in monorepo benchmarks – [ocaml/dune#7786].
• [Added] ocamlcodoc to opam-source-archives and [updated]
opam-repository.
• Opened an [issue] about `ppx_rapper.3.1.0' package changing in
place.
[ppx_rapper (3.1.0)] <https://ocaml.org/p/ppx_rapper/3.1.0>
[ocamlcodoc] <https://ocaml.org/p/ocamlcodoc/latest>
[opam-source-archives] <https://github.com/ocaml/opam-source-archives>
[ocaml/dune#7798] <https://github.com/ocaml/dune/pull/7798>
[ocaml/dune#7786] <https://github.com/ocaml/dune/pull/7786>
[Added] <https://github.com/ocaml/opam-source-archives/pull/21>
[updated] <https://github.com/ocaml/opam-repository/pull/23801>
[issue] <https://github.com/roddyyaga/ppx_rapper/issues/34>
Compiling to JavaScript
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
◊ *Dune* Compile to JavaScript with Melange in Dune
Contributors: @anmonteiro, @jchavarri (Ahrefs), @rgrinberg (Tarides)
We’re thrilled to see the joint release of Dune 3.8.0 and [Melange
1.0] this month!
[Melange] is a compiler from OCaml to JavaScript with the vision of
maintaining compatibility with OCaml and providing the best OCaml
experience within the modern JavaScript ecosystem.
Have a look at the [Dune documentation] and [Melange documentation] to
learn how to get started using Melange to compile your OCaml projects
to JavaScript.
You can also refer to the [template] to get started.
[Melange 1.0]
<https://discuss.ocaml.org/t/ann-melange-1-0-compile-ocaml-reasonml-to-javascript/12305>
[Melange] <https://github.com/melange-re/melange>
[Dune documentation]
<https://dune.readthedocs.io/en/latest/melange.html>
[Melange documentation] <https://melange.re/v1.0.0/>
[template] <https://github.com/melange-re/melange-opam-template>
Generating Documentation
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
◊ *Odoc* Add Search Capabilities to `odoc'
Contributors: @panglesd (Tarides), @EmileTrotignon (Tarides), @trefis
(Tarides)
The odoc team is making steady progress on adding a search bar to
odoc’s generated documentation.
In May, an interface for interaction between odoc and search engines
was designed. [Sherlodoc], which can now run in the browser, was
updated to use the new interface exposed by odoc. Improvements were
also made to `sherlodoc' itself to enable searching for constructors
and record fields, as well as in docstrings. The larger database from
all this extra indexing prompted work on profiling it and implementing
optimizations.
Anticipating the June update, the [odoc PR] that was open a few days
ago can be checked out.
In parallel, a [working prototype] of counting occurrences in odoc was
developed. The aim is to add usage statistics in the generated index,
so that search engines can use it to sort search results. It will also
allow for a “jump-to-documentation” feature in the [rendered source
code] that was merged in March.
[Sherlodoc] <https://doc.sherlocode.com/>
[odoc PR] <https://github.com/ocaml/odoc/pull/972>
[working prototype]
<https://github.com/panglesd/odoc/tree/occurrences-in-odoc>
[rendered source code] <https://github.com/ocaml/odoc/pull/909>
◊ *Odoc* Support for Tables in `odoc'
Contributors: @gpetiot (Tarides), @panglesd (Tarides), @Julow
(Tarides), @jonludlam (Tarides), @trefis (Tarides)
The PRs adding support for a new syntax to create tables in Odoc have
been merged!
As a reminder, this new feature will enable the creation of tables
using a syntax similar to Markdown:
┌────
│ {t
│ a | b | c | d
│ ---|:--|--:|:-:
│ a | b | c | d
│ }
└────
Odoc will generate tables for different backends, including LaTex and
HTML. This new syntax will be available in the upcoming release of
Odoc 2.3.0. Stay tuned!
*Activities:*
• Merged the PR that adds a new syntax for tables in odoc-parser –
[ocaml-doc/odoc-parser#11]
• Merged the PR that adds support for tables to odoc –
[ocaml/odoc#893]
[ocaml-doc/odoc-parser#11]
<https://github.com/ocaml-doc/odoc-parser/pull/11>
[ocaml/odoc#893] <https://github.com/ocaml/odoc/pull/893>
Editing and Refactoring Code
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
◊ *Merlin* Support for Project-Wide References in Merlin
Contributors: @voodoos (Tarides), @let-def (Tarides)
Not much progress was made on the support for project-wide occurrences
in Merlin this month due to the Merlin team’s focus on performance
improvements, fixing user-reported bugs, compatibility with OCaml 5.1,
and the release of Merlin 4.9
The remaining issues, such as module aliases traversal and index
filtering, were discussed, with the implementation of identified
solutions set to commence soon.
◊ *Merlin* Improving Merlin’s Performance
Contributed by: @pitag-ha (Tarides), @3Rafal (Tarides), @voodoos
(Tarides), @let-def (Tarides)
The final stages of work on benchmarking Merlin are in progress, with
the Merlin team focusing on integrating the developed benchmarking
tooling into Merlin’s CI using `current-bench'. The [PR] on `merl-an'
has been opened to add a new current-bench compatible backend and work
has started on adding memory usage information to Merlin’s telemetry.
On the performance optimisations front, the PPX phase cache in Merlin
was completed and merged. Issues were opened upstream on how tools
that use Merlin can benefit from the new PPX cache.
*Activities:*
• Implemented a sketch of `current-bench' backend in `merl-an' –
[pitag-ha/merl-an#2].
• Started work on adding memory usage information to Merlin’s
telemetry.
• Completed and merged the PPX phase cache PR – [ocaml/merlin#1584]. -
Opened issues at `dune' and `ocaml-lsp-server' to keep record of the
necessities to enable the PPX phase cache
• In Dune: `dune ocaml-merlin': enable PPX phase cache –
[ocaml/dune#7731].
• In OCaml LSP: Handle Merlin’s PPX phase cache –
[ocaml/ocaml-lsp#1095].
• Identified and fixed a memory “leak” related to the `(F A).t'
syntax, causing uncontrolled memoization table growth –
[ocaml/merlin#1609].
[PR] <https://github.com/pitag-ha/merl-an/pull/2>
[pitag-ha/merl-an#2] <https://github.com/pitag-ha/merl-an/pull/2>
[ocaml/merlin#1584] <https://github.com/ocaml/merlin/pull/1584>
[ocaml/dune#7731] <https://github.com/ocaml/dune/issues/7731>
[ocaml/ocaml-lsp#1095]
<https://github.com/ocaml/ocaml-lsp/issues/1095>
[ocaml/merlin#1609] <https://github.com/ocaml/merlin/pull/1609>
◊ *OCaml LSP* Using Dune RPC on Windows
Contributors: @nojb (LexiFi)
In May, a couple of patches that build on the [support for watch mode
on Windows] introduced in Dune 3.7.0 were merged in [Dune] and [OCaml
LSP] to allow OCaml LSP to use Dune RPC. The aim is to enable Windows
users to leverage Dune RPC and receive build statuses and more
exhaustive build errors in the editor when Dune is running in watch
mode.
Dune 3.8.0 was released with the above patches and a release of OCaml
LSP will follow in the coming weeks.
[support for watch mode on Windows]
<https://github.com/ocaml/dune/pull/7010>
[Dune] <https://github.com/ocaml/dune/pull/7666>
[OCaml LSP] <https://github.com/ocaml/ocaml-lsp/pull/1079>
◊ *OCaml LSP* Upstreaming OCaml LSP’s Fork of Merlin
Contributors: @voodoos (Tarides), @3Rafal (Tarides)
The effort to upstream OCaml LSP’s fork of merlin continued. Necessary
patches in Merlin have been reviewed and merged. Work also continued
on the PR to use Merlin as a library in OCaml LSP.
*Activities:*
• Reviewed and merged the PR enabling configurable Merlin PP/PPX
spawning – [ocaml/merlin#1585].
• Continued working on the PR to use Merlin as a library in LSP –
[ocaml/ocaml-lsp#1070].
[ocaml/merlin#1585] <https://github.com/ocaml/merlin/pull/1585>
[ocaml/ocaml-lsp#1070] <https://github.com/ocaml/ocaml-lsp/pull/1070>
Formatting Code
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
◊ *OCamlFormat* Closing the Gap Between OCamlFormat and `ocp-indent'
Contributors: @gpetiot (Tarides) and @EmileTrotignon (Tarides), @Julow
(Tarides), @ceastlund (Jane Street)
The effort continued to tune the `janestreet' profile so that it
aligns better with the output of `ocp-indent'. Despite encountering
difficulties with formatting “cinaps” comments, considerable progress
was made in May and work will continue throughout June.
*Activities:*
• Align pattern alias – [ocaml-ppx/ocamlformat#2359]
• Dock `fun~/~function' only if it starts on the first line of the
apply – [ocaml-ppx/ocamlformat#2362]
• Align module arguments – [ocaml-ppx/ocamlformat#2363]
• Remove extra newline in empty comments –
[ocaml-ppx/ocamlformat#2365]
[ocaml-ppx/ocamlformat#2359]
<https://github.com/ocaml-ppx/ocamlformat/pull/2359>
[ocaml-ppx/ocamlformat#2362]
<https://github.com/ocaml-ppx/ocamlformat/pull/2362>
[ocaml-ppx/ocamlformat#2363]
<https://github.com/ocaml-ppx/ocamlformat/pull/2363>
[ocaml-ppx/ocamlformat#2365]
<https://github.com/ocaml-ppx/ocamlformat/pull/2365>
Congratulation to the OCaml team for the 2023 SIGPLAN programming languages software award! 🏆
══════════════════════════════════════════════════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/congratulation-to-the-ocaml-team-for-the-2023-sigplan-programming-languages-software-award/12437/1>
Stephen De Gabrielle announced
──────────────────────────────
Congratulation to the OCaml team for the *2023 SIGPLAN programming
languages software award!* 🏆
<https://www.sigplan.org/Awards/Software/>
(Just announced at SIGPLAN: Awards Lunch at PLDI23)
Other OCaml News
════════════════
From the ocaml.org blog
───────────────────────
Here are links from many OCaml blogs aggregated at [the ocaml.org
blog].
• [Release of Frama-C 27.0 (Cobalt)]
[the ocaml.org blog] <https://ocaml.org/blog/>
[Release of Frama-C 27.0 (Cobalt)]
<https://frama-c.com/fc-versions/cobalt.html>
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
[online].
[Alan Schmitt]
[send me a message] <mailto:alan.schmitt at polytechnique.org>
[the archive] <https://alan.petitepomme.net/cwn/>
[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>
[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>
[Alan Schmitt] <https://alan.petitepomme.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20230620/d266092c/attachment-0001.html>
More information about the caml-news-weekly
mailing list