• en

OCaml Planet

The OCaml Planet aggregates various blogs from the OCaml community. If you would like to be added, read the Planet syndication HOWTO.

937 blog posts are available. You can read the 30 more recent ones below or view older ones.

Pearl No.4 - Kth Smallest in the Union of 2 Sorted Collections — Xinuo Chen, Oct 19, 2017

hero

Here is the Pearl No.4:

Let A and B be two disjoint ordered collections with distinct elements inside. Their combined size is greater than k.

  1. A and B are sorted, but the underlying data structures are not specified as they are collections.
  2. A and B do not have common elements, since they are disjoint
  3. All elements in A and B are distinct
  4. The total number of all elements is larger than k

Find the kth smallest element of A ∪ B.

By definition, the kth smallest elem…

Read more...

Coq 8.7.0 is out — Coq, Oct 17, 2017

The final release of Coq 8.7.0 is available. Coq 8.7 includes:
  • A large amount of work on cleaning and speeding up the code base, notably the work of Pierre-Marie Pédrot on making the tactic-level system insensitive to existential variable expansion, providing a safer API to plugin writers and making the code more robust.
  • New tactics:
    • Variants of tactics supporting existential variables eassert, eenough, etc. by Hugo Herbelin;
    • Tactics extensionality i…
Read more...

How to render trees like the Unix tree command — Shayne Fletcher, Oct 14, 2017

How to render trees like Unix 'tree'

The Unix tree utility produces a pretty rendering of a filesystem. Implementing an algorithm to produce output like tree is a little harder than one might expect! This short example program illustrates one way of doing it.

(* A type of non-empty trees of strings. *)
type tree = [
|`Node of string * tree list
]
;;

(* [print_tree tree] prints a rendering of [tree]. *)
let rec print_tree
?(pad : (string * string)= ("", ""))
(tree :…
Read more...

"More OCaml" updated to support OCaml 4.06 immutable strings — OCaml Book, Oct 14, 2017

OCaml 4.06 has, by default, immutable strings. This necessitates some changes to "More OCaml" ("OCaml from the Very Beginning" is unaffected).

The paper and kindle books (on Amazon), as well as the PDF e-book here, have been updated, together with the online resources. The new code works on any version of OCaml starting from 4.02.0.

If you are an existing customer, and have not received an update email, please contact the author using the form on this website.

Implementing the PowerPC backend for BAP - Part 0 — The BAP Blog, Oct 13, 2017

On this week we started to work on the PowerPC backend. We are planning a series of blog posts that will describe the process and probably will help others, who will pursue the task of implementing a backend for BAP, by either suggesting the right way or discouraging by showing an example of how one shouldn’t do this.

As you may know, BAP is a platform for program analysis that works with compiled binaries. In a sense, BAP is dual to a compiler, since we move in the opposite direction – we …

Read more...

Full Time: Senior Developer - Ruby / Rails / ELM at HubTran in remote — GitHub Jobs, Oct 12, 2017

HubTran (www.hubtran.com) is a fast-growing technology startup focused on automating work in the logistics industry. Through a combination of a powerful browser based interface and utilizing machine learning, we are able to reduce our customer's workload by 4x or more. We are seeing tremendous growth, primarily through word of mouth, and expect to see substantial growth within the next 12 months. HubTran is already cash flow positive with significant upside potential.

In order to take advantag…

Read more...

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong — GitHub Jobs, Oct 12, 2017

Software Developer

Jane Street is a proprietary quantitative trading firm, focusing primarily on trading equities and equity derivatives. We use innovative technology, a scientific approach, and a deep understanding of markets to stay successful in our highly competitive field. We operate around the clock and around the globe, employing over 500 people in offices in New York, London and Hong Kong.

The markets in which we trade change rapidly, but our intellectual approach changes faster still…

Read more...

NAT your own packets — Mindy Preston, Oct 10, 2017

I’ve been talking about network address translation here for a while, including instructions on building your own NAT device with MirageOS. The library behind those posts, mirage-nat, went on to back talex5’s unikernel firewall for QubesOS, but was unreleased and essentially unmaintained between late 2015 and early 2017. At the March 2017 MirageOS hack retreat in Marrakesh, talex5 convinced me to do some much-needed maintenance on this library. After having let it age between March a…Read more...

Coq 8.7+beta2 is out — Coq, Oct 06, 2017

The second beta release of Coq 8.7 is available for testing. Coq 8.7 includes:
  • A large amount of work on cleaning and speeding up the code base, notably the work of Pierre-Marie Pédrot on making the tactic-level system insensitive to existential variable expansion, providing a safer API to plugin writers and making the code more robust.
  • New tactics:
    • Variants of tactics supporting existential variables eassert, eenough, etc. by Hugo Herbelin;
    • Tactics
Read more...

The BAP Tutorial — The BAP Blog, Oct 03, 2017

It was a lasting issue that BAP didn’t have a tutorial. We have an extensive reference documentation that can even be considered as a manual, we have wiki and chats, but still it was necessary to read lots of stuff even for writing the simplest analysis. That’s why people kept asking us for the tutorial. So, today we are happy to announce the first true tutorial.

The target auditory of the tutorial is expected to be more or less advanced, as the tutorial will cover not only the basics, but …

Read more...

Testing Your Own Fork With OCaml's GitHub CI — OCaml Labs, Sep 27, 2017

There are various Continuous Integration (CI) systems monitoring OCaml. The most publicly visible of these are the two which run on our GitHub repository: Travis, which tests GNU/Linux in 32-bit and 64-bit configurations and also performs a few sanity checks on pull requests, and AppVeyor which tests some of the native Windows ports.

Between branching and a new release of OCaml there is a large spike in activity, and our CI systems can become overloaded when running across many PRs and branches…

Read more...

Revised Code Size Estimates for Examachine Releases — Eray Özkural, Sep 13, 2017

This post is in reference to Celestial Intellect Cybernetics's AGI (Artificial General Intelligence) Platform called Examachine. Examachine's core is a "parallel AGI kernel" which presents a generic programming API implementing parallel incremental general-purpose machine learning algorithms for heterogeneous supercomputers, and …

Coq 8.7 beta 1 is out — Coq, Sep 06, 2017

The first beta release of Coq 8.7 is available for testing. Coq 8.7 includes:
  • A large amount of work on cleaning and speeding up the code base, notably the work of Pierre-Marie Pédrot on making the tactic-level system insensitive to existential variable expansion, providing a safer API to plugin writers and making the code more robust.
  • New tactics:
    • Variants of tactics supporting existential variables eassert, eenough, etc. by Hugo Herbelin;
    • Tactics e…
Read more...

Platforms, Packaging, Progress — OCaml Labs, Sep 04, 2017

Richard Mortier recently decided to refresh and update his ocal command-line calendaring package, and took the opportunity to use the new packaging and build features present in opam: topkg and jbuilder.

This post from Mort details the process of removing remnants of older features such as Oasis, creating new jbuild files and topkg skeletons, and finally preparing and publishing a release into opam.


Merlin 3.0.0 on Windows — OCaml Labs, Aug 25, 2017

David Allsopp has previously contributed patches for native Windows support to Merlin, and after the release of Merlin 3.0.0 back in July, he’s been working with Frédéric Bour to port the new features to Windows.

This post from David explores some of the challenges for cross-platform development between Windows and Unix systems.


Alleged "hack" of our site: just a spam — Coq, Aug 23, 2017

The alleged "hack" of coq.inria.fr that led to several days of downtime for investigations was nothing more than a spam bug report. More details here.

Batteries 2.7.0 released — OCamlCore Forge News (Gabriel Scherer), Aug 17, 2017

This minor release is the first to support OCaml 4.05.0. See the full release notes at https://github.com/ocaml-batteries-team/batteries-included/releases/tag/v2.7.0

Transpose — Shayne Fletcher, Aug 12, 2017

Transpose

If we are to represent a row of a matrix as a list of numbers, then a matrix can naturally be represented as a list of lists of numbers.

The transpose of a matrix $\mathbf{A}$ is a new matrix denoted $\mathbf{A^{T}}$. The traditional mathematical definition of $\mathbf{A^{T}}$ is expressed as saying the $i$ th row, $j$ th column element of $\mathbf{A^{T}}$ is the $j$ th row, $i$ th column element of $\mathbf{A}$:

$\left[\mathbf{A}\…
Read more...

frama-clang 0.0.3, compatible with Frama-C 15 is out. Download ithere. — Frama-C, Aug 02, 2017

A New Implementation of Git — OCaml Labs, Jul 27, 2017

Displaying his own true sense of style, Romain Calascibetta added an incredibly detailed (and hilariously funny) PR for integrating his new Git implementation into ocaml-git - using the new implementation!

For the last ~6 months, Romain has been working hard to improve ocaml-git: decoding/encoding PACK files; implementing the git gc command; git push; and HTTP protocol.

He is currently integrating this work into the existing ocaml-git implementation using a bottom-to-top method, and as the new…

Read more...

Coq 8.6.1 is out — Coq, Jul 25, 2017

Version 8.6.1 of Coq is available. It fixes several bugs of version 8.6. More information can be found in the CHANGES file. Feedback and bug reports are extremely welcome.

Major Releases of Cohttp, Conduit, DNS and TCP/IP Libraries — OCaml Labs, Jul 19, 2017

Whilst porting a large portion of Mirage libraries to use Jbuilder, the MirageOS core team realised it was also a great opportunity to reorganise the package structure of some specific libraries, update/remove old code and improve overall functionality.

Many of the new releases include popular libraries used by projects other than MirageOS, and the maintainers have helpfully provided details on what has changed, specific improvements and adjustments users will need to make in order to use them.…

Read more...

OCaml EFL 1.19.0 released and migration to GitHub — OCamlCore Forge News (Alexis Bernadet), Jul 13, 2017

Moved to version 1.19 of the EFL. Like the previous version, only version 1.8 and higher of the EFL and Elementary are required to build this version of OCaml EFL. This is probably the last version of OCaml EFL released on OCaml Forge. This project will migrate to GitHub: https://github.com/axiles/ocaml-efl

OCaml 4.05.0 released — Caml INRIA, Jul 13, 2017

OCaml 4.05.0 Released — OCaml Labs, Jul 13, 2017

Following some minor releases in the last month, OCaml 4.05.0 was released today and is available as an opam switch, or from source.

The release comprises over 130 changes, with a few breaking existing programs. General changes include language optimisations, runtime and type system improvements, bug fixing and some internal compiler-libs alterations.

More specifically, the OCaml manual has been updated, with dead links removed and a new document detailing how to contribute upstream, and there…

Read more...

Provisioning, deploying, and managing virtual machines — Hannes Mehnert (hannes), Jul 10, 2017

How to deploy unikernels?

MirageOS has a pretty good story on how to compose your OCaml libraries into a virtual machine image. The mirage command line utility contains all the knowledge about which backend requires which library. This enables it to write a unikernel using abstract interfaces (such as a network device). Additionally the mirage utility can compile for any backend. (It is still unclear whether this is a sustainable idea, since the mirage tool needs to be adjusted for every ne…

Read more...

How I found a bug in Intel Skylake processors — GaGallium (Xavier Leroy), Jul 03, 2017

Instructors of "Introduction to programming" courses know that students are willing to blame the failures of their programs on anything. Sorting routine discards half of the data? "That might be a Windows virus!" Binary search always fails? "The Java compiler is acting funny today!" More experienced programmers know very well that the bug is generally in their code: occasionally in third-party libraries; very rarely in system libraries; exceedingly rarely…

Read more...

OCaml server-side developer at Ahrefs (Full-time) — Functional Jobs (FunctionalJobs.com), Jun 30, 2017

What we need

Ahrefs is looking for a backend developer with a deep understanding of networks, distributed systems, OS fundamentals and taste for simple and efficient architectural designs. Our backend is implemented mostly in OCaml and some C++, as such proficiency in OCaml is very much appreciated, otherwise a strong inclination to intensively learn OCaml in a short term will be required. Understanding of functional programming in general and/or experience with other FP languages (F#,Haskell,S…

Read more...

Intel Hyper-Threading Bug Uncovered by OCaml Developers — OCaml Labs, Jun 26, 2017

The OCaml community has helped uncover a serious microcode defect on Intel Skylake and Kaby Lake processors with hyper-threading enabled. Debian have issued a security advisory encouraging users of systems with the affected processors to apply the BIOS/UEFI update, or disable hyper-threading.

Related issues have been under investigation since 2016, when OCaml developers began experiencing unpredictable behaviour when using the Intel Skylake and Kaby Lake CPUs. As detailed on the Mantis issue, t…

Read more...

OCaml 4.04.2 released — Caml INRIA, Jun 23, 2017

View older blog posts.