[cwn] Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt alan.schmitt at polytechnique.org
Tue Jul 23 00:23:29 PDT 2019


Hello

Here is the latest OCaml Weekly News, for the week of July 16 to 
23,
2019.

Table of Contents
─────────────────

MirageOS retreat September 23rd - 29th
Some MirageOS unikernels: DNS servers, CalDAV
OCaml 4.08.1+rc1
soupault: a static website generator based on HTML rewriting
Genprint - general value printing
Printing arbitrary data in OCaml?
Other OCaml News
Old CWN


MirageOS retreat September 23rd - 29th
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/mirageos-retreat-september-23rd-29th/4114/1>


Hannes Mehnert announced
────────────────────────

  Hey, the next MirageOS retreat will take place again in 
  Marrakesh at
  the end of September. Reports from earlier retreats and more 
  details
  are available at <http://retreat.mirage.io> – everybody welcome!
  please sign up rather sooner than later :)


Some MirageOS unikernels: DNS servers, CalDAV
═════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-some-mirageos-unikernels-dns-servers-caldav/4115/1>


Hannes Mehnert announced
────────────────────────

  Hi, apart from libraries and development tools, we've been 
  working
  quite a bit on more realistic MirageOS applications which may be
  useful for you. Namely DNS authoritative servers (primary that 
  has
  their zones in a git remote, secondaries, let's encrypt 
  provisioning
  (all done via DNS)) and a CalDAV server. In addition, we are 
  doing
  some monitoring (Grafana + influx) of the running unikernels
  (themselves and the host system), and are positive that we are
  spending less CPU ticks (~x4) and less memory (easily an order 
  of
  magnitude) by replacing our Unix-based CalDAV server (same OCaml 
  code
  base) with a MirageOS virtual machine / unikernel. Thanks to all 
  who
  made this possible.

  If you're interested in this line of work (including 
  installation
  instructions which use an opam overlay for unreleased packages - 
  let
  us know if it works or does not work for you), please have a 
  look at
  <https://hannes.nqsb.io/Posts/Summer2019>


OCaml 4.08.1+rc1
════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2019-07/msg00027.html>


Florian Angeletti announced
───────────────────────────

  The release of OCaml version 4.08.1 is imminent.  This new 
  bugfix
  release fixes some compilation failures in presence of "-pack", 
  and
  some native-code alignment issues on ARM64, PPC64 and amd64.  We 
  have
  created a release candidate that you can test.

  The source code is available at these addresses:

  <https://github.com/ocaml/ocaml/archive/4.08.1+rc1.tar.gz>
  <https://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-4.08.1+rc1.tar.gz>

  The compiler can also be installed as an OPAM switch with one of 
  the
  following commands:

  ┌────
  │ opam switch create ocaml-variants.4.08.1+rc1 
  --repositories=default,ocaml-beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────

  or

  ┌────
  │ opam switch create ocaml-variants.4.08.1+rc1+<VARIANT> 
  --repositories=default,ocaml-beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────

  where you replace <VARIANT> with one of these:
  • afl
  • default-unsafe-string
  • force-safe-string
  • flambda
  • fp
  • fp+flambda

  We want to know about all bugs. Please report them here:
  <https://github.com/ocaml/ocaml/issues>

  Happy hacking, — Florian Angeletti, for the OCaml team.


OCaml 4.08.1 changes:
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

◊ Bug fixes:

  • #7887: ensure frame table is 8-aligned on ARM64 and PPC64
  (Xavier Leroy, report by Mark Hayden, review by Mark Shinwell 
  and
  Gabriel Scherer)

  • #8751: fix bug that could result in misaligned data section 
  when
     compiling to
  native-code on amd64. (observed with the mingw64 compiler) 
  (Nicolás
  Ojeda Bär, review by David Allsopp)

  • #8769, #8770: Fix assertion failure with -pack
  (Leo White, review by Gabriel Scherer, report by Fabian @copy)


Anil Madhavapeddy then said
───────────────────────────

  The Docker containers in the opam repository CI [1,2] have all 
  now
  been rebuilt to reflect the latest contents of the 4.08 branch 
  as per
  Florian's message.  This means that your 4.08 CI tests will now
  reflect the bug fixes below, and so (for example) nocrypto 
  should be
  installable now.

  [1] <https://hub.docker.com/r/ocaml/opam2/>
  [2] <https://github.com/ocaml/infrastructure/wiki/Containers>


soupault: a static website generator based on HTML rewriting
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-soupault-a-static-website-generator-based-on-html-rewriting/4126/1>


Daniil Baturin announced
────────────────────────

  <https://baturin.org/projects/soupault/>

  Soupault is the first (to my knowledge) website generator that
  exploits the fact that well-formed HTML is machine readable and
  transformable (and thanks to @aantron's lambdasoup it's quite 
  easy to
  do).

  It can do things like "use the first `<h1>' for the page title" 
  or
  "insert output of `date -R' into the `<time>' element no matter 
  where
  it's in the page".

  Features:
  • No templates, no themes, no front matter. You tell it where to
    insert stuff or what to extract using CSS selectors.
  • Built-in ToC, footnotes, and breadcrumbs.
  • Directories are site sections and can be nested.
  • Extracted metadata can be exported to JSON and fed to external
    scripts for creating section indices or custom taxonomies.
  • Configurable preprocessors for pages in formats other than 
  HTML.

  Soupault can be a drop-in automation tool for existing websites: 
  the
  directory structure is fully configurable, clean URLs are 
  optional,
  and it can preserve paths down to file extensions.


Genprint - general value printing
═════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-genprint-general-value-printing/3912/13>


progman announced
─────────────────

  Genprint is now available as a library. It uses a PPX extension.
  Working with OCaml versions from 4.02.

  <http://github.com/progman1/genprintlib> (general value printing 
  in
  compiled code)

  Available through the official opam repository.


Printing arbitrary data in OCaml?
═════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/printing-arbitrary-data-in-ocaml/4127/1>


Zeroexcuses asked
─────────────────

  For OCaml, is there a way to print _arbitrary_ data, or do I 
  need to
  write a custom printer for every object?

  In Rust, I can do something like
  ┌────
  │ #[derive(Deubg)]
  │ struct ...
  └────
  and then it will auto derive a way to print the data for me.

  In Clojure, most objects can be printed as is.

  In OCaml, is there a way to print objects without writing a 
  custom
  printer function?


Thierry Martinez replied
────────────────────────

  There exist some deriving mechanisms in OCaml quite similar to 
  those
  you know in Rust (or Haskell): they are implemented by PPX 
  syntax
  extensions, namely [`ppxlib'] or [`ppx_deriving']. With such
  extensions, you may write for instance:

  ┌────
  │ type example = A | B [@@deriving show]
  └────

  and two functions `pp_example : Formatter.formatter -> example 
  ->
  unit' and `show_example : example -> string' will be 
  automatically
  generated next to the type declaration. (`show' comes as a 
  standard
  plugin with `ppx_deriving'; if you prefer to use `ppxlib', you 
  will
  need an additional plugin for `show': you may use my 
  [`ppx_show']
  plugin.)


[`ppxlib'] <https://github.com/ocaml-ppx/ppxlib>

[`ppx_deriving'] <https://github.com/ocaml-ppx/ppx_deriving>

[`ppx_show'] <https://gitlab.inria.fr/tmartine/ppx_show/>


Chet Murthy also replied
────────────────────────

  You may have seen "genprint" announced just today; it's also a 
  way to
  print arbitrary values, via a different pathway.


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml 
  Planet].

  • [Ocsigen Start and Ocsigen Server updated]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Ocsigen Start and Ocsigen Server updated]
<https://ocsigen.github.io/blog/2019/07/18/releases/>


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] <http://alan.petitepomme.net/cwn/>

[RSS feed of the archives] 
<http://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <http://alan.petitepomme.net/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20190723/54b1ea6e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20190723/54b1ea6e/attachment-0001.pgp>


More information about the caml-news-weekly mailing list