caml-list - the Caml user's mailing list
 help / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: "lwn" <lwn@lwn.net>, "cwn"  <cwn@lists.idyll.org>, caml-list@inria.fr, comp@lists.orbitalfox.eu
Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Date: Tue, 29 Dec 2020 10:59:57 +0100
Message-ID: <8735zpnd9e.fsf@m4x.org> (raw)

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

Hello

Here is the latest OCaml Weekly News, for the week of December 22 to 29,
2020.

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

ppx_deriving_yaml 0.1.0
A Heroku buildpack for OCaml
opam-dune-lint - keep opam and dune dependencies in sync
Scirep, a utility for literate programming
Camel Calendar for 2021
Old CWN


ppx_deriving_yaml 0.1.0
═══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ppx-deriving-yaml-0-1-0/7007/1>


Patrick Ferris announced
────────────────────────

  I'm proud to announce the first release (and my first release) of
  [ppx_deriving_yaml]. If you are familiar with the excellent
  [ppx_deriving_yojson] then this library should come as no surprise. In
  fact it helped me a lot in writing this ppx, so thank you to its
  creators/maintainers.


[ppx_deriving_yaml] <https://github.com/patricoferris/ppx_deriving_yaml>

[ppx_deriving_yojson] <https://github.com/ocaml-ppx/ppx_deriving_yojson>

Installation
╌╌╌╌╌╌╌╌╌╌╌╌

  ┌────
  │ $ opam update
  │ $ opam install ppx_deriving_yaml
  └────


Usage
╌╌╌╌╌

  Ppx_deriving_yaml converts your OCaml types to the "basic" [OCaml Yaml
  value type] (the one that is currently compatible with ezjsonm). So
  for example you can have:

  ┌────
  │ type t = { title: string; authors: string list } [@@deriving yaml]
  │ 
  │ let () =
  │   let v = { title = "Yaml PPX!"; authors = [ "Patrick Ferris" ] } in
  │   let yaml = to_yaml v in
  │   Yaml.pp Format.std_formatter yaml;
  │   match of_yaml yaml with
  │     | Ok t -> Format.print_string t.title
  │     | Error (`Msg m) -> failwith m
  └────

  The ppx generates two functions:

  ┌────
  │ val of_yaml : Yaml.value -> t Yaml.res
  │ val to_yaml : t -> Yaml.value
  └────

  And when built with this dune file:

  ┌────
  │ (executable
  │  (name main)
  │  (libraries yaml)
  │  (preprocess
  │   (pps ppx_deriving_yaml)))
  └────

  The following output is generated:

  ┌────
  │ title: Yaml PPX!
  │ authors:
  │ - Patrick Ferris
  │ Yaml PPX!
  └────

  The [README] contains some more information and the library is still a
  little rough around the edges, especially with error reporting, but
  I'm currently using it in a few places such as an "ocaml-ified"
  [github actions] library (ppx_deriving_yaml's [test workflow] was
  automatically generated with it :sparkles:). This is a nice example of
  how it can be used in a fairly straightforward way to generate OCaml
  versions of the many projects that use Yaml for configuration files.

  Happy yaml-ing :)


[OCaml Yaml value type]
<https://github.com/avsm/ocaml-yaml/blob/6de8fa6926d391334b945754619a64857d352e5d/lib/types.ml#L44>

[README]
<https://github.com/patricoferris/ppx_deriving_yaml#implementation-details>

[github actions] <https://github.com/patricoferris/opam-github-workflow>

[test workflow]
<https://github.com/patricoferris/ppx_deriving_yaml/blob/main/.github/workflows/test.yml>


A Heroku buildpack for OCaml
════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-a-heroku-buildpack-for-ocaml/7012/1>


roddy announced
───────────────

  I wrote [a Heroku buildpack] for OCaml web apps that use opam/dune.


[a Heroku buildpack]
<https://github.com/roddyyaga/heroku-buildpack-ocaml>


opam-dune-lint - keep opam and dune dependencies in sync
════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-opam-dune-lint-keep-opam-and-dune-dependencies-in-sync/7014/1>


Thomas Leonard announced
────────────────────────

  We're pleased to announce the first release of [opam-dune-lint]. This
  little tool checks that every ocamlfind dependency listed in your
  `dune' files has the corresponding opam package listed as a dependency
  in your `*.opam' file(s).

  e.g.

  ┌────
  │ $ cd charrua
  │ $ opam dune-lint
  │ charrua-client.opam: changes needed:
  │   "tcpip" {with-test & >= 6.0.0}           [from test/client, test/client/lwt]
  │ charrua-server.opam: changes needed:
  │   "ppx_cstruct" {with-test & >= 6.0.0}     [from (ppx), test]
  │   "tcpip" {with-test & >= 6.0.0}           [from test]
  │ charrua-unix.opam: changes needed:
  │   "cstruct-lwt" {>= 6.0.0}                 [from unix]
  │   "ipaddr" {>= 5.0.1}                      [from unix]
  │   "tcpip" {>= 6.0.0}                       [from unix]
  │ charrua.opam: OK
  │ Note: version numbers are just suggestions based on the currently installed version.
  │ Write changes? [y] y
  │ Wrote "./charrua-client.opam"
  │ Wrote "./charrua-server.opam"
  │ Wrote "./charrua-unix.opam"
  └────

  If your project generates the opam files from `dune-project', then it
  will update your `dune-project' instead.

  It can also be useful to run this in CI. It will exit with a non-zero
  exit status if anything needs to be changed. [ocaml-ci] runs this
  automatically as part of the "lint-opam" check.


[opam-dune-lint] <https://github.com/ocurrent/opam-dune-lint>

[ocaml-ci] <https://ci.ocamllabs.io/>


Scirep, a utility for literate programming
══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/scirep-a-utility-for-literate-programming/7016/1>


Philippe announced
──────────────────

  I wrote a utility called [scirep] to render a markdown file with OCaml
  code blocks as an HTML document, which provides some support for
  graphics. Here are some examples of generated documents: [one based on
  vg], and [another using owl-plplot].

  It can also be used downstream of [mdx] as a markdown-to-html
  converter that detects pictures in the toplevel's standard output and
  renders them in the final document.

  It is really a hack, and it is poorly documented, but I'm advertising
  it in case it might be useful to others.


[scirep] <https://github.com/pveber/scirep>

[one based on vg] <http://pveber.github.io/scirep/fold.html>

[another using owl-plplot] <http://pveber.github.io/scirep/damped.html>

[mdx] <https://github.com/realworldocaml/mdx>


Camel Calendar for 2021
═══════════════════════

  Archive: <https://discuss.ocaml.org/t/camel-calendar-for-2021/7020/1>


Florent Monnier announced
─────────────────────────

  I would like to share with you a [camel calendar for 2021 in pdf] with
  the nice theme from ocaml dot org.

  It was generated from an ocaml script that you can find in this repo:
  [svg calendar generator].

  Several scripts are available, you can find some results on this [web
  page].

  At the beginning of 2020 I was searching for a free software to
  generate calendars in SVG that I could customise for my own use, but I
  was unable to install the Perl script that exists (it has a lot of
  dependencies and the error message when I try to install it didn't
  help us to find what's wrong with it).

  This explains the design of these scripts, that are made to work
  without any dependencies and without any compilation. There's code
  duplication, but every script only need the ocaml interpreter to be
  run, so most people comfortable with the command line should be able
  to use it.

  (I also tried to sell some [on Etsy] but didn't sold a single one.)

  By default 12 languages are included in every script, but you can
  generate the calendars for more than 200 languages if you use [these
  dates locales] that come from the CLDR repository.

  You can also switch monday first or sunday first.

  These generators are provided under Zlib license.

  I hope some will enjoy!


[camel calendar for 2021 in pdf]
<http://decapode314.free.fr/cal/cal-camel/cal-camel-2021-en.pdf>

[svg calendar generator] <https://github.com/fccm/ocaml-cal-svg>

[web page] <http://decapode314.free.fr/cal/>

[on Etsy] <https://www.etsy.com/fr/shop/Decapode>

[these dates locales] <https://github.com/fccm/DateLocale-ocaml>


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


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

         reply index

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  7:35 Alan Schmitt
2019-10-15  7:28 Alan Schmitt
2019-11-05  6:55 Alan Schmitt
2019-11-12 13:21 Alan Schmitt
2019-11-26  8:33 Alan Schmitt
2019-12-03 15:43 Alan Schmitt
2019-12-10  8:21 Alan Schmitt
2019-12-17  8:52 Alan Schmitt
2019-12-31  9:18 Alan Schmitt
2020-01-07 13:43 Alan Schmitt
2020-01-14 14:17 Alan Schmitt
2020-01-21 14:09 Alan Schmitt
2020-01-28 10:54 Alan Schmitt
2020-02-04  8:47 Alan Schmitt
2020-02-18  8:18 Alan Schmitt
2020-02-25  8:51 Alan Schmitt
2020-03-03  8:00 Alan Schmitt
2020-03-10 14:29 Alan Schmitt
2020-03-17 11:04 Alan Schmitt
2020-03-24  9:31 Alan Schmitt
2020-03-31  9:55 Alan Schmitt
2020-04-07  7:51 Alan Schmitt
2020-04-14  7:28 Alan Schmitt
2020-04-21  8:58 Alan Schmitt
2020-04-28 12:45 Alan Schmitt
2020-05-05  7:45 Alan Schmitt
2020-05-12  7:46 Alan Schmitt
2020-05-19  9:53 Alan Schmitt
2020-06-09  8:29 Alan Schmitt
2020-06-16  8:36 Alan Schmitt
2020-06-30  7:00 Alan Schmitt
2020-07-07 10:05 Alan Schmitt
2020-07-14  9:55 Alan Schmitt
2020-07-21 14:43 Alan Schmitt
2020-07-28 16:58 Alan Schmitt
2020-08-18  7:26 Alan Schmitt
2020-09-01  7:55 Alan Schmitt
2020-09-08 13:11 Alan Schmitt
2020-09-22  7:27 Alan Schmitt
2020-09-29  7:02 Alan Schmitt
2020-10-06  7:22 Alan Schmitt
2020-10-20  8:16 Alan Schmitt
2020-10-27  8:44 Alan Schmitt
2020-11-03 15:16 Alan Schmitt
2020-12-01  8:55 Alan Schmitt
2020-12-15  9:51 Alan Schmitt
2020-12-22  8:49 Alan Schmitt
2020-12-29 10:00 Alan Schmitt [this message]
2021-01-05 11:22 Alan Schmitt
2021-01-12  9:47 Alan Schmitt
2021-01-19 14:28 Alan Schmitt
2021-01-26 13:25 Alan Schmitt
2021-02-02 13:56 Alan Schmitt
2021-02-16 13:53 Alan Schmitt
2021-02-23  9:52 Alan Schmitt
2021-03-09 10:59 Alan Schmitt
2021-03-16 10:32 Alan Schmitt
2021-03-23  9:05 Alan Schmitt
2021-03-30 14:56 Alan Schmitt
2021-04-06  9:42 Alan Schmitt
2021-04-20  9:07 Alan Schmitt
2021-04-27 14:26 Alan Schmitt
2021-05-04  8:58 Alan Schmitt
2021-05-11 14:48 Alan Schmitt
2021-05-25  7:30 Alan Schmitt
2021-06-01  9:23 Alan Schmitt
2021-06-22  9:05 Alan Schmitt
2021-06-29 12:24 Alan Schmitt
2021-07-06 12:34 Alan Schmitt
2021-07-20 12:59 Alan Schmitt
2021-07-27  8:54 Alan Schmitt
2021-08-10 16:47 Alan Schmitt
2021-08-17  6:24 Alan Schmitt
2021-08-24 13:44 Alan Schmitt
2021-09-07 13:24 Alan Schmitt
2021-09-21  9:10 Alan Schmitt
2021-09-28  6:37 Alan Schmitt

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735zpnd9e.fsf@m4x.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=caml-list@inria.fr \
    --cc=comp@lists.orbitalfox.eu \
    --cc=cwn@lists.idyll.org \
    --cc=lwn@lwn.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox