OCaml, Opam & OCaml Tooling

Rehabilitating packs using functors and recursivity, part 2.

This blog post and the previous one about functor packs covers two RFCs currently developed by OCamlPro and Jane Street. We previously introduced functor packs, a new feature adding the possiblity to compile packs as functors, allowing the user to implement functors as multiple source files or even parameterized libraries. In this blog post, we Rehabilitating packs using functors and recursivity, part 2.

Tags: , ,

Rehabilitating Packs using Functors and Recursivity, part 1.

OCamlPro has a long history of dedicated efforts to support the development of the OCaml compiler, through sponsorship or direct contributions from Flambda Team. An important one is the Flambda intermediate representation designed for optimizations, and in the future its next iteration Flambda 2. This work is funded by JaneStreet. Packs in the OCaml ecosystem Rehabilitating Packs using Functors and Recursivity, part 1.

opam 2.0.7 release

We are pleased to announce the minor release of opam 2.0.7. This new version contains backported small fixes: – Escape Windows paths on manpages [#4129 @AltGr @rjbou]– Fix opam installer opam file [#4058 @rjbou]– Fix various warnings [#4132 @rjbou @AltGr – fix #4100]– Fix dune 2.5.0 promote-install-files duplication [#4132 @rjbou] Note: To homogenise macOS name opam 2.0.7 release

An in-depth Look at OCaml’s new “Best-fit” Garbage Collector Strategy

The Garbage Collector probably is OCaml’s greatest unsung hero. Its pragmatic approach allows us to allocate without much fear of efficiency loss. In a way, the fact that most OCaml hackers know little about it is a good sign: you want a runtime to gracefully do its job without having to mind it all the An in-depth Look at OCaml’s new “Best-fit” Garbage Collector Strategy

Tags: , ,

New version of TryOCaml in beta!

We are happy to announce that our venerable “TryOCaml” service is being retired and replaced by a new, modern version based upon our work on Learn-OCaml. → Try it here ← The new interface provides an editor panel besides the familiar top-level, error and warning positions highlighting, the latest OCaml release (4.10.0), local storage of New version of TryOCaml in beta!

Tags: ,

2019 at OCamlPro

OCamlPro was created to help OCaml and formal methods spread into the industry. We grew from 1 to 21 engineers, still strongly sharing this ambitious goal! The year 2019 at OCamlPro was very lively, with fantastic accomplishments all along! Let’s quickly review the past years’ works, first in the world of OCaml (flambda2 & compiler optimisations, 2019 at OCamlPro

Tags: , , , , , , , , , ,

opam 2.0.6 release

We are pleased to announce the minor release of opam 2.0.6. This new version contains some small backported fixes and build update: Don’t remove git cache objects that may be used [#3831 @AltGr] Don’t include .gitattributes in index.tar.gz [#3873 @dra27] Update FAQ uri [#3941 @dra27] Lock: add warning in case of missing locked file [#3939 opam 2.0.6 release

The Opam 2.0 cheatsheet, with a new theme!

Earlier, we dusted-off our Language and Stdlib cheatsheets, for teachers and students. With more time, we managed to design an Opam 2.0 cheat-sheet we are proud of. It is organized into two pages: The everyday average Opam use: Installation, Configuration, Switches, Allowed URL formats, Packages, Exploring, Package pinning, Working with local pins, Sharing a dev The Opam 2.0 cheatsheet, with a new theme!

OCaml expert and beginner training by OCamlPro (in French): Nov. 5-6 & 7-8

In our endeavour to encourage professional programmers to understand and use OCaml, OCamlPro will be giving two training sessions, in French, in our Paris offices: OCaml Beginner course for professional programmers (5-6 Nov) OCaml Expertise (7-8 Nov). The “Expert” OCaml course is for already experienced OCaml programmers to better understand advanced type system possibilities (objects, OCaml expert and beginner training by OCamlPro (in French): Nov. 5-6 & 7-8

Updated Cheat Sheets: OCaml Language and OCaml Standard Library

In 2011, we shared several cheat sheets for OCaml. Cheat sheets are helpful to refer to, as an overview of the documentation when you are programming, especially when you’re starting in a new language. They are meant to be printed and pinned on your wall, or to be kept in handy on a spare screen. Updated Cheat Sheets: OCaml Language and OCaml Standard Library

OCamlPro’s compiler team work update

The OCaml compiler team at OCamlPro is happy to present some of the work recently done jointly with JaneStreet’s team. A lot of work has been done towards a new framework for optimizations in the compiler, called Flambda2, aiming at solving the shortcomings that became apparent in the Flambda optimization framework (see below for more OCamlPro’s compiler team work update

Tags:

opam 2.0.5 release

We are pleased to announce the minor release of opam 2.0.5. This new version contains build update and small fixes: Bump src_ext Dune to 1.6.3, allows compilation with OCaml 4.08.0. [#3887 @dra27] Support Dune 1.7.0 and later [#3888 @dra27 – fix #3870] Bump the ocaml_mccs lib-ext, to include latest changes [#3896 @AltGr] Fix cppo detection opam 2.0.5 release

opam 2.0.4 release

We are pleased to announce the release of opam 2.0.4. This new version contains some backported fixes: Sandboxing on macOS: considering the possibility that TMPDIR is unset [#3597 @herbelin – fix #3576] display: Fix opam config var display, aligned on opam config list [#3723 @rjbou – rel. #3717] pin: update source of (version) pinned directory opam 2.0.4 release

opam 2.0.2 release

We are pleased to announce the release of opam 2.0.2. As sandbox scripts have been updated, don’t forget to run opam init –reinit -ni to update yours. This new version contains mainly backported fixes: Doc: update man page add message for deprecated options reinsert removed ones to print a deprecated message instead of fail (e.g. opam 2.0.2 release

OCaml JTRT

This time of the year is, just like Christmas time, a time for laughs and magic… although the magic we are talking about, in the OCaml community, is not exactly nice, nor beautiful. Let’s say that we are somehow akin to many religions: we know magic does exist , but that it is satanic and OCaml JTRT

2017 at OCamlPro

Since 2017 is just over, now is probably the best time to review what happened during this hectic year at OCamlPro… Here are our big 2017 achievements, in the world of blockchains (the Liquidity smart contract language, Tezos and the Tezos ICO,  etc.), of OCaml (with OPAM 2, flambda 2 etc.), and of formal methods 2017 at OCamlPro

Tags: , , , , , , ,

New opam features: more expressive dependencies

This blog will cover yet another aspect of the improvements opam 2.0 has over opam 1.2. It may be a little more technical than previous issues, as it covers a feature directed specifically at packagers and repository maintainers, and regarding the package definition format. Specifying dependencies in opam 1.2 Opam 1.2 already has an advanced New opam features: more expressive dependencies

New opam features: “opam install DIR”

After the opam build feature was announced followed a lot of discussions, mainly having to do with its interface, and misleading name. The base features it offered, though, were still widely asked for: a way to work directly with the project in the current directory, assuming it contains definitions for one or more packages a New opam features: “opam install DIR”

New opam features: “opam build”

The new opam 2.0 release, currently in beta, introduces several new features. This post gets into some detail on the new opam build command, its purpose, its use, and some implementation aspects. opam build is run from the source tree of a project, and does not rely on a pre-existing opam installation. As such, it New opam features: “opam build”

Tags: ,

Reduced Memory Allocations with ocp-memprof

In this blog post, we explain how ocp-memprof helped us identify a piece of code in Alt-Ergo that needed to be improved. Simply put, a function that merges two maps was performing a lot of unnecessary allocations, negatively impacting the garbage collector’s activity. A simple patch allowed us to prevent these allocations, and thus speed Reduced Memory Allocations with ocp-memprof

Tags: , , , , , , ,

Yes, ocp-memprof (s)can(f) !

A few months ago, a memory leak in the Scanf.fscanf function of OCaml’s standard library has been reported on the OCaml mailing list. The following “minimal” example reproduces this misbehavior: [code language=”fsharp” title=”(* in file scanf_leak.ml *)”] for i = 0 to 100_000 do let ic = open_in "some_file.txt" in Scanf.fscanf ic "%s" (fun _s Yes, ocp-memprof (s)can(f) !

Tags: , , , , , ,

Cumulus and ocp-memprof, a love story

In this blog post, we went on the hunt of memory leaks in Cumulus by using our memory profiler: ocp-memprof. Cumulus is a feed aggregator based on Eliom, a framework for programming web sites and client/server web applications, part of the Ocsigen Project. First, run and get the memory snapshots To test and run the Cumulus and ocp-memprof, a love story

Tags: , , , , , , ,