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

Alan Schmitt
2021-09-21T09:09:53Z

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

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:
<https://discuss.ocaml.org/t/ann-opam-grep-search-through-the-sources-of-all-the-packages-in-opam-repository/8434/3>

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]
<https://github.com/kit-ty-kate/opam-grep/blob/master/CHANGES.md>

Hardcaml MIPS CPU Learning Project and Blog
═══════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/hardcaml-mips-cpu-learning-project-and-blog/8088/10>

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]
<https://github.com/askvortsov1/hardcaml-mips/releases/tag/v1.0.0>

[Design patterns, conventions, and testing]
<https://ceramichacker.com/blog/14-8x-design-patterns-conventions-and-testing>

[How the Always DSL can be used to write safe “pseudo-imperative” code
in Hardcaml]
<https://ceramichacker.com/blog/15-9x-always-dsl-and-the-control-unit>

[Hardcaml’s testing and interactive simulation tools]
<https://ceramichacker.com/blog/16-10x-testing-and-debugging-hardcaml>

[A recap of some interesting hardware/CPU features in our design]
<https://ceramichacker.com/blog/18-11x-cpu-functionality-wrap-up>

[conclusion blog post]
<https://ceramichacker.com/blog/20-1212-project-conclusion>

Puzzling through some GADT errors
═════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/puzzling-through-some-gadt-errors/8478/8>

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] <https://ocaml.org/releases/4.12/manual/gadts.html>

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:
<https://discuss.ocaml.org/t/parany-for-multicore-ocaml/8495/1>

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

There is now an implementation using multicore-OCaml in the 'domains'
branch.

<https://github.com/UnixJunkie/parany/tree/domains>

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:
<https://discuss.ocaml.org/t/ocaml-4-13-0-second-release-candidate/8496/1>

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:

<https://github.com/ocaml/ocaml/issues>

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 <switch_name> --packages=ocaml-variants.4.13.0~rc2+options,<option_list>
│ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
└────

where <option_list> 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:

• <https://github.com/ocaml/ocaml/archive/4.13.0-rc2.tar.gz>
• <https://caml.inria.fr/pub/distrib/ocaml-4.13/ocaml-4.13.0~rc2.tar.gz>

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] <https://github.com/ocaml/ocaml/issues/10626>

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

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

[#10632(new in rc2)] <https://github.com/ocaml/ocaml/issues/10632>

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

[#10635(new in rc2)] <https://github.com/ocaml/ocaml/issues/10635>

Unicode 14.0.0 update for Uucd, Uucp, Uunf and Uuseg
════════════════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-unicode-14-0-0-update-for-uucd-uucp-uunf-and-uuseg/8497/1>

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]
<https://unicode.org/charts/PDF/Unicode-14.0/U140-10F70.pdf>

[the announcement page]
<http://blog.unicode.org/2021/09/announcing-unicode-standard-version-140.html>

[github sponsors] <https://github.com/sponsors/dbuenzli/>

Set up OCaml 2.0.0-beta4
════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta4/8501/1>

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.

<https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta4>

Become an Outreachy Mentor: support the growth and diversity of the OCaml community
═══════════════════════════════════════════════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/become-an-outreachy-mentor-support-the-growth-and-diversity-of-the-ocaml-community/8213/8>

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:
<https://discuss.ocaml.org/t/ann-the-ocaml-4-13-preview-for-merlin-is-now-available/8436/6>

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
<https://github.com/ocaml/ocaml-lsp/pull/506>

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

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