Previous week Up Next week

Hello

Here is the latest OCaml Weekly News, for the week of March 20 to 27, 2018.

  1. New site for Jane Street Open Source libraries
  2. Base v0.11 released, with breaking changes
  3. Engineer position at INRIA Rennes to work on sat solver
  4. llopt 1.0.0: Check you assumptions about LLVM optimizations
  5. Ocaml Github Pull Requests
  6. Other OCaml News

New site for Jane Street Open Source libraries

Archive: https://discuss.ocaml.org/t/new-site-for-jane-street-open-source-libraries/1759/1

Yaron Minsky announced:
We recently created a new site to centralize information about our open source
libraries. You can find it here: http://opensource.janestreet.com. If nothing
else, it's a good place to get links to our API docs.

If you have thoughts about how we can make these resources more useful, we'd be
glad to hear about it!
      

Base v0.11 released, with breaking changes

Archive: https://discuss.ocaml.org/t/base-v0-11-released-with-breaking-changes/1766/1

Yaron Minsky announced:
We just put out a new release of Base, version v0.11, and it is available in
opam now. (Along with the rest of Jane Street's open source libraries, which
have all been released, with the same version number.)

Base hasn’t yet reached it’s 1.0 release, but we hope to get there in the next
six months. One of our reasons for delaying the 1.0 release is that we intend
for the 1.0 release to prioritize stability of the APIs, and there are a few
changes that we need to make before then. You can see some of the remaining
changes we want to make before declaring 1.0 on our Roadmap.

As of our 0.11 release, we’ve hit a majority of the issues on our roadmap, but
there are still a few to go. But if stability is your top priority, you might
want to wait for 1.0 before adopting Base.

You can find the Base changelog on
[GitHub](https://github.com/janestreet/base/blob/master/CHANGES.md), but here's
a version below, highlighting some of the breaking changes.

# v0.11

## Breaking Changes

- Make `~compare` a required argument to `List.dedup_and_sort`, `List.dedup`,
`List.find_a_dup`, `List.contains_dup`, and `List.find_all_dups`.

- Deprecated `Not_found`, people who need it can use `Caml.Not_found`, but its
use isn't recommended.

- Removed unnecessary unit argument from `Hashtbl.create`.

- Removed `Hashable.t` constructors from `Hashtbl` and `Hash_set`, instead
favoring the first-class module constructors.

- Removed `Container` operations from `Either.First` and `Either.Second`.

- Changed the type of `fold_until` in the `Container` interfaces. Rather than
returning a `Finished_or_stopped_early.t` (which has also been removed), the
function now takes a `finish` function that will be applied the result if `f`
never returned a `Stop _`.

- Removed the `String_dict` module.

- Removed `List.exn_if_dup`. It is still available in core_kernel.

- Removed "normalized" index operation `List.slice`. It is still available in
core_kernel.

- Remove "normalized" index operations from `Array`, which incluced
`Array.normalize`, `Array.slice`, `Array.nget` and `Array.nset`. These
operations are still available in core_kernel.

- Remove "normalized" index operations from `String`, which incluced
`String.normalize`, `String.slice`, `String.nget` and `String.nset`. These
operations are still available in core_kernel.

- Removed approximate float comparison operations, e.g., `(<=.)`

## Removal of deprecated functionality

- Removed deprecated operations from `Hashtbl`.

## Deprecations

- Deprecated `all_ignore` in the `Monad` and `Applicative` interfaces in favor
of `all_unit`.

- Deprecated `Array.replace_all` in favor of `Array.map_inplace`, which is the
standard name for that sort of operation within Base.


## Documentation changes

- Document that `Array.find_exn`, `Array.find_map_exn`, and `Array.findi_exn`
may throw `Caml.Not_found` _or_ `Not_found_s`.

- Document that `List.find_exn`, and `List.find_map_exn` may throw
`Caml.Not_found` _or_ `Not_found_s`.

- Document that `List.find_exn` may throw `Caml.Not_found` _or_ `Not_found_s`.

- Document that `String.lsplit2_exn`, and `String.rsplit2_exn` may throw
`Caml.Not_found` _or_ `Not_found_s`.

- Document that `List.find_exn`, and `List.find_map_exn` may throw
`Caml.Not_found` _or_ `Not_found_s`.

## Other enhancements

- Added `Sequence.group`, similar to `List.group`.

- Reimplemented `String.Caseless.compare` so that it does not allocate.

- Added the `Sexp.Not_found_s` exception which will replace `Caml.Not_found` as
the default exception in a future release.

- Added `Sys.argv`.

- Added a infix exponentation operator for int.

- Added a `Formatter` module to reexport the `Format.formatter` type and updated
the deprecation message for `Format`.

- Added `Sys.backend_type`.

- Added `String.is_substring_at string ~pos ~substring`. Used it as back-end for
`is_suffix` and `is_prefix`.

- Added `Uniform_array` module that is just like an `Array` except guarantees
that the representation array is not tagged with `Double_array_tag`, the tag for
float arrays.

- Added `Option_array` module that allows for a compact representation of `'a
option array`, which avoids allocating heap objects representing `Some a`.

- Moved all remaining `Replace_polymorphic_compare` submodules from Base types
and consolidated them in one place within `Import0`.

- Document that `Hashtbl.find_exn` may throw `Caml.Not_found` _or_ `Not_found_s`.

- Added a `Poly` submodule to `Map` and `Set` that exposes constructors that use
polymorphic compare.

- Added a `Queue` module that is backed by an `Option_array` for efficient and
(non-allocating) implementations of most operations.

- Added missing conversions between `Int63` and other integer types,
specifically, the versions that return options.

- Added truncating versions of integer conversions, with a suffix of `_trunc`.
These allow fast conversions via bit arithmetic without any conditional failure;
excess bits beyond the width of the output type are simply dropped.
      

Engineer position at INRIA Rennes to work on sat solver

Archive: https://discuss.ocaml.org/t/engineer-position-at-inria-rennes-to-work-on-sat-solver/1767/1

Sébastien Campion announced:
Works will be to consolidate the research prototypes developed during the
project, including the SAT_Equiv tool to verify the cryptographic protocols from
the established theorem. The mission will also consist in developing tools for
visualizing results. These graphic components will be used to graphically replay
a detected attack to better understand how it works.

Our suggestion will be to extend Jupyter OCaml Kernel if necessary and produce
visualization plugin adapted.

More information about satequiv here : https://projects.lsv.ens-cachan.fr/satequiv/
And a french description in PDF associated :
https://filesender.renater.fr/?s=download&token=00584a42-352f-897b-5519-58a659b607e6
      

llopt 1.0.0: Check you assumptions about LLVM optimizations

Archive: https://discuss.ocaml.org/t/announce-llopt-1-0-0-check-you-assumptions-about-llvm-optimizations/1772/1

Kate announced:
I'm please to announce the first release of `llopt`, a tool that takes a LLVM-IR
file and gives you back the optimized LLVM-IR using the LLVM optimization
passes.

The tool can be useful for quickly testing what optimizations are done by LLVM:
* depending on the optimization level (the Clang equivalent of `-O0`, `-O1`,
`-O2` or `-O3`)
* what does the LTO optimization pass

The tool also gives you a quick way see if your LLVM-IR module is syntactically
correct or not by just disabling the optimizations (`--opt=-1`).

Of course the tool is written in OCaml using the official LLVM binding and is
available via OPAM.
Its source code is really small and straightforward and can be easily modified
to check specific optimizations:

https://github.com/kit-ty-kate/llopt

Happy testing !
      

Ocaml Github Pull Requests

Gabriel Scherer and the editor compiled this list:
Here is a sneak peek at some potential future features of the Ocaml
compiler, discussed by their implementers in these Github Pull Requests.

- Add Float.pi
  https://github.com/ocaml/ocaml/pull/1674
      

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,
http://ocaml.org/community/planet/.

Full Time: Compiler Engineer at Jane Street in New York & London
 http://jobs.github.com/positions/9e8ba450-e72e-11e7-926f-6ce07b7015c8

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong
 http://jobs.github.com/positions/0a9333c4-71da-11e0-9ac7-692793c00b45

Announcing the Sound Static Analysis for Security Workshop
  (2018-06-27 and 28 at NIST). See the whole programhere.
 http://frama-c.com/index.html

Coq 8.8+beta1 is out
 https://coq.inria.fr/news/144.html
      

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