OCaml Weekly News
Hello
Here is the latest OCaml Weekly News, for the week of January 24 to 31, 2023.
Table of Contents
Stramon 0.2.2 - Process behavior monitoring utility based on strace
Darren announced
I’m happy to announce Stramon (right now mainly distributed as statically built binary here).
Stramon is primarily created to make usage of strace and the analysis of strace output easier.
Stramon invokes strace underneath, analyzes the piped output and summarizes the findings into a JSON file when the command finishes.
An example JSON created by running Firefox via Stramon can be seen here. (Network access section is trimmed.)
Diskuv OCaml 1.2.0 (Windows, MSVC)
jbeckford announced
There is a new release of the Diskuv OCaml installer available for Windows users at
https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v1.2.0. It contains critical changes
that were blocking some Windows users from completing the install, and some performance
improvements thanks in large part to @edwin. The release notes have been reproduced immediately
below. It will be available using winget install Diskuv.OCaml in a week or so.
Upgrading? First uninstall the old Diskuv OCaml version using “Add or remove programs” in the Control Panel.
Callout to VirtualBox users: You’ll need a workaround for a not-yet backported FMA fix by doing the following in a PowerShell terminal inside VirtualBox before running the installer:
mkdir "$env:ProgramData\DiskuvOCaml\conf\" Set-Content -Path "$env:ProgramData\DiskuvOCaml\conf\ocamlcompiler.sexp" -Value "((feature_flag_imprecise_c99_float_ops))"
Critical changes:
- Switch from the official MSYS2
msys2-baseinstall, plus a set of MSYS2 Internet updates, to a standalone msys2-dkml-base that has all the MSYS2 packages needed during installation. That removes the Internet, GPG keys, proxies, etc. as a source of failures during the MSYS2 sub-installation. - Special handling for Scoop package manager on Windows which comingles a
conflicting bash.exe and git.exe in the same directory. A prior
scoop install gitshould no longer present a problem during installation. - Fixed: No longer need to do
opam pin remove ...to installmerlinandocaml-lsp.
Performance improvements:
- Plumb the number of cpus to the compiler jobs. [@edwin]
- Skip over cross-compiling support when no target ABIs specified.
- Overall shaved ~15 minutes from installation on a 3-CPU machine (80m instead of 95m), with additional savings if you have more CPUs. Timings in https://github.com/diskuv/dkml-runtime-common/pull/1
Open source help wanted:
- Byte-code only installation. That will be fast and simple and light, and is likely the best option for students. The existing installer already ships with a functioning
ocamlrunand standard library, and is “component”-based so pieces can be added or removed. No Visual Studio, no MSYS2, no spending time compiling code during installation. However a shim would need to be developed so thatocaml,ocamlc,utop, etc. work without setting required OCaml environment variables. Almost all of this new byte-code only installation can be developed on macOS or Linux. If you would like to contribute post your github username on https://github.com/diskuv/dkml-installer-ocaml/issues/35
Component upgrades:
- Bump utop from
2.9.0to2.10.0. - ocurrent ocaml/opam CI Docker image (a source of pins) updated from 2022-02-28 to 2022-11-22; numerous pins updated.
Bug fixes:
dkml-runtime-common-nativeworks with spaces in the Windows home directory- Removed incorrect
ptime.0.8.6pin duringdkml init; nowptime.1.1.0
Doc fixes:
- Create
dune-projectin Beyond Basics documentation alongside existingdune init exeto adhere to Dune 3.x behavior. (Dune 3.6 was added in DKML 1.1.0)
Deprecations:
- The
dkml --build-typebuild type option will be removed next release. It was originally created for Linux builds (perf and AFL variants), and can be resurrected and simplified if and when Linux support is added.
Internal changes:
- Added Jane Street’s
basepackage to globalutop. In particular,baseis now part of thedkmlswitch created during installation.coreis too expensive (52 packages) to install automatically, but you can install utop and core in your own switch. For now this is not that useful. Thelib/stublibsdirectory of thedkmlswitch needs to be in the PATH for#require "base";;to work in globalutop. That would help readers of the Real World OCaml book. A future release will automate the PATH change. - Removed
digestif.1.1.2+msvcpin since MSVC changes upstreamed to 1.1.3. - The bytecode
*.bcembedded in the installer is compiled with 4.14.0 and its embedded runtime is also 4.14.0. - When using
opam option setenv+=stop removing theenvironmentfile to force a rebuild of the environment. - Pin
omd.1.3.1 - Print timestamp for many logging operations to aid performance comparisons
Patches:
base_bigstring.v0.15.0for MSVC and MinGW (same in fdopen and esy). upstream: https://github.com/janestreet/base_bigstring/pull/3time_now.v0.15.0for MSVC. upstream: https://github.com/janestreet/time_now/issues/3core.v0.15.1for MSVC. upstream: https://github.com/janestreet/core/pull/161core_kernel.v0.15.0for MSVC. upstream: https://github.com/janestreet/core_kernel/pull/107alcotest.1.6.0for MSVC. upstream: https://github.com/mirage/alcotest/pull/369curly.0.2.0for Windows and MSVC (pending release; already unblocked). upstream: https://github.com/rgrinberg/curly/issues/10base.v0.15.1for MSVC 32-bit. Already merged; in v0.16~preview.127.22+307. upstream: https://github.com/janestreet/base/pull/128
Simple installation of packages without network
Anthony Scemama announced
I have access to machines that don’t allow me to download anything from the web, so I had
difficulties installing software with Opam.
With the help of Raja from OCamlPro, I came to a practical solution that solved my problem, and I
turned it into a script:
https://github.com/scemama/OpamPack
It is a simple script that makes a tar.gz on your local machine with all the dependencies you
need, and then you can copy the tar.gz o the remote isolated machine and install everything
using Opam without needing the network.
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.