OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of February 11 to 18, 2020.

Table of Contents

Logical 0.3.0

Tóth Róbert announced

I proud to announce that I published Logical 0.3.0 and it's available in opam. I'm also not to proud to announce that I did a bunch of breaking changes in this release. :D

During development of this release, I realized that I made the biggest mistake I could do as a library maintainer, which is that I didn't use my own library, so I made a bunch of stupid design mistakes, which I hopefully fixed in this release.

Changelog:

  • Added both_multi goal
  • Removed set from the type system
  • Moved type system to separate module
  • Re-factored state to be a map instead of an association list
  • Added bunch of examples to the bin folder

One of my main goal with Logical was to solve the puzzles that I found in this entertaining article: https://xmonader.github.io/prolog/2018/12/21/solving-murder-prolog.html and it became a reality so hurray. Another important thing to mention is that I can proudly say that Logical is capable of solving a mystery murder, so it's at least a mystery murder complete language/framework. :D

Future plans(0.4.0 release):

  • I want to introduce conditions or validations (I need to find a good name for it) on the variables, which would basically be a function, which is run when the variable gets it's value, so it's possible to assess if the value is a good one or not. I think this feature is extremely general, flexible and powerful, so I have to be careful how I implement it(if I will). :D It also means that implementing negation in Logical will become a breeze, so that's it for being negation free.
  • I'm thinking of creating a Variable module, which will by more like a syntactic sugar for creating variables. I'm not sure about this, because this would make Goal.equal "obsolete".
  • I will hide Base's datatypes behind ours, so the user don't have to depend on base to use the library.

Let me know if you have any suggestion or comment about Logical.

Github: https://github.com/StrykerKKD/Logical
Docs: https://strykerkkd.github.io/Logical

OCaml 4.10.0, first release candidate

octachron announced

We have released a second release candidate to integrate a bug fix for 32-bit users of the new best-fit allocator:

https://github.com/ocaml/ocaml/pull/9292

The fix should be transparent for other users, the release is mostly here to try to minimize the difference between the candidate and final binaries.

New release of Menhir, including bug fixes

François Pottier announced

Dear users of OCaml & Menhir,

It is my pleasure to announce a new release of Menhir.

opam update
opam upgrade menhir

This release fixes two bugs in our implementation of Pager's algorithm. Menhir relies on this algorithm to build an LR automaton and to decide which states can safely be merged, where "safely" means "without creating unexplainable conflicts". One bug (which had been known for a long time, but not fixed) would cause Menhir to sometimes make an unsafe merge decision, thereby creating an unexplainable conflict. The other bug (which had never been discovered until now) would cause Menhir to sometimes miss a safe merge decision, thereby creating an automaton with needlessly many states.

In summary, after upgrading to this version, you may find (in some cases) that the parser produced by Menhir for your grammar has changed. It may have slightly more or slightly fewer states than the parser produced by previous versions of Menhir. Even in cases where the parser hasn't changed, the numbering of the states can be different.

Feedback is welcome.

Happy parsing,

François Pottier
francois.pottier@inria.fr
http://cambium.inria.fr/~fpottier/

2020/02/11

  • Re-implement Menhir's default algorithm for constructing LR(1) automata, namely Pager's algorithm. This closes issue #21 (reported by Andrej Bauer), a bug that would sometimes cause unexplainable conflicts to appear, because states were merged too aggressively. This also removes an unreported bug that would cause the automaton to have too many states, because states were not merged aggressively enough. In summary, the old and new construction algorithms differ: in many cases, the resulting automaton is unchanged, but in some cases, the automaton produced by the new algorithm may have slightly more or slightly fewer states.
  • Re-implement Menhir's algorithm for constructing automata in --no-pager mode. In this (undocumented) mode, Menhir does not merge any states, but allows itself to redirect a transition from a state s to a larger state s'. This method yields an automaton whose states form a subset of the states of the canonical LR(1) automaton. It usually has significantly fewer states than the canonical automaton, and significantly more states than the automaton produced by Pager's algorithm. The new construction method removes an unreported bug that would cause the automaton to have too many states. The automaton produced by the new algorithm will usually have significantly fewer states than the automaton produced by the previous algorithm.
  • Re-implement Menhir's algorithms for constructing automata in --lalr and --canonical modes. The previous algorithms were correct, as far as we know, so the output of the new algorithms is the same, up to a possible renumbering of the states. The new algorithms are slightly faster.
  • Increase the maximum length of a production, which used to be 127, up to 1023. Display a polite error message if this length is exceeded. (Problem reported by Andreas Abel.)
  • The new switch --timings-to <filename> causes internal timing information to be written to the file <filename>.
  • A version of the library fix is now vendored (included) inside Menhir. This should have no impact for end users, but implies that dune 2.2.0 or later is required.

First release of data-encoding, JSON and binary serialisation

Raphaël Proust announced

The newly released version (0.2) addresses this. All the binary reading/writing primitives use result by default and have _opt and _exn variants.

The JSON primitives are not yet changed because they rely on an external library that has more idiosyncratic error management. (This will eventually be fixed in a future version.)

Opam package popularity?

Chet Murthy asked

Is there someplace a database of opam packages and their popularity? Obviously it'd be inaccurate, but it'd still be interesting to see which packages are most-often downloaded via opam …..

Levi Roth replied

The listing at https://opam.ocaml.org/packages/index-popularity.html has the download counts (I think for the latest month, not sure if that means past 30 days or since the start of the current calendar month) as title attributes on the table rows.

What's the OCaml equivalent for HLint?

Fangyi Zhou asked

I've been using OCaml for quite a while and one thing I've been looking for is a good linter, ideally something like the Haskell HLint.

I found this which seems quite old - latest release in 2012.

Sorry if this has been raised previously.

"Aaron L. Zeng

Something similar, but not as featureful, is ppx_js_style. It's somewhat opinionated, but the checks aren't Jane Street-specific.

New release of naboris 0.1.1

Shawn McGinty announced

https://github.com/shawn-mcginty/naboris

  • (much) Better performance
  • API improvements

Category theory for Programmers book - OCaml flavor

Anton Kochkov announced

Thanks to @Arul the book was finished, and now is available for download here - https://github.com/hmemcpy/milewski-ctfp-pdf/releases/tag/v1.4.0-rc1

Please, enjoy and report a feedback.

Call for Speakers: Build Meetup New York April 2020

Jérémie Dimino announced

On April 7th and 8th, Jane Street, Bloomberg and Google will be hosting a Build Meetup at the Jane Street offices in New York City.

As we begin shaping our schedule, we are reaching out to a number of communities to find people who would like to participate in the event. Speaker sign-ups are now live here.

We are excited to announce that the keynote will be presented by the authors of the research paper “From Laptop to Lambda: Outsourcing Everyday Jobs to Thousands of Transient Functional Containers” which examines the exciting possibilities for build through the use of cloud functions.

The entire event will be themed around all things build and test: Bazel, Buck, BuildStream, CMake, Dune, Goma, Pants, Recc and Remote Execution. In addition to this, we are interested in the growing surrounding ecosystems, such as editor integration and developer build experience as a whole.

The meetup will run as follows: on day one, a series of talks will be presented along with breakfast, lunch and refreshments. This will be followed by an evening social at a nearby venue to continue the discussions from throughout the day.

On the second day there will be an opportunity for broader community collaboration and discussion during our all day code sprint.

We are looking for insightful and engaging talks and presentations on topics focused around build systems. Have you worked tirelessly for the past 6 months on a new feature for project foo you would like to showcase? Have you and your team spent the last year integrating the tool bar at your workplace? Do you have some comparisons to make between qux and quux that the community could benefit from?

If so, we would love to hear from you!

We welcome proposals for talks across the entire ecosystem. Each talk should ideally last 30 minutes, followed by time for questions.

Keep your eyes out for meetup registration information, which will be sent separately over the next few weeks!

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.