Hello Here is the latest OCaml Weekly News, for the week of September 14 to 21, 2021. Table of Contents ───────────────── opam-grep: search through the sources of all the packages in opam-repository Hardcaml MIPS CPU Learning Project and Blog Puzzling through some GADT errors Parany for multicore OCaml OCaml 4.13.0, second release candidate Unicode 14.0.0 update for Uucd, Uucp, Uunf and Uuseg Set up OCaml 2.0.0-beta4 Become an Outreachy Mentor: support the growth and diversity of the OCaml community The OCaml 4.13 preview for Merlin is now available Old CWN opam-grep: search through the sources of all the packages in opam-repository ════════════════════════════════════════════════════════════════════════════ Archive: Kate announced ────────────── I've just released opam-grep.0.2.0 with quite a bit of change compared to the previous version. Here is the highlight: • Complete rewrite from shell script to OCaml, making it more portable • Use the faster `ripgrep' and `ugrep' over `grep' when available (suggestion by @Engil) • Use the `progress' library to show progress instead of a non-portable/DIY spinner See the [changelog] for the full list of relevant changes. *Big thanks to @CraigFe for the `progress' library (such a treat!) and to @dbuenzli for `bos' and `cmdliner' in particular, making it easy to do such rewrite* :relaxed: [changelog] Hardcaml MIPS CPU Learning Project and Blog ═══════════════════════════════════════════ Archive: Alexander (Sasha) Skvortsov announced ───────────────────────────────────── Hi everyone! We are excited to announce that we have completed this project and blog. Progress has been slow these past few months due to work, internships, and college, but we’ve now released [v1.0.0 on GitHub]. We also published posts on: • [Design patterns, conventions, and testing] • [How the Always DSL can be used to write safe “pseudo-imperative” code in Hardcaml] • [Hardcaml’s testing and interactive simulation tools] • [A recap of some interesting hardware/CPU features in our design] Finally, we published a [conclusion blog post], which wraps up some strengths/weaknesses of Hardcaml, as well as some takeaways on OCaml and blogging more generally. Thank you to @andyman and @fyquah95 for building Hardcaml, and for helping us out on GitHub issues! We really appreciate your time and suggestions. Overall, we’ve come to the conclusion that Hardcaml is a much better tool for hardware design than Verilog. This has been a great experience, and we walk away with a better understanding of hardware, functional programming, and technical writing. [v1.0.0 on GitHub] [Design patterns, conventions, and testing] [How the Always DSL can be used to write safe “pseudo-imperative” code in Hardcaml] [Hardcaml’s testing and interactive simulation tools] [A recap of some interesting hardware/CPU features in our design] [conclusion blog post] Puzzling through some GADT errors ═════════════════════════════════ Archive: Deep in this thread, gasche said ──────────────────────────────── Not exactly what you are asking for, but @Octachron wrote an excellent [chapter on GADTs] in the OCaml manual, which could be recommended to people starting GADT programming. It explains why recursive functions on GADT need "explicit polymorphic annotations" in less "implementation driven" terms. (The chapter also demonstrates the new naming scheme for existential type variables introduced by GADT constructors, which can help a lot working through type errors, but are still a bit heavy and deserve a gentle introduction.) [chapter on GADTs] octachron then added ──────────────────── I have only written the nomenclature part and a bit of the explanation for recursive functions in this chapter, @garrigue is the author of most of this chapter. Parany for multicore OCaml ══════════════════════════ Archive: UnixJunkie announced ──────────────────── There is now an implementation using multicore-OCaml in the 'domains' branch. People are very welcome to give it a try and share the speedup they observe, especially compared to fork-based parallelism. Thanks to @nilsbecker for having motivated me. UnixJunkie later added ────────────────────── If you don't use the domains branch, then parany is using fork-based parallelism. If you want to use the domains branch, you need to install multicore-ocaml first: ┌──── │ opam switch create 4.12.0+domains │ eval `opam config env` └──── OCaml 4.13.0, second release candidate ══════════════════════════════════════ Archive: octachron announced ─────────────────── The release of OCaml 4.13.0 is expected for next week. Since we had a native code generation bug fix and two minor configuration tweaks since the first release candidate, we are publishing a second release candidate. If you find any bugs, please report them here: Happy hacking, Florian Angeletti for the OCaml team. Installation instructions ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ The base compiler can be installed as an opam switch with the following commands ┌──── │ opam update │ opam switch create 4.13.0~rc2 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git └──── If you want to tweak the configuration of the compiler, you can switch to the option variant with: ┌──── │ opam update │ opam switch create --packages=ocaml-variants.4.13.0~rc2+options, │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git └──── where is a comma separated list of ocaml-option-* packages. For instance, for a flambda and no-flat-float-array switch: ┌──── │ opam switch create 4.13.0~rc2+flambda+nffa │ --packages=ocaml-variants.4.13.0~rc2+options,ocaml-option-flambda,ocaml-option-no-flat-float-array │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git └──── All available options can be listed with "opam search ocaml-option". The source code for the release candidate is also available at these addresses: • Changes since the first release candidate ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ • [#10626], [#10628]: Wrong reloading of the x86-64 instruction for integer multiplication by a constant, causing the assembler to reject the ocamlopt-generated code. (Xavier Leroy, report by Dave Aitken, review by Vincent Laviron) • [#10176], [#10632(new in rc2)]: By default, call the assembler through the C compiler driver (Sébastien Hinderer, review by Gabriel Scherer, David Allsopp and Xavier Leroy) • [#10451], [#10635(new in rc2)]: Replace the use of iconv with a C utility to convert $(LIBDIR) to a C string constant on Windows when building the runtime. Hardens the generation of the constant on Unix for paths with backslashes, double-quotes and newlines. (David Allsopp, review by Florian Angeletti and Sébastien Hinderer) [#10626] [#10628] [#10176] [#10632(new in rc2)] [#10451] [#10635(new in rc2)] Unicode 14.0.0 update for Uucd, Uucp, Uunf and Uuseg ════════════════════════════════════════════════════ Archive: Daniel Bünzli announced ─────────────────────── Unicode 14.0.0 was released on the 14th of september. It adds 838 new characters to the standard including, for our friends from Central Asia, support for [Old Uyghur]. For information about all the other additions, see [the announcement page]. Accordingly the libraries mentioned at the end of this message had to be updated, consult the individual release notes for details. Both Uucd and Uucp are incompatible releases sinces new script and block enumerants had to be added. Best, Daniel P.S. Though I'm not very fond of the concept, I recently enabled sponsors on my github account as an experiment. So I'd like to thanks my [github sponsors], @davesnx became the first one monday. [Old Uyghur] [the announcement page] [github sponsors] Set up OCaml 2.0.0-beta4 ════════════════════════ Archive: Sora Morimoto announced ─────────────────────── Changed ╌╌╌╌╌╌╌ • Set `OPAMSOLVERTIMEOUT' to `1000' to avoid a timeout even if the opam solver is slow. • Increase cache hit ratio by loosening restore keys of opam cache. Become an Outreachy Mentor: support the growth and diversity of the OCaml community ═══════════════════════════════════════════════════════════════════════════════════ Archive: Sonja Heinze announced ────────────────────── Hey all, I've just submitted an Outreachy project for the winter round. The project is to write the basic ppx_deriving plugins in ppxlib; that is, the ones that don't already have a version based on ppxlib. I think both, having them available to use, and having their code available as simple examples of how to use Ppxlib.Deriving would be very nice! And improving ppxlib's documentation and finding simple issues on already existing PPXs to prepare for Outreachy, will be beneficial as well. Of course, it's not clear if someone with the right interest comes along for this project, but if we don't find an intern for it this round, I can just re-submit the same project next round. Sonja Heinze ──────────── Btw, the deadline to submit projects was extended and is now Sept 23rd. So the timeline in our post above is slightly outdated. The OCaml 4.13 preview for Merlin is now available ══════════════════════════════════════════════════ Archive: Continuing this thread, Kate announced ────────────────────────────────────── The OCaml 4.13 preview for ocaml-lsp-server is now available as well. To install it along with the OCaml 4.13 rc, please refer to the first post. If you encounter any problems while using ocaml-lsp-server, please feel free to report it directly in 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] [the archive] [RSS feed of the archives] [online] [Alan Schmitt]