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 February 06 to 13,
2024.
Table of Contents
─────────────────
Sherlodoc, a search engine for OCaml documentation
dream-html 3.0.0
OCaml.org Newsletter: January 2024
OCaml 5.2.0, first alpha release
Release of ppxlib.0.32.0
Looking for Ideas for the Community Page at OCaml.org
Profiling OCaml programs
Monadic programming tutorial
Tutorial on GADTs
Caqti/ppx_raper tutorial
Re: dune 3.13
Other OCaml News
Old CWN
Sherlodoc, a search engine for OCaml documentation
══════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ann-sherlodoc-a-search-engine-for-ocaml-documentation/14011/1>
Emile Trotignon announced
─────────────────────────
We (@art-w, @EmileTrotignon) are pleased to announce the first release
of Sherlodoc on opam!
Sherlodoc is a search engine for OCaml documentation, which supports
search by name, documentation and fuzzy type search (similar to Hoogle
in the Haskell world). You can try it at [doc.sherlocode.com] on the
libraries published in the opam repository, thanks to all the
documentation available on [OCaml.org].
• The main focus of this release is the integration with Odoc (and
[support for `dune build @doc' is in progress]). The latest release
of [Odoc 2.4.0 introduces a search bar] in its static html
documentation, which enables a javascript search engine to run
client-side (without a server). Since Sherlodoc is fully implemented
in OCaml, it was straightforward to compile it to javascript using
`js_of_ocaml'. See for example the [`Cmdliner' package documentation
with search] hosted on github static pages.
• Sherlodoc now uses the [`odoc.search'] library and is hence able to
search for modules, types, constructors, record fields, etc as well
as inside documentation comments. (Protip for library authors:
Sherlodoc heavily favors documented functions ;) )
• There is also a new command-line interface that you could use to
locally search packages installed in your switch, although the CLI
was developed for debugging and could use some love!
Instructions for trying out this new version can be found in the
[readme], but it can be as simple as:
┌────
│ $ opam install sherlodoc odig
│ $ odig odoc
│ $ export SHERLODOC_DB=/tmp/sherlodoc.marshal
│ $ sherlodoc index $(find $OPAM_SWITCH_PREFIX/var/cache/odig/odoc -name '*.odocl' | grep -v "__")
│ $ sherlodoc search "list map"
└────
We hope you enjoy it to find your way in the ever-growing OCaml
ecosystem! <3
/This is an early release: if you believe that having a great search
engine is important, please help us by reporting any issue you
encounter, queries with unexpected results, or by contributing new
PRs! (to e.g. improve the CLI, the website or even the algorithms if
you ever wanted to learn how a search engine works!)/
[doc.sherlocode.com] <https://doc.sherlocode.com>
[OCaml.org] <https://ocaml.org>
[support for `dune build @doc' is in progress]
<https://github.com/ocaml/dune/pull/9772>
[Odoc 2.4.0 introduces a search bar]
<https://discuss.ocaml.org/t/ann-release-of-odoc-2-4-0/13676>
[`Cmdliner' package documentation with search]
<https://art-w.github.io/sherlodoc/cmdliner/Cmdliner/index.html>
[`odoc.search']
<https://ocaml.github.io/odoc/odoc_search/Odoc_search/index.html>
[readme] <https://github.com/art-w/sherlodoc>
dream-html 3.0.0
════════════════
Archive: <https://discuss.ocaml.org/t/ann-dream-html-3-0-0/14013/1>
Yawar Amin announced
────────────────────
Hi, dream-html 3.0.0 has been released to opam:
<https://ocaml.org/p/dream-html/3.0.0>
• Repo: <https://github.com/yawaramin/dream-html>
• API docs:
<https://yawaramin.github.io/dream-html/dream-html/Dream_html/index.html>
Dream-html is a library for generating HTML, closely integrated with
Dream. It can be used as an alternative to Dream’s built-in Embedded
ML templating language and comes with all current htmx attributes
defined out of the box.
In this release, I made a breaking change (hence major version bump)
to restrict the `role' attribute to only the acceptable values for
ARIA roles. Previously it was accepting any format string.
Plus a major new feature: all the ARIA attributes with the types of
their values narrowed as much as possible. Eg:
┌────
│ open Dream_html
│ open HTML
│
│ let toast ?(idval="toast") msg =
│ p [id "%s" idval; Aria.live `polite] [txt "%s" msg]
└────
OCaml.org Newsletter: January 2024
══════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ocaml-org-newsletter-january-2024/14014/1>
Sabine Schmaltz announced
─────────────────────────
Welcome to the January 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 OCaml community members who
help us review, revise, and create better OCaml documentation. Your
feedback enables us to better prioritise our work. Thank you!
This newsletter covers:
• *OCaml Documentation:* New documentation has been released, and
existing documentation has been improved.
• *Dark Mode:* There's been good progress on implementing the upcoming
dark mode.
• *General Improvements:* As usual, we also worked on general
maintenance and improvements based on user feedback, so we're
highlighting some of our work below.
[previous updates] <https://discuss.ocaml.org/tag/ocamlorg-newsletter>
Open Issues for Contributors
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
We created many issues for external contributors. The majority of them
are suitable for OCaml beginners, and we're happy to review and
provide feedback on your pull requests!
You can find [open issues for contributors here]!
[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 Documentation
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
We released multiple new documents, most notably on Modules, Functors,
Libraries with Dune, as well as a new tutorial on using the OCaml.org
Playground. The documentation on Labelled Arguments, Sets, and Options
has been improved.
To better understand how effective the new documentation is, we are
running user tests (announced [on Discuss] and [on Twitter/X]) to
compare the old documentation content on v2.ocaml.org with the new
documentation on ocaml.org. A sufficient number of newcomers to OCaml
volunteered to help us with this. Thanks so much!
In addition, there is an open survey that asks you to rate the new
documentation in relation to the old content: We would love to have
your input on [this survey], even if you only drop us some numeric
ratings!
*Relevant PRs and Activities:*
• *In Progress:*
• Maps
• Higher Order Functions
• *In Review (internal):*
• *In Review (community):*
• [File Manipulation] (see [Discuss Thread])
• [Polymorphic Variants] (see [Discuss Thread])
• *Published:*
• [Sets]
• [Options]
• [Modules, Functors, Libraries With Dune] (see [Discuss])
• [Labelled Arguments]
• [The OCaml Playground] by [@The-Amoghavarsha]
• [Running Commands in an opam Switch]
• [Mutable State / Imperative Programming] (see [Discuss Thread])
• Announcement on Discuss: [New Tutorials on Basics of OCaml]
• [Basic Data Types] (see [Discuss Thread])
• [Functions and Values] (see [Discuss Thread])
• [Installing OCaml] (see [Discuss Thread])
• [A Tour Of OCaml] (see [Discuss Thread])
• [Your First OCaml Program] (see [Discuss Thread])
• [Introduction to opam Switches]
• [Fix Homebrew Errors on Apple M1]
• [Operators]
• [Error Handling] (see [Discuss Thread])
• [Arrays] (see [Discuss Thread])
• [Sequences] (see [Discuss Thread])
• *Other Activity*:
• [Fix code example in Values & Functions tutorial] by [@cuihtlauac]
• [Improve 'Managing Dependencies with opam'] by [@sabine]
• [(doc) Mention `dune-release' opam package in "Publishing a
Package"] by [@sabine]
• [Add how to generate `odoc' `.mld' documentation pages with Dune
to the "Generating Documentation With `odoc'"] by [@sabine]
• [Prepend `opam exec --' on all `dune' commands] by [@sabine]
• [Mention record update syntax] by [@srj31]
• [Fix Getting Started documentation] by [@akindofyoga]
• [Fix wording on Getting Started page] by [@akindofyoga]
• [Fix typos in Your First OCaml Program tutorial] by [@cuihtlauac]
• [(doc) Fix small typo on Getting Started page] by [@akindofyoga]
• [Remove links to V2 in docs] by [@cuihtlauac]
• [(doc) Some misc minor doc nits ] by [@heathhenley]
• [Code test for Set V2 Tutorial] by [@christinerose]
• [(doc) Remove Functional Programming document] by [@sabine]
• [(doc) Remove Unfold an Option section] by [@cuihtlauac]
• [(doc) Minor line editing for Labelled Arguments] by
[@christinerose]
• Issue [Use "parameter" and "argument" appropriately] has been
resolved by multiple PRs from [@PoorlyDefinedBehaviour]
• [Fix link in 'Other installation methods' collapsible] by
[@norskeld]
• [(doc) Updated "Operators," adding a link to the operator table in
the language manual] by [@cuihtlauac]
• [Use a filename different from the library name in Your First
OCaml Program] by [@cuihtlauac]
• [Mention labelled parameters in A Tour of OCaml] by
[@PoorlyDefinedBehaviour]
• [Mention labelled parameters in Values and Functions] by
[@PoorlyDefinedBehaviour]
• [(doc) add more info about multiple files] by [@heathhenley]
• [Include text on if-then-else and begin-end] by [@cuihtlauac]
• [Fix a typo in programming guidelines] by [@presenthee]
• [Fixing #1979 Link on privacy policy page 404] by
[@The-Amoghavarsha]
• [Fix typo in the tutorial on optional params] by [@julbinb]
• [(typo) Add missing space on packages page] by [@sabine]
• [Improve documentation on Editor Support] by [@PizieDust]
We started opening issues marked with "help wanted" to enable external
contributors to help improve the docs. The response has been
overwhelmingly positive, and we're thrilled to keep this up and make
the OCaml documentation truly great with your help!
[on Discuss]
<https://discuss.ocaml.org/t/request-for-feedback-take-the-ocaml-org-learn-area-user-satisfaction-survey/13928>
[on Twitter/X] <https://x.com/sabine/status/1752272173383717171?s=20>
[this survey] <https://forms.gle/b2BS5NEiFaUVScJTA>
[File Manipulation] <https://github.com/ocaml/ocaml.org/pull/1400>
[Discuss Thread]
<https://discuss.ocaml.org/t/help-review-the-new-file-manipulation-tutorial-on-ocaml-org/12638>
[Polymorphic Variants] <https://github.com/ocaml/ocaml.org/pull/1531>
[Discuss Thread]
<https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485>
[Sets] <https://github.com/ocaml/ocaml.org/pull/948>
[Options] <https://github.com/ocaml/ocaml.org/pull/1800>
[Modules, Functors, Libraries With Dune]
<https://github.com/ocaml/ocaml.org/pull/1778>
[Discuss]
<https://discuss.ocaml.org/t/draft-tutorials-on-modules-functors-and-libraries/>
[Labelled Arguments] <https://github.com/ocaml/ocaml.org/pull/1881>
[The OCaml Playground] <https://github.com/ocaml/ocaml.org/pull/1880>
[@The-Amoghavarsha] <https://github.com/The-Amoghavarsha>
[Running Commands in an opam Switch]
<https://github.com/ocaml/ocaml.org/pull/1825>
[Mutable State / Imperative Programming]
<https://github.com/ocaml/ocaml.org/pull/1529>
[Discuss Thread]
<https://discuss.ocaml.org/t/draft-tutorial-on-mutability-loops-and-imperative-programming/13504>
[New Tutorials on Basics of OCaml]
<https://discuss.ocaml.org/t/new-tutorials-on-basics-of-ocaml/13396>
[Basic Data Types] <https://github.com/ocaml/ocaml.org/pull/1514>
[Discuss Thread]
<https://discuss.ocaml.org/t/ocaml-org-tutorial-revamping-contd-basic-datatypes/12985>
[Functions and Values] <https://github.com/ocaml/ocaml.org/pull/1512>
[Discuss Thread]
<https://discuss.ocaml.org/t/ocaml-org-tutorial-revamping-cond-values-and-functions/13005>
[Installing OCaml] <https://ocaml.org/docs/installing-ocaml>
[Discuss Thread]
<https://discuss.ocaml.org/t/help-revamping-the-getting-started-tutorials-in-ocaml-org/12749>
[A Tour Of OCaml] <https://ocaml.org/docs/tour-of-ocaml>
[Your First OCaml Program] <https://ocaml.org/docs/your-first-program>
[Introduction to opam Switches]
<https://ocaml.org/docs/opam-switch-introduction>
[Fix Homebrew Errors on Apple M1] <https://ocaml.org/docs/arm64-fix>
[Operators] <https://ocaml.org/docs/operators>
[Error Handling] <https://ocaml.org/docs/error-handling>
[Discuss Thread]
<https://discuss.ocaml.org/t/ann-new-get-started-documentation-on-ocaml-org/13269>
[Arrays] <https://ocaml.org/docs/arrays>
[Discuss Thread]
<https://discuss.ocaml.org/t/feedback-needed-new-arrays-tutorial-on-ocaml-org/12683>
[Sequences] <https://ocaml.org/docs/sequences>
[Discuss Thread]
<https://discuss.ocaml.org/t/creating-a-tutorial-on-sequences/12091>
[Fix code example in Values & Functions tutorial]
<https://github.com/ocaml/ocaml.org/pull/1892>
[@cuihtlauac] <https://github.com/cuihtlauac>
[Improve 'Managing Dependencies with opam']
<https://github.com/ocaml/ocaml.org/pull/1886>
[@sabine] <https://github.com/sabine>
[(doc) Mention `dune-release' opam package in "Publishing a Package"]
<https://github.com/ocaml/ocaml.org/pull/1883>
[Add how to generate `odoc' `.mld' documentation pages with Dune to the
"Generating Documentation With `odoc'"]
<https://github.com/ocaml/ocaml.org/pull/1882>
[Prepend `opam exec --' on all `dune' commands]
<https://github.com/ocaml/ocaml.org/pull/1905>
[Mention record update syntax]
<https://github.com/ocaml/ocaml.org/pull/1909>
[@srj31] <https://github.com/srj31>
[Fix Getting Started documentation]
<https://github.com/ocaml/ocaml.org/pull/1914>
[@akindofyoga] <https://github.com/akindofyoga>
[Fix wording on Getting Started page]
<https://github.com/ocaml/ocaml.org/pull/1920>
[Fix typos in Your First OCaml Program tutorial]
<https://github.com/ocaml/ocaml.org/pull/1924>
[(doc) Fix small typo on Getting Started page]
<https://github.com/ocaml/ocaml.org/pull/1926>
[Remove links to V2 in docs]
<https://github.com/ocaml/ocaml.org/pull/1925>
[(doc) Some misc minor doc nits ]
<https://github.com/ocaml/ocaml.org/pull/1941>
[@heathhenley] <https://github.com/heathhenley>
[Code test for Set V2 Tutorial]
<https://github.com/ocaml/ocaml.org/pull/1948>
[@christinerose] <https://github.com/christinerose>
[(doc) Remove Functional Programming document]
<https://github.com/ocaml/ocaml.org/pull/1940>
[(doc) Remove Unfold an Option section]
<https://github.com/ocaml/ocaml.org/pull/1954>
[(doc) Minor line editing for Labelled Arguments]
<https://github.com/ocaml/ocaml.org/pull/1947>
[Use "parameter" and "argument" appropriately]
<https://github.com/ocaml/ocaml.org/issues/1911>
[@PoorlyDefinedBehaviour] <https://github.com/PoorlyDefinedBehaviour>
[Fix link in 'Other installation methods' collapsible]
<https://github.com/ocaml/ocaml.org/pull/1958>
[@norskeld] <https://github.com/norskeld>
[(doc) Updated "Operators," adding a link to the operator table in the
language manual] <https://github.com/ocaml/ocaml.org/pull/1960>
[Use a filename different from the library name in Your First OCaml
Program] <https://github.com/ocaml/ocaml.org/pull/1923>
[Mention labelled parameters in A Tour of OCaml]
<https://github.com/ocaml/ocaml.org/pull/1951>
[Mention labelled parameters in Values and Functions]
<https://github.com/ocaml/ocaml.org/pull/1952>
[(doc) add more info about multiple files]
<https://github.com/ocaml/ocaml.org/pull/1942>
[Include text on if-then-else and begin-end]
<https://github.com/ocaml/ocaml.org/pull/1957>
[Fix a typo in programming guidelines]
<https://github.com/ocaml/ocaml.org/pull/1998>
[@presenthee] <https://github.com/presenthee>
[Fixing #1979 Link on privacy policy page 404]
<https://github.com/ocaml/ocaml.org/pull/1996>
[Fix typo in the tutorial on optional params]
<https://github.com/ocaml/ocaml.org/pull/2002>
[@julbinb] <https://github.com/julbinb>
[(typo) Add missing space on packages page]
<https://github.com/ocaml/ocaml.org/pull/2003>
[Improve documentation on Editor Support]
<https://github.com/ocaml/ocaml.org/pull/1949>
[@PizieDust] <https://github.com/PizieDust>
Upcoming Dark Mode
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
In December, [oyenuga17] started to implement the new dark mode on
OCaml.org. Plans are to complete and activate the dark mode based on
browser/operating system preferences by early March. It looks like we
are on track to achieve this.
We continuously merge small patches into OCaml.org, and you can take a
look at completed dark mode pages on <https://staging.ocaml.org>. We
placed a button at the bottom of the page to toggle the dark mode on
staging. (This is not going to be released. It is only a means for us
to review the dark mode pages.)
*Completed Pages:*
• [Learn/Get Started + Language + Guides] by [@oyenuga17]
• [Learn/Excercises] by [@oyenuga17]
• [Learn/Books] by [@oyenuga17]
• [Learn/Platform Tools] by [@oyenuga17]
• [Packages Search Results] by [@oyenuga17]
• [Packages + Community] by [@oyenuga17]
• [Blog + Jobs + Changelog] by [@oyenuga17]
• [Learn/Overview] by [@oyenuga17]
[oyenuga17] <https://github.com/oyenuga17>
[Learn/Get Started + Language + Guides]
<https://github.com/ocaml/ocaml.org/pull/1897>
[@oyenuga17] <https://github.com/oyenuga17>
[Learn/Excercises] <https://github.com/ocaml/ocaml.org/pull/1902>
[Learn/Books] <https://github.com/ocaml/ocaml.org/pull/1903>
[Learn/Platform Tools] <https://github.com/ocaml/ocaml.org/pull/1919>
[Packages Search Results] <https://github.com/ocaml/ocaml.org/pull/1946>
[Packages + Community] <https://github.com/ocaml/ocaml.org/pull/1973>
[Blog + Jobs + Changelog] <https://github.com/ocaml/ocaml.org/pull/2001>
[Learn/Overview] <https://github.com/ocaml/ocaml.org/pull/1836>
General Improvements
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
*Most Notable Changes TLDR*:
• We merged a basic documentation search feature to enable search
inside the OCaml documentation. It is available on the [Learn area
"Overview" page]! There's room for improvements here, the most
notable of which would be adding typo correction, and unifying
package and documentation search in the top navigation bar's search
box.
• A long-standing bug where wrong library names were displayed in the
package documentation module tree view has been fixed!
• The package overview page now links to a new page that lists all
package versions with their publication dates.
• The changelog is now reachable from the main landing page.
• We now link the prerequisites of tutorials and recommended next
tutorials in the YAML metadata of the tutorial's Markdown page. This
ensures that these links between tutorials will stay valid.
Many thanks go out to the many contributors who helped improve
OCaml.org in January. Find them listed below!
*Relevant PRs and Activities:*
• General:
• [Documentation Search Feature] by [@SaySayo] and [@sabine]
• [(feat) add recommended_next_tutorials capability] by [@enoonan]
• [Add precompile check for Recommended Next Tutorials] by
[@enoonan]
• [(feat) add prerequisite_tutorials capability] by
[@PoorlyDefinedBehaviour]
• [Add Package Versions Page] by [@sabine]
• [Make changelog reachable from the landing page] by [@FatumaA]
• [Fixing #1989 Misaligned select drop down on jobs page] by
[@The-Amoghavarsha]
• [Implement active state on exercise sidebar] by [@oyenuga17]
• [Update `Utils.human_date' to use the newer Timedesc API] by
[@darrenldl]
• [Fix language manual banner HTML] by [@sabine]
• [In case `docs-data.ocaml.org' is unreachable, fail more
gracefully] by [@sabine]
• [(bug) Fix String.sub exception if changelog length < 100] by
[@sabine]
• [Gitignore *:OECustomProperty] by [@sabine]
• [Remove The OCaml System from home] by [@cuihtlauac]
• [Simplify typing of recommended next tutorials] by [@cuihtlauac]
• Package documentation:
• [The `docs-ci' pipeline no longer pins `odoc', allowing Voodoo to
take control of its dependencies for better separation of
concerns.] by [@sabine]
• [Refactor: Improve naming of different index modules] by [@sabine]
• [Bugfix: Read Library Names from Packages Correctly] by [@sabine]
• [Bugfix: Move H1 Title Rendering to the Correct Location] by
[@sabine]
• Data parsing (`ood-gen'):
• [Report file name on YAML error] by [@cuihtlauac]
• [Changelog: infer date from slug if not in metadata] by [@emillon]
• [`ood-gen': call crunch on each directory separately] by
[@emillon]
• [Tutorial titles only as metadata] by [@PoorlyDefinedBehaviour]
• Data:
• [Add two individual blog post entries] by [@IdaraNabuk]
• [Changelog for Dune 3.13.0] by [@emillon]
• [changelog: opam.2.2.0~beta1] by [@kit-ty-kate]
• [Add Laval University as an academic user of OCaml] by [@bktari]
• [Add 2 XenServer jobs] by [@edwintorok]
• [(data) Added `priver.dev' OCaml feed] by [@emilpriver]
• [Add changelog for Dune 3.12.2] by [@emillon]
• [Use Yaml dashes for lists] by [@cuihtlauac]
• [Add missing Platform changelogs] by [@tmattio]
• Repository docs:
• [Fix broken links in CONTRIBUTING.md] by [@cuihtlauac]
• [(doc) Mention in CONTRIBUTING.md how to add images] by [@sabine]
[Learn area "Overview" page] <https://ocaml.org/docs>
[Documentation Search Feature]
<https://github.com/ocaml/ocaml.org/pull/1871>
[@SaySayo] <https://github.com/SaySayo>
[@sabine] <https://github.com/sabine>
[(feat) add recommended_next_tutorials capability]
<https://github.com/ocaml/ocaml.org/pull/1928>
[@enoonan] <https://github.com/enoonan>
[Add precompile check for Recommended Next Tutorials]
<https://github.com/ocaml/ocaml.org/pull/1943>
[(feat) add prerequisite_tutorials capability]
<https://github.com/ocaml/ocaml.org/pull/1965>
[@PoorlyDefinedBehaviour] <https://github.com/PoorlyDefinedBehaviour>
[Add Package Versions Page]
<https://github.com/ocaml/ocaml.org/pull/1799>
[Make changelog reachable from the landing page]
<https://github.com/ocaml/ocaml.org/pull/1870>
[@FatumaA] <https://github.com/FatumaA>
[Fixing #1989 Misaligned select drop down on jobs page]
<https://github.com/ocaml/ocaml.org/pull/1994>
[@The-Amoghavarsha] <https://github.com/The-Amoghavarsha>
[Implement active state on exercise sidebar]
<https://github.com/ocaml/ocaml.org/pull/2000>
[@oyenuga17] <https://github.com/oyenuga17>
[Update `Utils.human_date' to use the newer Timedesc API]
<https://github.com/ocaml/ocaml.org/pull/2009>
[@darrenldl] <https://github.com/darrenldl>
[Fix language manual banner HTML]
<https://github.com/ocaml/ocaml.org/pull/1922>
[In case `docs-data.ocaml.org' is unreachable, fail more gracefully]
<https://github.com/ocaml/ocaml.org/pull/1939>
[(bug) Fix String.sub exception if changelog length < 100]
<https://github.com/ocaml/ocaml.org/pull/1956>
[Gitignore *:OECustomProperty]
<https://github.com/ocaml/ocaml.org/pull/1937>
[Remove The OCaml System from home]
<https://github.com/ocaml/ocaml.org/pull/1982>
[@cuihtlauac] <https://github.com/cuihtlauac>
[Simplify typing of recommended next tutorials]
<https://github.com/ocaml/ocaml.org/pull/1967>
[The `docs-ci' pipeline no longer pins `odoc', allowing Voodoo to take
control of its dependencies for better separation of concerns.]
<https://github.com/ocurrent/ocaml-docs-ci/pull/169>
[Refactor: Improve naming of different index modules]
<https://github.com/ocaml-doc/voodoo/pull/138>
[Bugfix: Read Library Names from Packages Correctly]
<https://github.com/ocaml-doc/voodoo/pull/136>
[Bugfix: Move H1 Title Rendering to the Correct Location]
<https://github.com/ocaml-doc/voodoo/pull/137>
[Report file name on YAML error]
<https://github.com/ocaml/ocaml.org/pull/1974>
[Changelog: infer date from slug if not in metadata]
<https://github.com/ocaml/ocaml.org/pull/1984>
[@emillon] <https://github.com/emillon>
[`ood-gen': call crunch on each directory separately]
<https://github.com/ocaml/ocaml.org/pull/1987>
[Tutorial titles only as metadata]
<https://github.com/ocaml/ocaml.org/pull/1981>
[Add two individual blog post entries]
<https://github.com/ocaml/ocaml.org/pull/1980>
[@IdaraNabuk] <https://github.com/IdaraNabuk>
[Changelog for Dune 3.13.0]
<https://github.com/ocaml/ocaml.org/pull/1976>
[changelog: opam.2.2.0~beta1]
<https://github.com/ocaml/ocaml.org/pull/1986>
[@kit-ty-kate] <https://github.com/kit-ty-kate>
[Add Laval University as an academic user of OCaml]
<https://github.com/ocaml/ocaml.org/pull/1904>
[@bktari] <https://github.com/bktari>
[Add 2 XenServer jobs] <https://github.com/ocaml/ocaml.org/pull/1898>
[@edwintorok] <https://github.com/edwintorok>
[(data) Added `priver.dev' OCaml feed]
<https://github.com/ocaml/ocaml.org/pull/1961>
[@emilpriver] <https://github.com/emilpriver>
[Add changelog for Dune 3.12.2]
<https://github.com/ocaml/ocaml.org/pull/1950>
[Use Yaml dashes for lists]
<https://github.com/ocaml/ocaml.org/pull/1983>
[Add missing Platform changelogs]
<https://github.com/ocaml/ocaml.org/pull/1991>
[@tmattio] <https://github.com/tmattio>
[Fix broken links in CONTRIBUTING.md]
<https://github.com/ocaml/ocaml.org/pull/1908>
[(doc) Mention in CONTRIBUTING.md how to add images]
<https://github.com/ocaml/ocaml.org/pull/1906>
OCaml 5.2.0, first alpha release
════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/ocaml-5-2-0-first-alpha-release/14016/1>
octachron announced
───────────────────
Two months after the release of OCaml 5.1.1, the set of new features
for the future version 5.2.0 of OCaml has been frozen. We are thus
happy to announce the first alpha release for OCaml 5.2.0.
This alpha version is here to help fellow hackers join us early in our
bug hunting and opam ecosystem fixing fun (see below for the
installation instructions). More information about the whole release
process is now available in the [compiler repository], and we will try
to propagate this information to ocaml.org shortly.
The progresses on stabilising the ecosystem are tracked on the [opam
readiness for 5.2.0 meta-issue].
The full release is expected around April.
If you find any bugs, please report them on [OCaml's issue tracker].
If you are interested in the ongoing list of new features and bug
fixes, the updated change log for OCaml 5.2.0 is available [on
GitHub].
[compiler repository]
<https://github.com/ocaml/ocaml/blob/trunk/release-info/introduction.md>
[opam readiness for 5.2.0 meta-issue]
<https://github.com/ocaml/opam-repository/issues/25182>
[OCaml's issue tracker] <https://github.com/ocaml/ocaml/issues>
[on GitHub] <https://github.com/ocaml/ocaml/blob/5.2/Changes>
Installation Instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
The base compiler can be installed as an opam switch with the
following commands on opam 2.1 and later:
┌────
│ opam update
│ opam switch create 5.2.0~alpha1
└────
For previous version of opam, the switch creation command line is
slightly more verbose:
┌────
│ opam update
│ opam switch create 5.2.0~alpha1
│ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
└────
The source code for the alpha is also available at these addresses:
• [GitHub]
• [OCaml archives at Inria]
[GitHub] <https://github.com/ocaml/ocaml/archive/5.2.0-alpha1.tar.gz>
[OCaml archives at Inria]
<https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0~alpha1.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.2.0~alpha1+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~alpha1+flambda+nffa ocaml-variants.5.2.0~alpha1+options
│ ocaml-option-flambda ocaml-option-no-flat-float-array
└────
The command line above is slightly more complicated for opam version
anterior to 2.1:
┌────
│ opam update
│ opam switch create <switch_name> --packages=ocaml-variants.5.2.0~alpha1+options,<option_list>
│ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
└────
In both cases, all available options can be listed with `opam search
ocaml-option'.
Release of ppxlib.0.32.0
════════════════════════
Archive:
<https://discuss.ocaml.org/t/release-of-ppxlib-0-32-0/14029/1>
Nathan Rebours announced
────────────────────────
The ppxlib dev team is happy to announce the release of ppxlib.0.32.0.
The main feature of this release, implemented by @burnleydev1 during
their Outreachy internship, is a huge improvement of the handling of
located exceptions raised by ppx-es. Whenever a rewrite of the AST
throws such an exception, the ppxlib driver catches it and resumes the
rewriting using the latest valid AST it knows of. All caught
exceptions are appended to the final AST as `[%%ocaml.error ..]'
nodes. This means the driver returns a valid AST instead of one
composed of a single error node corresponding to the first raised
exception. This leads to a much better experience for ppx users as
merlin now has a valid AST to work with when this happens, allowing it
to properly function and report all errors, from ppx-es or otherwise.
Note that despite this change we still recommend ppx authors to embed
errors in the rewritten AST rather than throw exceptions.
The release also comes with a few bug fixes on longident parsing or
windows compatibility and a new simplified API for ppx authors using
attributes as flags (i.e. attributes without payloads such as
`[@ignore]' for instance).
You can read the full patch notes [here].
We'd like to thank our external contributors for this release:
• @burnleydev1 for their improvement of the driver exception handling
• @dianaoigo for their addition of the new attribute flags API
• @jonahbeckford for their fix of the windows compatibility
We'd also like to thank the OCaml Software Foundation who has been
funding my work on this release.
[here]
<https://github.com/ocaml-ppx/ppxlib/blob/main/CHANGES.md#0320-2024-02-05>
Looking for Ideas for the Community Page at OCaml.org
═════════════════════════════════════════════════════
Archive:
<https://discuss.ocaml.org/t/looking-for-ideas-for-the-community-page-at-ocaml-org/14032/1>
Shakthi Kannan announced
────────────────────────
Greetings!
As we continue to make great strides in 2024, we would like to support
and grow our OCaml community!
In this regard, we need to overhaul the [OCaml.org Community] page,
similar to how we have revamped the Package Overview page and the
Learn Area based on your feedback.
What are the specific *topics* or *features* that you would like to
prominently display on the Community landing page?
Are there specific *resources*, *links*, and *content* that you find
valuable?
Show us any pages from other communities that you find are well done,
and tell us what you think about them.
Please share your thoughts and suggestions for the Community Area
page.
Let's discuss!
[OCaml.org Community] <https://ocaml.org/community>
Profiling OCaml programs
════════════════════════
Archive:
<https://discuss.ocaml.org/t/profiling-ocaml-programs/14033/1>
Louis Roché announced
─────────────────────
Ahrefs recently had to do some profiling to investigate build
times. @jchavarri used this opportunity to regroup different
techniques in a single document, which was then turned into this blog
post.
The post focuses on dune, as it was our target this time. But it
applies to basically all ocaml programs.
We hope that it can serve as a starting point if you ever have to
conduct similar investigations.
<https://tech.ahrefs.com/profiling-dune-builds-a8de589ec268>
Monadic programming tutorial
════════════════════════════
Archive:
<https://discuss.ocaml.org/t/monadic-programming-tutorial/14034/1>
Frédéric Loyer announced
────────────────────────
I have typed a little monadic programming tutorial.
<https://www.sinerj.org/~loyer/monadic_programming/monadic_programming/index.html>
Hope this helps. Your comments are welcomed.
Tutorial on GADTs
═════════════════
Archive: <https://discuss.ocaml.org/t/tutorial-on-gadts/14040/1>
Raphaël Proust announced
────────────────────────
I've written a three-part tutorial on GADTs. [The first part] shows
the very basic. It is intended for anyone who already knows OCaml but
hasn't written a GADT before. [The second part] is a collection of
different techniques you can use when making your own GADT. It is
intended as a follow-up of the first part or for programmers who have
written GADTs before but feel like they still have things to learn.
[The third part] is a gallery of GADTs found in the public OCaml
software ecosystem. It's intended for anyone who wants to see
practical-use examples.
I intend to expand the gallery of GADTs (part three). Let me know if
you have suggestions.
[The first part]
<https://raphael-proust.gitlab.io/code/my-first-gadt.html>
[The second part]
<https://raphael-proust.gitlab.io/code/gadt-tips-and-tricks.html>
[The third part]
<https://raphael-proust.gitlab.io/code/gadt-gallery.html>
Caqti/ppx_raper tutorial
════════════════════════
Archive:
<https://discuss.ocaml.org/t/caqti-ppx-raper-tutorial/14056/1>
Frédéric Loyer announced
────────────────────────
I propose the following tutorial
<https://www.sinerj.org/~loyer/caqti_ppx_rapper/caqti_ppx_rapper/index.html>
It is about Caqti and ppx_rapper use. The tutorial also uses the
`Lwt_result' monad and its `(let*)' binding operator. This avoid any
explicit error handling.
I hope this will be interesting, and will be glad to get some advice
to improve this first copy.
Perhaps I should add a section about processing a `list' of queries
(ex: a query returns a list of item and we want to execute a new query
for each row)
Re: dune 3.13
═════════════
Archive: <https://discuss.ocaml.org/t/ann-dune-3-13/13911/2>
Etienne Millon announced
────────────────────────
And dune 3.13.1 is available with the following fixes:
• Fix performance regression for incremental builds (#9769, fixes
#9738, @rgrinberg)
• Fix `dune ocaml top-module' to correctly handle absolute
paths. (#8249, fixes #7370, @Alizter)
• subst: ignore broken symlinks when looking at source files (#9810,
fixes #9593, @emillon)
• subst: do not fail on 32-bit systems when large files are
encountered. Just log a warning in this case. (#9811, fixes #9538,
@emillon)
• boot: sort directory entries in readdir. This makes the dune binary
reproducible in terms of filesystem order. (#9861, fixes #9794,
@emillon)
Other OCaml News
════════════════
>From the ocaml.org blog
───────────────────────
Here are links from many OCaml blogs aggregated at [the ocaml.org
blog].
• [OCaml: Introduction]
• [Improving OCaml.org to Provide an Engaging UX and Trusted User
Resources]
[the ocaml.org blog] <https://ocaml.org/blog/>
[OCaml: Introduction]
<https://priver.dev/blog/ocaml/ocaml-introduction/>
[Improving OCaml.org to Provide an Engaging UX and Trusted User
Resources]
<https://tarides.com/blog/2024-02-07-improving-ocaml-org-to-provide-an-engaging-ux-and-trusted-user-resources>
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/>